NOLINTNEXTLINE(modernize-use-nodiscard)
| 1925 | template <typename Q = mapped_type> |
| 1926 | // NOLINTNEXTLINE(modernize-use-nodiscard) |
| 1927 | typename std::enable_if<!std::is_void<Q>::value, Q&>::type at(key_type const& key) { |
| 1928 | ROBIN_HOOD_TRACE(this) |
| 1929 | auto kv = mKeyVals + findIdx(key); |
| 1930 | if (kv == reinterpret_cast_no_cast_align_warning<Node*>(mInfo)) { |
| 1931 | doThrow<std::out_of_range>("key not found"); |
| 1932 | } |
| 1933 | return kv->getSecond(); |
| 1934 | } |
| 1935 | |
| 1936 | // Returns a reference to the value found for key. |
| 1937 | // Throws std::out_of_range if element cannot be found |
no test coverage detected