@@ -10,7 +10,7 @@ namespace burda::ct
10
10
{
11
11
// / @brief Compile-time hash-map (associative key-value container) that performs all operations in constexpr context.
12
12
// / This means that keys and values have to be constexpr and noexcept constructible and provide constexpr noexcept operator=.
13
- // / @brief Behaviour is undefined, if there are multiple keys.
13
+ // / @brief Behaviour is undefined, if there are multiple same keys.
14
14
// / @brief There's actually no hash function needed, see details section.
15
15
// / @details Implemented as an std::array containing pairs, so no hashing is involved.
16
16
// / @tparam N total number of elements
@@ -81,7 +81,7 @@ class hash_map
81
81
// / @return boolean that denotes key's existence
82
82
[[nodiscard]] constexpr bool contains (const K& key) const noexcept
83
83
{
84
- return search<0 , N>(key) != std:: cend (data );
84
+ return search<0 , N>(key) != cend ();
85
85
}
86
86
87
87
// / @brief Retrieves size of a hash-map, might also be called indirectly using the std::size(...)
@@ -143,13 +143,13 @@ class hash_map
143
143
{
144
144
if (equal (data[L].first , key))
145
145
{
146
- return std::next (std:: cbegin (data ), L);
146
+ return std::next (cbegin (), L);
147
147
}
148
148
149
149
return search<L+1 , R>(key);
150
150
}
151
151
152
- return std:: cend (data );
152
+ return cend ();
153
153
}
154
154
155
155
// / @private generic implementation that compares keys
@@ -168,6 +168,6 @@ class hash_map
168
168
private:
169
169
data_type data;
170
170
};
171
- }
171
+ } // namespace burda::ct
172
172
173
173
#endif // BURDA_CONSTEXPR_HASH_MAP_HPP
0 commit comments