|
|
@@ -572,7 +572,7 @@ public:
|
|
|
* @return Number of elements removed (either 0 or 1).
|
|
|
*/
|
|
|
size_type erase(const value_type &value) {
|
|
|
- for(size_type *curr = sparse.first().data() + value_to_bucket(value); *curr != std::numeric_limits<size_type>::max(); curr = &packed.first()[*curr].first) {
|
|
|
+ for(size_type *curr = sparse.first().data() + value_to_bucket(value); *curr != (std::numeric_limits<size_type>::max)(); curr = &packed.first()[*curr].first) {
|
|
|
if(packed.second()(packed.first()[*curr].second, value)) {
|
|
|
const auto index = *curr;
|
|
|
*curr = packed.first()[*curr].first;
|
|
|
@@ -685,7 +685,7 @@ public:
|
|
|
* @return An iterator to the end of the given bucket.
|
|
|
*/
|
|
|
[[nodiscard]] const_local_iterator cend([[maybe_unused]] const size_type index) const {
|
|
|
- return {packed.first().begin(), std::numeric_limits<size_type>::max()};
|
|
|
+ return {packed.first().begin(), (std::numeric_limits<size_type>::max)()};
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -703,7 +703,7 @@ public:
|
|
|
* @return An iterator to the end of the given bucket.
|
|
|
*/
|
|
|
[[nodiscard]] local_iterator end([[maybe_unused]] const size_type index) {
|
|
|
- return {packed.first().begin(), std::numeric_limits<size_type>::max()};
|
|
|
+ return {packed.first().begin(), (std::numeric_limits<size_type>::max)()};
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -777,7 +777,7 @@ public:
|
|
|
|
|
|
if(const auto sz = next_power_of_two(value); sz != bucket_count()) {
|
|
|
sparse.first().resize(sz);
|
|
|
- std::fill(sparse.first().begin(), sparse.first().end(), std::numeric_limits<size_type>::max());
|
|
|
+ std::fill(sparse.first().begin(), sparse.first().end(), (std::numeric_limits<size_type>::max)());
|
|
|
|
|
|
for(size_type pos{}, last = size(); pos < last; ++pos) {
|
|
|
const auto index = value_to_bucket(packed.first()[pos].second);
|