diff options
Diffstat (limited to 'absl/container/internal')
-rw-r--r-- | absl/container/internal/hash_policy_testing.h | 2 | ||||
-rw-r--r-- | absl/container/internal/raw_hash_set.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/absl/container/internal/hash_policy_testing.h b/absl/container/internal/hash_policy_testing.h index ffc76ead7a68..38bbec77a2ed 100644 --- a/absl/container/internal/hash_policy_testing.h +++ b/absl/container/internal/hash_policy_testing.h @@ -139,7 +139,7 @@ struct Alloc : std::allocator<T> { friend bool operator!=(const Alloc& a, const Alloc& b) { return !(a == b); } private: - size_t id_ = std::numeric_limits<size_t>::max(); + size_t id_ = (std::numeric_limits<size_t>::max)(); }; template <class Map> diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 40bdb71b5203..aa423b25df5b 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -477,7 +477,7 @@ inline size_t NormalizeCapacity(size_t n) { constexpr size_t kMinCapacity = Group::kWidth - 1; return n <= kMinCapacity ? kMinCapacity - : std::numeric_limits<size_t>::max() >> LeadingZeros(n); + : (std::numeric_limits<size_t>::max)() >> LeadingZeros(n); } // The node_handle concept from C++17. @@ -1022,7 +1022,7 @@ class raw_hash_set { bool empty() const { return !size(); } size_t size() const { return size_; } size_t capacity() const { return capacity_; } - size_t max_size() const { return std::numeric_limits<size_t>::max(); } + size_t max_size() const { return (std::numeric_limits<size_t>::max)(); } void clear() { // Iterating over this container is O(bucket_count()). When bucket_count() |