5858# pragma GCC system_header
5959#endif
6060
61+ _LIBCPP_PUSH_MACROS
62+ #include < __undef_macros>
63+
6164#if _LIBCPP_STD_VER >= 23
6265
6366_LIBCPP_BEGIN_NAMESPACE_STD
@@ -289,7 +292,7 @@ class flat_map {
289292 _LIBCPP_HIDE_FROM_ABI flat_map (
290293 key_container_type __key_cont, mapped_container_type __mapped_cont, const key_compare& __comp = key_compare())
291294 : __containers_{.keys = std::move (__key_cont), .values = std::move (__mapped_cont)}, __compare_(__comp) {
292- _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers .keys .size () == __containers .values .size (),
295+ _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers_ .keys .size () == __containers_ .values .size (),
293296 " flat_map keys and mapped containers have different size" );
294297 __sort_and_unique ();
295298 }
@@ -299,7 +302,7 @@ class flat_map {
299302 _LIBCPP_HIDE_FROM_ABI
300303 flat_map (const key_container_type& __key_cont, const mapped_container_type& __mapped_cont, const _Allocator& __alloc)
301304 : flat_map(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont) {
302- _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers .keys .size () == __containers .values .size (),
305+ _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers_ .keys .size () == __containers_ .values .size (),
303306 " flat_map keys and mapped containers have different size" );
304307 __sort_and_unique ();
305308 }
@@ -312,7 +315,7 @@ class flat_map {
312315 const key_compare& __comp,
313316 const _Allocator& __alloc)
314317 : flat_map(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont, __comp) {
315- _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers .keys .size () == __containers .values .size (),
318+ _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers_ .keys .size () == __containers_ .values .size (),
316319 " flat_map keys and mapped containers have different size" );
317320 __sort_and_unique ();
318321 }
@@ -323,10 +326,10 @@ class flat_map {
323326 mapped_container_type __mapped_cont,
324327 const key_compare& __comp = key_compare())
325328 : __containers_{.keys = std::move (__key_cont), .values = std::move (__mapped_cont)}, __compare_(__comp) {
326- _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers .keys .size () == __containers .values .size (),
329+ _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers_ .keys .size () == __containers_ .values .size (),
327330 " flat_map keys and mapped containers have different size" );
328331 _LIBCPP_ASSERT_SEMANTIC_REQUIREMENT (
329- __is_sorted_and_unique (__containers .keys ), " Either the key container is not sorted or it contains duplicates" );
332+ __is_sorted_and_unique (__containers_ .keys ), " Either the key container is not sorted or it contains duplicates" );
330333 }
331334
332335 template <class _Allocator >
@@ -337,10 +340,10 @@ class flat_map {
337340 const mapped_container_type& __mapped_cont,
338341 const _Allocator& __alloc)
339342 : flat_map(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont) {
340- _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers .keys .size () == __containers .values .size (),
343+ _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers_ .keys .size () == __containers_ .values .size (),
341344 " flat_map keys and mapped containers have different size" );
342345 _LIBCPP_ASSERT_SEMANTIC_REQUIREMENT (
343- __is_sorted_and_unique (__containers .keys ), " Either the key container is not sorted or it contains duplicates" );
346+ __is_sorted_and_unique (__containers_ .keys ), " Either the key container is not sorted or it contains duplicates" );
344347 }
345348
346349 template <class _Allocator >
@@ -352,10 +355,10 @@ class flat_map {
352355 const key_compare& __comp,
353356 const _Allocator& __alloc)
354357 : flat_map(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont, __comp) {
355- _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers .keys .size () == __containers .values .size (),
358+ _LIBCPP_ASSERT_VALID_INPUT_RANGE (__containers_ .keys .size () == __containers_ .values .size (),
356359 " flat_map keys and mapped containers have different size" );
357360 _LIBCPP_ASSERT_SEMANTIC_REQUIREMENT (
358- __is_sorted_and_unique (__containers .keys ), " Either the key container is not sorted or it contains duplicates" );
361+ __is_sorted_and_unique (__containers_ .keys ), " Either the key container is not sorted or it contains duplicates" );
359362 }
360363
361364 _LIBCPP_HIDE_FROM_ABI explicit flat_map (const key_compare& __comp) : __containers_(), __compare_(__comp) {}
@@ -512,7 +515,7 @@ class flat_map {
512515 }
513516
514517 _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin () noexcept { return reverse_iterator (end ()); }
515- _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin () const noexcept { const_reverse_iterator (end ()); }
518+ _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin () const noexcept { return const_reverse_iterator (end ()); }
516519 _LIBCPP_HIDE_FROM_ABI reverse_iterator rend () noexcept { return reverse_iterator (begin ()); }
517520 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend () const noexcept { return const_reverse_iterator (begin ()); }
518521
@@ -982,7 +985,7 @@ class flat_map {
982985 ranges::stable_sort (__zv.begin () + __append_start_offset, __end, __compare_key);
983986 } else {
984987 _LIBCPP_ASSERT_SEMANTIC_REQUIREMENT (
985- __is_sorted_and_unique (__containers .keys | views::drop (__append_start_offset)),
988+ __is_sorted_and_unique (__containers_ .keys | views::drop (__append_start_offset)),
986989 " Either the key container is not sorted or it contains duplicates" );
987990 }
988991 ranges::inplace_merge (__zv.begin (), __zv.begin () + __append_start_offset, __end, __compare_key);
@@ -1344,4 +1347,6 @@ _LIBCPP_END_NAMESPACE_STD
13441347
13451348#endif // _LIBCPP_STD_VER >= 23
13461349
1350+ _LIBCPP_POP_MACROS
1351+
13471352#endif // _LIBCPP___FLAT_MAP_FLAT_MAP_H
0 commit comments