@@ -1034,20 +1034,20 @@ public:
10341034 _LIBCPP_HIDE_FROM_ABI unordered_map& operator =(initializer_list<value_type> __il);
10351035# endif // _LIBCPP_CXX03_LANG
10361036
1037- _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator () const _NOEXCEPT {
1037+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator () const _NOEXCEPT {
10381038 return allocator_type (__table_.__node_alloc ());
10391039 }
10401040
10411041 [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool empty () const _NOEXCEPT { return __table_.size () == 0 ; }
1042- _LIBCPP_HIDE_FROM_ABI size_type size () const _NOEXCEPT { return __table_.size (); }
1043- _LIBCPP_HIDE_FROM_ABI size_type max_size () const _NOEXCEPT { return __table_.max_size (); }
1042+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_type size () const _NOEXCEPT { return __table_.size (); }
1043+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_type max_size () const _NOEXCEPT { return __table_.max_size (); }
10441044
1045- _LIBCPP_HIDE_FROM_ABI iterator begin () _NOEXCEPT { return __table_.begin (); }
1046- _LIBCPP_HIDE_FROM_ABI iterator end () _NOEXCEPT { return __table_.end (); }
1047- _LIBCPP_HIDE_FROM_ABI const_iterator begin () const _NOEXCEPT { return __table_.begin (); }
1048- _LIBCPP_HIDE_FROM_ABI const_iterator end () const _NOEXCEPT { return __table_.end (); }
1049- _LIBCPP_HIDE_FROM_ABI const_iterator cbegin () const _NOEXCEPT { return __table_.begin (); }
1050- _LIBCPP_HIDE_FROM_ABI const_iterator cend () const _NOEXCEPT { return __table_.end (); }
1045+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI iterator begin () _NOEXCEPT { return __table_.begin (); }
1046+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI iterator end () _NOEXCEPT { return __table_.end (); }
1047+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_iterator begin () const _NOEXCEPT { return __table_.begin (); }
1048+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_iterator end () const _NOEXCEPT { return __table_.end (); }
1049+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_iterator cbegin () const _NOEXCEPT { return __table_.begin (); }
1050+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_iterator cend () const _NOEXCEPT { return __table_.end (); }
10511051
10521052 _LIBCPP_HIDE_FROM_ABI pair<iterator, bool > insert (const value_type& __x) { return __table_.__emplace_unique (__x); }
10531053
@@ -1171,10 +1171,10 @@ public:
11711171 " node_type with incompatible allocator passed to unordered_map::insert()" );
11721172 return __table_.template __node_handle_insert_unique <node_type>(__hint.__i_ , std::move (__nh));
11731173 }
1174- _LIBCPP_HIDE_FROM_ABI node_type extract (key_type const & __key) {
1174+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI node_type extract (key_type const & __key) {
11751175 return __table_.template __node_handle_extract <node_type>(__key);
11761176 }
1177- _LIBCPP_HIDE_FROM_ABI node_type extract (const_iterator __it) {
1177+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI node_type extract (const_iterator __it) {
11781178 return __table_.template __node_handle_extract <node_type>(__it.__i_ );
11791179 }
11801180
@@ -1208,79 +1208,79 @@ public:
12081208 __table_.swap (__u.__table_ );
12091209 }
12101210
1211- _LIBCPP_HIDE_FROM_ABI hasher hash_function () const { return __table_.hash_function ().hash_function (); }
1212- _LIBCPP_HIDE_FROM_ABI key_equal key_eq () const { return __table_.key_eq ().key_eq (); }
1211+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI hasher hash_function () const { return __table_.hash_function ().hash_function (); }
1212+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI key_equal key_eq () const { return __table_.key_eq ().key_eq (); }
12131213
1214- _LIBCPP_HIDE_FROM_ABI iterator find (const key_type& __k) { return __table_.find (__k); }
1215- _LIBCPP_HIDE_FROM_ABI const_iterator find (const key_type& __k) const { return __table_.find (__k); }
1214+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI iterator find (const key_type& __k) { return __table_.find (__k); }
1215+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_iterator find (const key_type& __k) const { return __table_.find (__k); }
12161216# if _LIBCPP_STD_VER >= 20
12171217 template <class _K2 , enable_if_t <__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr >
1218- _LIBCPP_HIDE_FROM_ABI iterator find (const _K2& __k) {
1218+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI iterator find (const _K2& __k) {
12191219 return __table_.find (__k);
12201220 }
12211221 template <class _K2 , enable_if_t <__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr >
1222- _LIBCPP_HIDE_FROM_ABI const_iterator find (const _K2& __k) const {
1222+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI const_iterator find (const _K2& __k) const {
12231223 return __table_.find (__k);
12241224 }
12251225# endif // _LIBCPP_STD_VER >= 20
12261226
1227- _LIBCPP_HIDE_FROM_ABI size_type count (const key_type& __k) const { return __table_.__count_unique (__k); }
1227+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_type count (const key_type& __k) const { return __table_.__count_unique (__k); }
12281228# if _LIBCPP_STD_VER >= 20
12291229 template <class _K2 , enable_if_t <__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr >
1230- _LIBCPP_HIDE_FROM_ABI size_type count (const _K2& __k) const {
1230+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI size_type count (const _K2& __k) const {
12311231 return __table_.__count_unique (__k);
12321232 }
12331233# endif // _LIBCPP_STD_VER >= 20
12341234
12351235# if _LIBCPP_STD_VER >= 20
1236- _LIBCPP_HIDE_FROM_ABI bool contains (const key_type& __k) const { return find (__k) != end (); }
1236+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool contains (const key_type& __k) const { return find (__k) != end (); }
12371237
12381238 template <class _K2 , enable_if_t <__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr >
1239- _LIBCPP_HIDE_FROM_ABI bool contains (const _K2& __k) const {
1239+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool contains (const _K2& __k) const {
12401240 return find (__k) != end ();
12411241 }
12421242# endif // _LIBCPP_STD_VER >= 20
12431243
1244- _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator> equal_range (const key_type& __k) {
1244+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator> equal_range (const key_type& __k) {
12451245 return __table_.__equal_range_unique (__k);
12461246 }
1247- _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> equal_range (const key_type& __k) const {
1247+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> equal_range (const key_type& __k) const {
12481248 return __table_.__equal_range_unique (__k);
12491249 }
12501250# if _LIBCPP_STD_VER >= 20
12511251 template <class _K2 , enable_if_t <__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr >
1252- _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator> equal_range (const _K2& __k) {
1252+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator> equal_range (const _K2& __k) {
12531253 return __table_.__equal_range_unique (__k);
12541254 }
12551255 template <class _K2 , enable_if_t <__is_transparent_v<hasher, _K2> && __is_transparent_v<key_equal, _K2>>* = nullptr >
1256- _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> equal_range (const _K2& __k) const {
1256+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator> equal_range (const _K2& __k) const {
12571257 return __table_.__equal_range_unique (__k);
12581258 }
12591259# endif // _LIBCPP_STD_VER >= 20
12601260
1261- _LIBCPP_HIDE_FROM_ABI mapped_type& operator [](const key_type& __k);
1261+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI mapped_type& operator [](const key_type& __k);
12621262# ifndef _LIBCPP_CXX03_LANG
1263- _LIBCPP_HIDE_FROM_ABI mapped_type& operator [](key_type&& __k);
1263+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI mapped_type& operator [](key_type&& __k);
12641264# endif
12651265
1266- _LIBCPP_HIDE_FROM_ABI mapped_type& at (const key_type& __k);
1267- _LIBCPP_HIDE_FROM_ABI const mapped_type& at (const key_type& __k) const ;
1266+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI mapped_type& at (const key_type& __k);
1267+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const mapped_type& at (const key_type& __k) const ;
12681268
1269- _LIBCPP_HIDE_FROM_ABI size_type bucket_count () const _NOEXCEPT { return __table_.bucket_count (); }
1270- _LIBCPP_HIDE_FROM_ABI size_type max_bucket_count () const _NOEXCEPT { return __table_.max_bucket_count (); }
1269+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_type bucket_count () const _NOEXCEPT { return __table_.bucket_count (); }
1270+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_type max_bucket_count () const _NOEXCEPT { return __table_.max_bucket_count (); }
12711271
1272- _LIBCPP_HIDE_FROM_ABI size_type bucket_size (size_type __n) const { return __table_.bucket_size (__n); }
1273- _LIBCPP_HIDE_FROM_ABI size_type bucket (const key_type& __k) const { return __table_.bucket (__k); }
1272+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_type bucket_size (size_type __n) const { return __table_.bucket_size (__n); }
1273+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_type bucket (const key_type& __k) const { return __table_.bucket (__k); }
12741274
1275- _LIBCPP_HIDE_FROM_ABI local_iterator begin (size_type __n) { return __table_.begin (__n); }
1276- _LIBCPP_HIDE_FROM_ABI local_iterator end (size_type __n) { return __table_.end (__n); }
1277- _LIBCPP_HIDE_FROM_ABI const_local_iterator begin (size_type __n) const { return __table_.cbegin (__n); }
1278- _LIBCPP_HIDE_FROM_ABI const_local_iterator end (size_type __n) const { return __table_.cend (__n); }
1279- _LIBCPP_HIDE_FROM_ABI const_local_iterator cbegin (size_type __n) const { return __table_.cbegin (__n); }
1280- _LIBCPP_HIDE_FROM_ABI const_local_iterator cend (size_type __n) const { return __table_.cend (__n); }
1275+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI local_iterator begin (size_type __n) { return __table_.begin (__n); }
1276+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI local_iterator end (size_type __n) { return __table_.end (__n); }
1277+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_local_iterator begin (size_type __n) const { return __table_.cbegin (__n); }
1278+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_local_iterator end (size_type __n) const { return __table_.cend (__n); }
1279+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_local_iterator cbegin (size_type __n) const { return __table_.cbegin (__n); }
1280+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_local_iterator cend (size_type __n) const { return __table_.cend (__n); }
12811281
1282- _LIBCPP_HIDE_FROM_ABI float load_factor () const _NOEXCEPT { return __table_.load_factor (); }
1283- _LIBCPP_HIDE_FROM_ABI float max_load_factor () const _NOEXCEPT { return __table_.max_load_factor (); }
1282+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI float load_factor () const _NOEXCEPT { return __table_.load_factor (); }
1283+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI float max_load_factor () const _NOEXCEPT { return __table_.max_load_factor (); }
12841284 _LIBCPP_HIDE_FROM_ABI void max_load_factor (float __mlf) { __table_.max_load_factor (__mlf); }
12851285 _LIBCPP_HIDE_FROM_ABI void rehash (size_type __n) { __table_.__rehash_unique (__n); }
12861286 _LIBCPP_HIDE_FROM_ABI void reserve (size_type __n) { __table_.__reserve_unique (__n); }
0 commit comments