[libcxx-commits] [libcxx] [libcxx] removes non-customisation-point objects from `__cpo` namespace (PR #76542)

Christopher Di Bella via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 28 14:53:44 PST 2023


https://github.com/cjdb created https://github.com/llvm/llvm-project/pull/76542

Customisation-point objects often rely on ADL as a hook for users to customise their behaviour. This requires a function declaration with the same name as the CPO (which is a function object) in the same scope as the CPO. The technique for getting around having both a function and a function object in the same scope is to put the CPO inside an inline namespace: the function is declared as deleted, and so only the CPO can be called.

The iterator primitive functions and algorithms in `std::ranges` are not CPOs and thus do not need to be in the `__cpo` namespace.

>From fbe6e8fc0615e675f84f9ed35ccd3332c6441500 Mon Sep 17 00:00:00 2001
From: Christopher Di Bella <cjdb at google.com>
Date: Thu, 28 Dec 2023 22:38:21 +0000
Subject: [PATCH] [libcxx] removes non-customisation-point objects from `__cpo`
 namespace

Customisation-point objects often rely on ADL as a hook for users to
customise their behaviour. This requires a function declaration with
the same name as the CPO (which is a function object) in the same scope
as the CPO. The technique for getting around having both a function and
a function object in the same scope is to put the CPO inside an inline
namespace: the function is declared as deleted, and so only the CPO can
be called.

The iterator primitive functions and algorithms in `std::ranges` are not
CPOs and thus do not need to be in the `__cpo` namespace.
---
 .../__algorithm/ranges_adjacent_find.h        |  2 --
 libcxx/include/__algorithm/ranges_all_of.h    |  2 --
 libcxx/include/__algorithm/ranges_any_of.h    |  2 --
 .../__algorithm/ranges_binary_search.h        |  2 --
 libcxx/include/__algorithm/ranges_clamp.h     |  2 --
 libcxx/include/__algorithm/ranges_contains.h  |  2 --
 libcxx/include/__algorithm/ranges_copy.h      |  2 --
 .../__algorithm/ranges_copy_backward.h        |  2 --
 libcxx/include/__algorithm/ranges_copy_if.h   |  2 --
 libcxx/include/__algorithm/ranges_copy_n.h    |  2 --
 libcxx/include/__algorithm/ranges_count.h     |  2 --
 libcxx/include/__algorithm/ranges_count_if.h  |  2 --
 libcxx/include/__algorithm/ranges_ends_with.h |  2 --
 libcxx/include/__algorithm/ranges_equal.h     |  2 --
 .../include/__algorithm/ranges_equal_range.h  |  2 --
 libcxx/include/__algorithm/ranges_fill.h      |  2 --
 libcxx/include/__algorithm/ranges_fill_n.h    |  2 --
 libcxx/include/__algorithm/ranges_find.h      |  2 --
 libcxx/include/__algorithm/ranges_find_end.h  |  2 --
 .../__algorithm/ranges_find_first_of.h        |  2 --
 libcxx/include/__algorithm/ranges_find_if.h   |  2 --
 .../include/__algorithm/ranges_find_if_not.h  |  2 --
 libcxx/include/__algorithm/ranges_for_each.h  |  2 --
 .../include/__algorithm/ranges_for_each_n.h   |  2 --
 libcxx/include/__algorithm/ranges_generate.h  |  2 --
 .../include/__algorithm/ranges_generate_n.h   |  2 --
 libcxx/include/__algorithm/ranges_includes.h  |  2 --
 .../__algorithm/ranges_inplace_merge.h        |  2 --
 libcxx/include/__algorithm/ranges_is_heap.h   |  2 --
 .../__algorithm/ranges_is_heap_until.h        |  2 --
 .../__algorithm/ranges_is_partitioned.h       |  2 --
 .../__algorithm/ranges_is_permutation.h       |  2 --
 libcxx/include/__algorithm/ranges_is_sorted.h |  2 --
 .../__algorithm/ranges_is_sorted_until.h      |  2 --
 .../ranges_lexicographical_compare.h          |  2 --
 .../include/__algorithm/ranges_lower_bound.h  |  2 --
 libcxx/include/__algorithm/ranges_make_heap.h |  2 --
 libcxx/include/__algorithm/ranges_max.h       |  2 --
 .../include/__algorithm/ranges_max_element.h  |  2 --
 libcxx/include/__algorithm/ranges_merge.h     |  2 --
 libcxx/include/__algorithm/ranges_min.h       |  2 --
 .../include/__algorithm/ranges_min_element.h  |  2 --
 libcxx/include/__algorithm/ranges_minmax.h    |  2 --
 .../__algorithm/ranges_minmax_element.h       |  2 --
 libcxx/include/__algorithm/ranges_mismatch.h  |  2 --
 libcxx/include/__algorithm/ranges_move.h      |  2 --
 .../__algorithm/ranges_move_backward.h        |  2 --
 .../__algorithm/ranges_next_permutation.h     |  2 --
 libcxx/include/__algorithm/ranges_none_of.h   |  2 --
 .../include/__algorithm/ranges_nth_element.h  |  2 --
 .../include/__algorithm/ranges_partial_sort.h |  2 --
 .../__algorithm/ranges_partial_sort_copy.h    |  2 --
 libcxx/include/__algorithm/ranges_partition.h |  2 --
 .../__algorithm/ranges_partition_copy.h       |  2 --
 .../__algorithm/ranges_partition_point.h      |  2 --
 libcxx/include/__algorithm/ranges_pop_heap.h  |  2 --
 .../__algorithm/ranges_prev_permutation.h     |  2 --
 libcxx/include/__algorithm/ranges_push_heap.h |  2 --
 libcxx/include/__algorithm/ranges_remove.h    |  2 --
 .../include/__algorithm/ranges_remove_copy.h  |  2 --
 .../__algorithm/ranges_remove_copy_if.h       |  2 --
 libcxx/include/__algorithm/ranges_remove_if.h |  2 --
 libcxx/include/__algorithm/ranges_replace.h   |  2 --
 .../include/__algorithm/ranges_replace_copy.h |  2 --
 .../__algorithm/ranges_replace_copy_if.h      |  2 --
 .../include/__algorithm/ranges_replace_if.h   |  2 --
 libcxx/include/__algorithm/ranges_reverse.h   |  2 --
 .../include/__algorithm/ranges_reverse_copy.h |  2 --
 libcxx/include/__algorithm/ranges_rotate.h    |  2 --
 .../include/__algorithm/ranges_rotate_copy.h  |  2 --
 libcxx/include/__algorithm/ranges_sample.h    |  2 --
 libcxx/include/__algorithm/ranges_search.h    |  2 --
 libcxx/include/__algorithm/ranges_search_n.h  |  2 --
 .../__algorithm/ranges_set_difference.h       |  2 --
 .../__algorithm/ranges_set_intersection.h     |  2 --
 .../ranges_set_symmetric_difference.h         |  2 --
 libcxx/include/__algorithm/ranges_set_union.h |  2 --
 libcxx/include/__algorithm/ranges_shuffle.h   |  2 --
 libcxx/include/__algorithm/ranges_sort.h      |  2 --
 libcxx/include/__algorithm/ranges_sort_heap.h |  2 --
 .../__algorithm/ranges_stable_partition.h     |  2 --
 .../include/__algorithm/ranges_stable_sort.h  |  2 --
 .../include/__algorithm/ranges_starts_with.h  |  2 --
 .../include/__algorithm/ranges_swap_ranges.h  |  2 --
 libcxx/include/__algorithm/ranges_transform.h |  2 --
 libcxx/include/__algorithm/ranges_unique.h    |  2 --
 .../include/__algorithm/ranges_unique_copy.h  |  2 --
 .../include/__algorithm/ranges_upper_bound.h  |  2 --
 libcxx/include/__iterator/advance.h           |  2 --
 libcxx/include/__iterator/distance.h          |  2 --
 libcxx/include/__iterator/next.h              |  2 --
 libcxx/include/__iterator/prev.h              |  2 --
 libcxx/include/__memory/ranges_construct_at.h |  8 --------
 .../ranges_uninitialized_algorithms.h         | 20 -------------------
 94 files changed, 212 deletions(-)

diff --git a/libcxx/include/__algorithm/ranges_adjacent_find.h b/libcxx/include/__algorithm/ranges_adjacent_find.h
index a10b04167ede69..fb73227a2f969c 100644
--- a/libcxx/include/__algorithm/ranges_adjacent_find.h
+++ b/libcxx/include/__algorithm/ranges_adjacent_find.h
@@ -69,9 +69,7 @@ struct __fn {
 };
 } // namespace __adjacent_find
 
-inline namespace __cpo {
 inline constexpr auto adjacent_find = __adjacent_find::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_all_of.h b/libcxx/include/__algorithm/ranges_all_of.h
index 39a2ae4de01e99..ee733131ee572e 100644
--- a/libcxx/include/__algorithm/ranges_all_of.h
+++ b/libcxx/include/__algorithm/ranges_all_of.h
@@ -57,9 +57,7 @@ struct __fn {
 };
 } // namespace __all_of
 
-inline namespace __cpo {
 inline constexpr auto all_of = __all_of::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_any_of.h b/libcxx/include/__algorithm/ranges_any_of.h
index 2ca8531102eac6..e9786a3d336bf6 100644
--- a/libcxx/include/__algorithm/ranges_any_of.h
+++ b/libcxx/include/__algorithm/ranges_any_of.h
@@ -57,9 +57,7 @@ struct __fn {
 };
 } // namespace __any_of
 
-inline namespace __cpo {
 inline constexpr auto any_of = __any_of::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_binary_search.h b/libcxx/include/__algorithm/ranges_binary_search.h
index 22008e0f1bc8f6..cbf487e78c74bb 100644
--- a/libcxx/include/__algorithm/ranges_binary_search.h
+++ b/libcxx/include/__algorithm/ranges_binary_search.h
@@ -56,9 +56,7 @@ struct __fn {
 };
 } // namespace __binary_search
 
-inline namespace __cpo {
 inline constexpr auto binary_search = __binary_search::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_clamp.h b/libcxx/include/__algorithm/ranges_clamp.h
index e6c86207254a19..a24043f2ee1c83 100644
--- a/libcxx/include/__algorithm/ranges_clamp.h
+++ b/libcxx/include/__algorithm/ranges_clamp.h
@@ -48,9 +48,7 @@ struct __fn {
 };
 } // namespace __clamp
 
-inline namespace __cpo {
 inline constexpr auto clamp = __clamp::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_contains.h b/libcxx/include/__algorithm/ranges_contains.h
index f92fcec587d858..95b4e463191adb 100644
--- a/libcxx/include/__algorithm/ranges_contains.h
+++ b/libcxx/include/__algorithm/ranges_contains.h
@@ -49,9 +49,7 @@ struct __fn {
 };
 } // namespace __contains
 
-inline namespace __cpo {
 inline constexpr auto contains = __contains::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_copy.h b/libcxx/include/__algorithm/ranges_copy.h
index 1c87f074e7cab9..f16db0ed557e9c 100644
--- a/libcxx/include/__algorithm/ranges_copy.h
+++ b/libcxx/include/__algorithm/ranges_copy.h
@@ -54,9 +54,7 @@ struct __fn {
 };
 } // namespace __copy
 
-inline namespace __cpo {
 inline constexpr auto copy = __copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_copy_backward.h b/libcxx/include/__algorithm/ranges_copy_backward.h
index 865e944d4384dd..023bc69862d2fb 100644
--- a/libcxx/include/__algorithm/ranges_copy_backward.h
+++ b/libcxx/include/__algorithm/ranges_copy_backward.h
@@ -52,9 +52,7 @@ struct __fn {
 };
 } // namespace __copy_backward
 
-inline namespace __cpo {
 inline constexpr auto copy_backward = __copy_backward::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_copy_if.h b/libcxx/include/__algorithm/ranges_copy_if.h
index b77dbd37fcee3a..3b07b2083ce45f 100644
--- a/libcxx/include/__algorithm/ranges_copy_if.h
+++ b/libcxx/include/__algorithm/ranges_copy_if.h
@@ -70,9 +70,7 @@ struct __fn {
 };
 } // namespace __copy_if
 
-inline namespace __cpo {
 inline constexpr auto copy_if = __copy_if::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_copy_n.h b/libcxx/include/__algorithm/ranges_copy_n.h
index 99e8eee14d0f83..48c2c227c22ec2 100644
--- a/libcxx/include/__algorithm/ranges_copy_n.h
+++ b/libcxx/include/__algorithm/ranges_copy_n.h
@@ -64,9 +64,7 @@ struct __fn {
 };
 } // namespace __copy_n
 
-inline namespace __cpo {
 inline constexpr auto copy_n = __copy_n::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 #endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__algorithm/ranges_count.h b/libcxx/include/__algorithm/ranges_count.h
index 4c8f1b2cbea7e4..294726e6e3508d 100644
--- a/libcxx/include/__algorithm/ranges_count.h
+++ b/libcxx/include/__algorithm/ranges_count.h
@@ -49,9 +49,7 @@ struct __fn {
 };
 } // namespace __count
 
-inline namespace __cpo {
 inline constexpr auto count = __count::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_count_if.h b/libcxx/include/__algorithm/ranges_count_if.h
index 92f37d049e0c4d..728b7886441de7 100644
--- a/libcxx/include/__algorithm/ranges_count_if.h
+++ b/libcxx/include/__algorithm/ranges_count_if.h
@@ -62,9 +62,7 @@ struct __fn {
 };
 } // namespace __count_if
 
-inline namespace __cpo {
 inline constexpr auto count_if = __count_if::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_ends_with.h b/libcxx/include/__algorithm/ranges_ends_with.h
index 2afb74bff0f152..e2e614615d4cc5 100644
--- a/libcxx/include/__algorithm/ranges_ends_with.h
+++ b/libcxx/include/__algorithm/ranges_ends_with.h
@@ -184,9 +184,7 @@ struct __fn {
 };
 } // namespace __ends_with
 
-inline namespace __cpo {
 inline constexpr auto ends_with = __ends_with::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_equal.h b/libcxx/include/__algorithm/ranges_equal.h
index 4cb1f7df1952e5..354fbd88e77d53 100644
--- a/libcxx/include/__algorithm/ranges_equal.h
+++ b/libcxx/include/__algorithm/ranges_equal.h
@@ -92,9 +92,7 @@ struct __fn {
 };
 } // namespace __equal
 
-inline namespace __cpo {
 inline constexpr auto equal = __equal::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_equal_range.h b/libcxx/include/__algorithm/ranges_equal_range.h
index 1ff8856ca03f1e..9ae6e8ce7642c6 100644
--- a/libcxx/include/__algorithm/ranges_equal_range.h
+++ b/libcxx/include/__algorithm/ranges_equal_range.h
@@ -63,9 +63,7 @@ struct __fn {
 
 } // namespace __equal_range
 
-inline namespace __cpo {
 inline constexpr auto equal_range = __equal_range::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_fill.h b/libcxx/include/__algorithm/ranges_fill.h
index 88a892f5c27865..8b4d393e9e69cc 100644
--- a/libcxx/include/__algorithm/ranges_fill.h
+++ b/libcxx/include/__algorithm/ranges_fill.h
@@ -45,9 +45,7 @@ struct __fn {
 };
 } // namespace __fill
 
-inline namespace __cpo {
 inline constexpr auto fill = __fill::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_fill_n.h b/libcxx/include/__algorithm/ranges_fill_n.h
index dbd8ec27aef9f5..6385ebc0601d40 100644
--- a/libcxx/include/__algorithm/ranges_fill_n.h
+++ b/libcxx/include/__algorithm/ranges_fill_n.h
@@ -36,9 +36,7 @@ struct __fn {
 };
 } // namespace __fill_n
 
-inline namespace __cpo {
 inline constexpr auto fill_n = __fill_n::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_find.h b/libcxx/include/__algorithm/ranges_find.h
index de870e381184c6..a1511705a6b963 100644
--- a/libcxx/include/__algorithm/ranges_find.h
+++ b/libcxx/include/__algorithm/ranges_find.h
@@ -63,9 +63,7 @@ struct __fn {
 };
 } // namespace __find
 
-inline namespace __cpo {
 inline constexpr auto find = __find::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_find_end.h b/libcxx/include/__algorithm/ranges_find_end.h
index 2c57ad424bfdea..86941e15d89e1d 100644
--- a/libcxx/include/__algorithm/ranges_find_end.h
+++ b/libcxx/include/__algorithm/ranges_find_end.h
@@ -86,9 +86,7 @@ struct __fn {
 };
 } // namespace __find_end
 
-inline namespace __cpo {
 inline constexpr auto find_end = __find_end::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_find_first_of.h b/libcxx/include/__algorithm/ranges_find_first_of.h
index ec6d52c63250b5..a0412c60d03e6d 100644
--- a/libcxx/include/__algorithm/ranges_find_first_of.h
+++ b/libcxx/include/__algorithm/ranges_find_first_of.h
@@ -89,9 +89,7 @@ struct __fn {
 };
 } // namespace __find_first_of
 
-inline namespace __cpo {
 inline constexpr auto find_first_of = __find_first_of::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_find_if.h b/libcxx/include/__algorithm/ranges_find_if.h
index af54a5007ee259..5afe7d0368a716 100644
--- a/libcxx/include/__algorithm/ranges_find_if.h
+++ b/libcxx/include/__algorithm/ranges_find_if.h
@@ -58,9 +58,7 @@ struct __fn {
 };
 } // namespace __find_if
 
-inline namespace __cpo {
 inline constexpr auto find_if = __find_if::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_find_if_not.h b/libcxx/include/__algorithm/ranges_find_if_not.h
index a18bea43165e0d..572e929cafa5bd 100644
--- a/libcxx/include/__algorithm/ranges_find_if_not.h
+++ b/libcxx/include/__algorithm/ranges_find_if_not.h
@@ -52,9 +52,7 @@ struct __fn {
 };
 } // namespace __find_if_not
 
-inline namespace __cpo {
 inline constexpr auto find_if_not = __find_if_not::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_for_each.h b/libcxx/include/__algorithm/ranges_for_each.h
index 7878ed26709fb6..13573f887df385 100644
--- a/libcxx/include/__algorithm/ranges_for_each.h
+++ b/libcxx/include/__algorithm/ranges_for_each.h
@@ -64,9 +64,7 @@ struct __fn {
 };
 } // namespace __for_each
 
-inline namespace __cpo {
 inline constexpr auto for_each = __for_each::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_for_each_n.h b/libcxx/include/__algorithm/ranges_for_each_n.h
index 53ccb9a6035a48..eeaf41398b3bb2 100644
--- a/libcxx/include/__algorithm/ranges_for_each_n.h
+++ b/libcxx/include/__algorithm/ranges_for_each_n.h
@@ -47,9 +47,7 @@ struct __fn {
 };
 } // namespace __for_each_n
 
-inline namespace __cpo {
 inline constexpr auto for_each_n = __for_each_n::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_generate.h b/libcxx/include/__algorithm/ranges_generate.h
index 3ff1e13c422090..75343e3846fcf7 100644
--- a/libcxx/include/__algorithm/ranges_generate.h
+++ b/libcxx/include/__algorithm/ranges_generate.h
@@ -56,9 +56,7 @@ struct __fn {
 
 } // namespace __generate
 
-inline namespace __cpo {
 inline constexpr auto generate = __generate::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_generate_n.h b/libcxx/include/__algorithm/ranges_generate_n.h
index c025c621a191c2..4ab7795699a653 100644
--- a/libcxx/include/__algorithm/ranges_generate_n.h
+++ b/libcxx/include/__algorithm/ranges_generate_n.h
@@ -48,9 +48,7 @@ struct __fn {
 
 } // namespace __generate_n
 
-inline namespace __cpo {
 inline constexpr auto generate_n = __generate_n::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_includes.h b/libcxx/include/__algorithm/ranges_includes.h
index aa35080c8cfd4b..e7da9427115d22 100644
--- a/libcxx/include/__algorithm/ranges_includes.h
+++ b/libcxx/include/__algorithm/ranges_includes.h
@@ -81,9 +81,7 @@ struct __fn {
 
 } // namespace __includes
 
-inline namespace __cpo {
 inline constexpr auto includes = __includes::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_inplace_merge.h b/libcxx/include/__algorithm/ranges_inplace_merge.h
index 86001b003d5ca1..c483d322618a57 100644
--- a/libcxx/include/__algorithm/ranges_inplace_merge.h
+++ b/libcxx/include/__algorithm/ranges_inplace_merge.h
@@ -67,9 +67,7 @@ struct __fn {
 
 } // namespace __inplace_merge
 
-inline namespace __cpo {
 inline constexpr auto inplace_merge = __inplace_merge::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_is_heap.h b/libcxx/include/__algorithm/ranges_is_heap.h
index f298c347b747a0..08a70eee8e650d 100644
--- a/libcxx/include/__algorithm/ranges_is_heap.h
+++ b/libcxx/include/__algorithm/ranges_is_heap.h
@@ -64,9 +64,7 @@ struct __fn {
 
 } // namespace __is_heap
 
-inline namespace __cpo {
 inline constexpr auto is_heap = __is_heap::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_is_heap_until.h b/libcxx/include/__algorithm/ranges_is_heap_until.h
index 73f13fb50440ec..dfa9a2ba3072f2 100644
--- a/libcxx/include/__algorithm/ranges_is_heap_until.h
+++ b/libcxx/include/__algorithm/ranges_is_heap_until.h
@@ -64,9 +64,7 @@ struct __fn {
 
 } // namespace __is_heap_until
 
-inline namespace __cpo {
 inline constexpr auto is_heap_until = __is_heap_until::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_is_partitioned.h b/libcxx/include/__algorithm/ranges_is_partitioned.h
index 76db870efc7073..2ce5d4c7ea2191 100644
--- a/libcxx/include/__algorithm/ranges_is_partitioned.h
+++ b/libcxx/include/__algorithm/ranges_is_partitioned.h
@@ -69,9 +69,7 @@ struct __fn {
 };
 } // namespace __is_partitioned
 
-inline namespace __cpo {
 inline constexpr auto is_partitioned = __is_partitioned::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_is_permutation.h b/libcxx/include/__algorithm/ranges_is_permutation.h
index 2b99839bc66fa7..2959bce00e0d13 100644
--- a/libcxx/include/__algorithm/ranges_is_permutation.h
+++ b/libcxx/include/__algorithm/ranges_is_permutation.h
@@ -90,9 +90,7 @@ struct __fn {
 };
 } // namespace __is_permutation
 
-inline namespace __cpo {
 inline constexpr auto is_permutation = __is_permutation::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_is_sorted.h b/libcxx/include/__algorithm/ranges_is_sorted.h
index 3eb2c768d66a20..b6e028a15a0570 100644
--- a/libcxx/include/__algorithm/ranges_is_sorted.h
+++ b/libcxx/include/__algorithm/ranges_is_sorted.h
@@ -50,9 +50,7 @@ struct __fn {
 };
 } // namespace __is_sorted
 
-inline namespace __cpo {
 inline constexpr auto is_sorted = __is_sorted::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_is_sorted_until.h b/libcxx/include/__algorithm/ranges_is_sorted_until.h
index 19e9875d2757d4..3eeaac93e73a42 100644
--- a/libcxx/include/__algorithm/ranges_is_sorted_until.h
+++ b/libcxx/include/__algorithm/ranges_is_sorted_until.h
@@ -65,9 +65,7 @@ struct __fn {
 };
 } // namespace __is_sorted_until
 
-inline namespace __cpo {
 inline constexpr auto is_sorted_until = __is_sorted_until::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_lexicographical_compare.h b/libcxx/include/__algorithm/ranges_lexicographical_compare.h
index 5b843dfd7b3139..06a44d10aacefa 100644
--- a/libcxx/include/__algorithm/ranges_lexicographical_compare.h
+++ b/libcxx/include/__algorithm/ranges_lexicographical_compare.h
@@ -89,9 +89,7 @@ struct __fn {
 };
 } // namespace __lexicographical_compare
 
-inline namespace __cpo {
 inline constexpr auto lexicographical_compare = __lexicographical_compare::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_lower_bound.h b/libcxx/include/__algorithm/ranges_lower_bound.h
index 58b3f815b96a45..7b396fd8f31c80 100644
--- a/libcxx/include/__algorithm/ranges_lower_bound.h
+++ b/libcxx/include/__algorithm/ranges_lower_bound.h
@@ -56,9 +56,7 @@ struct __fn {
 };
 } // namespace __lower_bound
 
-inline namespace __cpo {
 inline constexpr auto lower_bound = __lower_bound::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_make_heap.h b/libcxx/include/__algorithm/ranges_make_heap.h
index f17eabff43d2a1..7f472e905e5694 100644
--- a/libcxx/include/__algorithm/ranges_make_heap.h
+++ b/libcxx/include/__algorithm/ranges_make_heap.h
@@ -68,9 +68,7 @@ struct __fn {
 
 } // namespace __make_heap
 
-inline namespace __cpo {
 inline constexpr auto make_heap = __make_heap::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_max.h b/libcxx/include/__algorithm/ranges_max.h
index 0f89cb2ff5bf22..cf15617cec263c 100644
--- a/libcxx/include/__algorithm/ranges_max.h
+++ b/libcxx/include/__algorithm/ranges_max.h
@@ -89,9 +89,7 @@ struct __fn {
 };
 } // namespace __max
 
-inline namespace __cpo {
 inline constexpr auto max = __max::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_max_element.h b/libcxx/include/__algorithm/ranges_max_element.h
index 2ba97042f1f6e0..2410c38f412d5d 100644
--- a/libcxx/include/__algorithm/ranges_max_element.h
+++ b/libcxx/include/__algorithm/ranges_max_element.h
@@ -52,9 +52,7 @@ struct __fn {
 };
 } // namespace __max_element
 
-inline namespace __cpo {
 inline constexpr auto max_element = __max_element::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_merge.h b/libcxx/include/__algorithm/ranges_merge.h
index 7f49154ec9221f..5136893a268306 100644
--- a/libcxx/include/__algorithm/ranges_merge.h
+++ b/libcxx/include/__algorithm/ranges_merge.h
@@ -121,9 +121,7 @@ struct __fn {
 
 } // namespace __merge
 
-inline namespace __cpo {
 inline constexpr auto merge = __merge::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_min.h b/libcxx/include/__algorithm/ranges_min.h
index 8757358cdf37d9..194fe62cbd5e9b 100644
--- a/libcxx/include/__algorithm/ranges_min.h
+++ b/libcxx/include/__algorithm/ranges_min.h
@@ -81,9 +81,7 @@ struct __fn {
 };
 } // namespace __min
 
-inline namespace __cpo {
 inline constexpr auto min = __min::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_min_element.h b/libcxx/include/__algorithm/ranges_min_element.h
index 07826a0e6b817a..e9ff7c2a63a718 100644
--- a/libcxx/include/__algorithm/ranges_min_element.h
+++ b/libcxx/include/__algorithm/ranges_min_element.h
@@ -64,9 +64,7 @@ struct __fn {
 };
 } // namespace __min_element
 
-inline namespace __cpo {
 inline constexpr auto min_element = __min_element::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_minmax.h b/libcxx/include/__algorithm/ranges_minmax.h
index 22a62b620c936f..9540a236830f06 100644
--- a/libcxx/include/__algorithm/ranges_minmax.h
+++ b/libcxx/include/__algorithm/ranges_minmax.h
@@ -146,9 +146,7 @@ struct __fn {
 };
 } // namespace __minmax
 
-inline namespace __cpo {
 inline constexpr auto minmax = __minmax::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_minmax_element.h b/libcxx/include/__algorithm/ranges_minmax_element.h
index a52319f6b5d3fd..31c842254b4e79 100644
--- a/libcxx/include/__algorithm/ranges_minmax_element.h
+++ b/libcxx/include/__algorithm/ranges_minmax_element.h
@@ -60,9 +60,7 @@ struct __fn {
 };
 } // namespace __minmax_element
 
-inline namespace __cpo {
 inline constexpr auto minmax_element = __minmax_element::__fn{};
-} // namespace __cpo
 
 } // namespace ranges
 
diff --git a/libcxx/include/__algorithm/ranges_mismatch.h b/libcxx/include/__algorithm/ranges_mismatch.h
index db9bfc8e87db67..3d4d8d86ffce21 100644
--- a/libcxx/include/__algorithm/ranges_mismatch.h
+++ b/libcxx/include/__algorithm/ranges_mismatch.h
@@ -77,9 +77,7 @@ struct __fn {
 };
 } // namespace __mismatch
 
-inline namespace __cpo {
 constexpr inline auto mismatch = __mismatch::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 #endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__algorithm/ranges_move.h b/libcxx/include/__algorithm/ranges_move.h
index 8bd2409f891c05..4f35eff8dd48e4 100644
--- a/libcxx/include/__algorithm/ranges_move.h
+++ b/libcxx/include/__algorithm/ranges_move.h
@@ -57,9 +57,7 @@ struct __fn {
 };
 } // namespace __move
 
-inline namespace __cpo {
 inline constexpr auto move = __move::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_move_backward.h b/libcxx/include/__algorithm/ranges_move_backward.h
index ee390a40e489a4..6c01a0fec5706b 100644
--- a/libcxx/include/__algorithm/ranges_move_backward.h
+++ b/libcxx/include/__algorithm/ranges_move_backward.h
@@ -59,9 +59,7 @@ struct __fn {
 };
 } // namespace __move_backward
 
-inline namespace __cpo {
 inline constexpr auto move_backward = __move_backward::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_next_permutation.h b/libcxx/include/__algorithm/ranges_next_permutation.h
index 9ebab3ea7c13bd..6851f3f412a915 100644
--- a/libcxx/include/__algorithm/ranges_next_permutation.h
+++ b/libcxx/include/__algorithm/ranges_next_permutation.h
@@ -61,9 +61,7 @@ struct __fn {
 
 } // namespace __next_permutation
 
-inline namespace __cpo {
 constexpr inline auto next_permutation = __next_permutation::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_none_of.h b/libcxx/include/__algorithm/ranges_none_of.h
index b0d363895e000b..db3a556053cbb4 100644
--- a/libcxx/include/__algorithm/ranges_none_of.h
+++ b/libcxx/include/__algorithm/ranges_none_of.h
@@ -58,9 +58,7 @@ struct __fn {
 };
 } // namespace __none_of
 
-inline namespace __cpo {
 inline constexpr auto none_of = __none_of::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_nth_element.h b/libcxx/include/__algorithm/ranges_nth_element.h
index 7abdbd0889e0cb..b8db59e1ffbd13 100644
--- a/libcxx/include/__algorithm/ranges_nth_element.h
+++ b/libcxx/include/__algorithm/ranges_nth_element.h
@@ -67,9 +67,7 @@ struct __fn {
 
 } // namespace __nth_element
 
-inline namespace __cpo {
 inline constexpr auto nth_element = __nth_element::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_partial_sort.h b/libcxx/include/__algorithm/ranges_partial_sort.h
index 9ec8882097d784..25bdba51d7bde1 100644
--- a/libcxx/include/__algorithm/ranges_partial_sort.h
+++ b/libcxx/include/__algorithm/ranges_partial_sort.h
@@ -65,9 +65,7 @@ struct __fn {
 
 } // namespace __partial_sort
 
-inline namespace __cpo {
 inline constexpr auto partial_sort = __partial_sort::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_partial_sort_copy.h b/libcxx/include/__algorithm/ranges_partial_sort_copy.h
index eba7d9ac416576..dbc77ffcd1c386 100644
--- a/libcxx/include/__algorithm/ranges_partial_sort_copy.h
+++ b/libcxx/include/__algorithm/ranges_partial_sort_copy.h
@@ -97,9 +97,7 @@ struct __fn {
 
 } // namespace __partial_sort_copy
 
-inline namespace __cpo {
 inline constexpr auto partial_sort_copy = __partial_sort_copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_partition.h b/libcxx/include/__algorithm/ranges_partition.h
index 89d192b51fd329..dde9c67438e415 100644
--- a/libcxx/include/__algorithm/ranges_partition.h
+++ b/libcxx/include/__algorithm/ranges_partition.h
@@ -71,9 +71,7 @@ struct __fn {
 
 } // namespace __partition
 
-inline namespace __cpo {
 inline constexpr auto partition = __partition::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_partition_copy.h b/libcxx/include/__algorithm/ranges_partition_copy.h
index 6a16b02db3e554..f6d724736245cf 100644
--- a/libcxx/include/__algorithm/ranges_partition_copy.h
+++ b/libcxx/include/__algorithm/ranges_partition_copy.h
@@ -93,9 +93,7 @@ struct __fn {
 
 } // namespace __partition_copy
 
-inline namespace __cpo {
 inline constexpr auto partition_copy = __partition_copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_partition_point.h b/libcxx/include/__algorithm/ranges_partition_point.h
index 6fc20e7d00e9f6..77e57b976a669c 100644
--- a/libcxx/include/__algorithm/ranges_partition_point.h
+++ b/libcxx/include/__algorithm/ranges_partition_point.h
@@ -76,9 +76,7 @@ struct __fn {
 
 } // namespace __partition_point
 
-inline namespace __cpo {
 inline constexpr auto partition_point = __partition_point::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_pop_heap.h b/libcxx/include/__algorithm/ranges_pop_heap.h
index 364cfe94b161e3..10b017a1a3ba82 100644
--- a/libcxx/include/__algorithm/ranges_pop_heap.h
+++ b/libcxx/include/__algorithm/ranges_pop_heap.h
@@ -69,9 +69,7 @@ struct __fn {
 
 } // namespace __pop_heap
 
-inline namespace __cpo {
 inline constexpr auto pop_heap = __pop_heap::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_prev_permutation.h b/libcxx/include/__algorithm/ranges_prev_permutation.h
index ae7a68cce5fdc6..3225b3dfc79545 100644
--- a/libcxx/include/__algorithm/ranges_prev_permutation.h
+++ b/libcxx/include/__algorithm/ranges_prev_permutation.h
@@ -61,9 +61,7 @@ struct __fn {
 
 } // namespace __prev_permutation
 
-inline namespace __cpo {
 constexpr inline auto prev_permutation = __prev_permutation::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_push_heap.h b/libcxx/include/__algorithm/ranges_push_heap.h
index 1ed9c953f54c35..61dc9e53d94529 100644
--- a/libcxx/include/__algorithm/ranges_push_heap.h
+++ b/libcxx/include/__algorithm/ranges_push_heap.h
@@ -68,9 +68,7 @@ struct __fn {
 
 } // namespace __push_heap
 
-inline namespace __cpo {
 inline constexpr auto push_heap = __push_heap::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_remove.h b/libcxx/include/__algorithm/ranges_remove.h
index e27c4bdd733d81..911252b6715410 100644
--- a/libcxx/include/__algorithm/ranges_remove.h
+++ b/libcxx/include/__algorithm/ranges_remove.h
@@ -51,9 +51,7 @@ struct __fn {
 };
 } // namespace __remove
 
-inline namespace __cpo {
 inline constexpr auto remove = __remove::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_remove_copy.h b/libcxx/include/__algorithm/ranges_remove_copy.h
index 5158a78e481405..7da20338f1655a 100644
--- a/libcxx/include/__algorithm/ranges_remove_copy.h
+++ b/libcxx/include/__algorithm/ranges_remove_copy.h
@@ -64,9 +64,7 @@ struct __fn {
 
 } // namespace __remove_copy
 
-inline namespace __cpo {
 inline constexpr auto remove_copy = __remove_copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_remove_copy_if.h b/libcxx/include/__algorithm/ranges_remove_copy_if.h
index c07b4813d7d0a9..10ea71d1bf785e 100644
--- a/libcxx/include/__algorithm/ranges_remove_copy_if.h
+++ b/libcxx/include/__algorithm/ranges_remove_copy_if.h
@@ -78,9 +78,7 @@ struct __fn {
 
 } // namespace __remove_copy_if
 
-inline namespace __cpo {
 inline constexpr auto remove_copy_if = __remove_copy_if::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_remove_if.h b/libcxx/include/__algorithm/ranges_remove_if.h
index 4b7aa2d2be78a8..719e10ad9a2e17 100644
--- a/libcxx/include/__algorithm/ranges_remove_if.h
+++ b/libcxx/include/__algorithm/ranges_remove_if.h
@@ -72,9 +72,7 @@ struct __fn {
 };
 } // namespace __remove_if
 
-inline namespace __cpo {
 inline constexpr auto remove_if = __remove_if::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_replace.h b/libcxx/include/__algorithm/ranges_replace.h
index b66a41aa8d0d77..7aa43475ed763c 100644
--- a/libcxx/include/__algorithm/ranges_replace.h
+++ b/libcxx/include/__algorithm/ranges_replace.h
@@ -51,9 +51,7 @@ struct __fn {
 };
 } // namespace __replace
 
-inline namespace __cpo {
 inline constexpr auto replace = __replace::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_replace_copy.h b/libcxx/include/__algorithm/ranges_replace_copy.h
index a7627024812fd2..d12da09a97949d 100644
--- a/libcxx/include/__algorithm/ranges_replace_copy.h
+++ b/libcxx/include/__algorithm/ranges_replace_copy.h
@@ -76,9 +76,7 @@ struct __fn {
 
 } // namespace __replace_copy
 
-inline namespace __cpo {
 inline constexpr auto replace_copy = __replace_copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_replace_copy_if.h b/libcxx/include/__algorithm/ranges_replace_copy_if.h
index 10ed1fda6c5c86..02b93ca8488e65 100644
--- a/libcxx/include/__algorithm/ranges_replace_copy_if.h
+++ b/libcxx/include/__algorithm/ranges_replace_copy_if.h
@@ -81,9 +81,7 @@ struct __fn {
 
 } // namespace __replace_copy_if
 
-inline namespace __cpo {
 inline constexpr auto replace_copy_if = __replace_copy_if::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_replace_if.h b/libcxx/include/__algorithm/ranges_replace_if.h
index 519fa32029ac67..bcc5bcad30ee60 100644
--- a/libcxx/include/__algorithm/ranges_replace_if.h
+++ b/libcxx/include/__algorithm/ranges_replace_if.h
@@ -64,9 +64,7 @@ struct __fn {
 };
 } // namespace __replace_if
 
-inline namespace __cpo {
 inline constexpr auto replace_if = __replace_if::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_reverse.h b/libcxx/include/__algorithm/ranges_reverse.h
index 9ec865995b4a54..1c74c64427fb97 100644
--- a/libcxx/include/__algorithm/ranges_reverse.h
+++ b/libcxx/include/__algorithm/ranges_reverse.h
@@ -67,9 +67,7 @@ struct __fn {
 };
 } // namespace __reverse
 
-inline namespace __cpo {
 inline constexpr auto reverse = __reverse::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_reverse_copy.h b/libcxx/include/__algorithm/ranges_reverse_copy.h
index 35b9edba0bfb26..533193e7b4bade 100644
--- a/libcxx/include/__algorithm/ranges_reverse_copy.h
+++ b/libcxx/include/__algorithm/ranges_reverse_copy.h
@@ -53,9 +53,7 @@ struct __fn {
 };
 } // namespace __reverse_copy
 
-inline namespace __cpo {
 inline constexpr auto reverse_copy = __reverse_copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_rotate.h b/libcxx/include/__algorithm/ranges_rotate.h
index ebed9bbd542665..e93e3afd168ef3 100644
--- a/libcxx/include/__algorithm/ranges_rotate.h
+++ b/libcxx/include/__algorithm/ranges_rotate.h
@@ -54,9 +54,7 @@ struct __fn {
 
 } // namespace __rotate
 
-inline namespace __cpo {
 inline constexpr auto rotate = __rotate::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_rotate_copy.h b/libcxx/include/__algorithm/ranges_rotate_copy.h
index ab76c0944c4771..71b9df2a3a33e0 100644
--- a/libcxx/include/__algorithm/ranges_rotate_copy.h
+++ b/libcxx/include/__algorithm/ranges_rotate_copy.h
@@ -51,9 +51,7 @@ struct __fn {
 };
 } // namespace __rotate_copy
 
-inline namespace __cpo {
 inline constexpr auto rotate_copy = __rotate_copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_sample.h b/libcxx/include/__algorithm/ranges_sample.h
index d347d82205a89d..1c83c5b7353526 100644
--- a/libcxx/include/__algorithm/ranges_sample.h
+++ b/libcxx/include/__algorithm/ranges_sample.h
@@ -57,9 +57,7 @@ struct __fn {
 
 } // namespace __sample
 
-inline namespace __cpo {
 inline constexpr auto sample = __sample::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_search.h b/libcxx/include/__algorithm/ranges_search.h
index ca2326e9ab2734..7dc9e89e23885d 100644
--- a/libcxx/include/__algorithm/ranges_search.h
+++ b/libcxx/include/__algorithm/ranges_search.h
@@ -122,9 +122,7 @@ struct __fn {
 };
 } // namespace __search
 
-inline namespace __cpo {
 inline constexpr auto search = __search::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_search_n.h b/libcxx/include/__algorithm/ranges_search_n.h
index 4e53f30f71f9d6..e82d98f755ec6e 100644
--- a/libcxx/include/__algorithm/ranges_search_n.h
+++ b/libcxx/include/__algorithm/ranges_search_n.h
@@ -99,9 +99,7 @@ struct __fn {
 };
 } // namespace __search_n
 
-inline namespace __cpo {
 inline constexpr auto search_n = __search_n::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_set_difference.h b/libcxx/include/__algorithm/ranges_set_difference.h
index a9453ed336f515..244bbad7ea1e01 100644
--- a/libcxx/include/__algorithm/ranges_set_difference.h
+++ b/libcxx/include/__algorithm/ranges_set_difference.h
@@ -92,9 +92,7 @@ struct __fn {
 
 } // namespace __set_difference
 
-inline namespace __cpo {
 inline constexpr auto set_difference = __set_difference::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_set_intersection.h b/libcxx/include/__algorithm/ranges_set_intersection.h
index 4cdcbb75051a1f..7a4b51bc8da644 100644
--- a/libcxx/include/__algorithm/ranges_set_intersection.h
+++ b/libcxx/include/__algorithm/ranges_set_intersection.h
@@ -97,9 +97,7 @@ struct __fn {
 
 } // namespace __set_intersection
 
-inline namespace __cpo {
 inline constexpr auto set_intersection = __set_intersection::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_set_symmetric_difference.h b/libcxx/include/__algorithm/ranges_set_symmetric_difference.h
index d8710a1c47b0bb..30d8370fe59229 100644
--- a/libcxx/include/__algorithm/ranges_set_symmetric_difference.h
+++ b/libcxx/include/__algorithm/ranges_set_symmetric_difference.h
@@ -97,9 +97,7 @@ struct __fn {
 
 } // namespace __set_symmetric_difference
 
-inline namespace __cpo {
 inline constexpr auto set_symmetric_difference = __set_symmetric_difference::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_set_union.h b/libcxx/include/__algorithm/ranges_set_union.h
index c627166fffed33..46f351d2ad65c2 100644
--- a/libcxx/include/__algorithm/ranges_set_union.h
+++ b/libcxx/include/__algorithm/ranges_set_union.h
@@ -98,9 +98,7 @@ struct __fn {
 
 } // namespace __set_union
 
-inline namespace __cpo {
 inline constexpr auto set_union = __set_union::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_shuffle.h b/libcxx/include/__algorithm/ranges_shuffle.h
index fca420058dec08..64fdb35cbc972e 100644
--- a/libcxx/include/__algorithm/ranges_shuffle.h
+++ b/libcxx/include/__algorithm/ranges_shuffle.h
@@ -55,9 +55,7 @@ struct __fn {
 
 } // namespace __shuffle
 
-inline namespace __cpo {
 inline constexpr auto shuffle = __shuffle::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_sort.h b/libcxx/include/__algorithm/ranges_sort.h
index 2ad0e0c233be48..ef54db29041e8a 100644
--- a/libcxx/include/__algorithm/ranges_sort.h
+++ b/libcxx/include/__algorithm/ranges_sort.h
@@ -67,9 +67,7 @@ struct __fn {
 
 } // namespace __sort
 
-inline namespace __cpo {
 inline constexpr auto sort = __sort::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_sort_heap.h b/libcxx/include/__algorithm/ranges_sort_heap.h
index 365c7dba615674..7b898085b7698a 100644
--- a/libcxx/include/__algorithm/ranges_sort_heap.h
+++ b/libcxx/include/__algorithm/ranges_sort_heap.h
@@ -68,9 +68,7 @@ struct __fn {
 
 } // namespace __sort_heap
 
-inline namespace __cpo {
 inline constexpr auto sort_heap = __sort_heap::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_stable_partition.h b/libcxx/include/__algorithm/ranges_stable_partition.h
index 44937fa5899082..7e89aec9c0610e 100644
--- a/libcxx/include/__algorithm/ranges_stable_partition.h
+++ b/libcxx/include/__algorithm/ranges_stable_partition.h
@@ -75,9 +75,7 @@ struct __fn {
 
 } // namespace __stable_partition
 
-inline namespace __cpo {
 inline constexpr auto stable_partition = __stable_partition::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_stable_sort.h b/libcxx/include/__algorithm/ranges_stable_sort.h
index a4eed3836356d4..e8bbaaf86f9b11 100644
--- a/libcxx/include/__algorithm/ranges_stable_sort.h
+++ b/libcxx/include/__algorithm/ranges_stable_sort.h
@@ -65,9 +65,7 @@ struct __fn {
 
 } // namespace __stable_sort
 
-inline namespace __cpo {
 inline constexpr auto stable_sort = __stable_sort::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_starts_with.h b/libcxx/include/__algorithm/ranges_starts_with.h
index 7da78001d8148d..41359e8b3f6a25 100644
--- a/libcxx/include/__algorithm/ranges_starts_with.h
+++ b/libcxx/include/__algorithm/ranges_starts_with.h
@@ -78,9 +78,7 @@ struct __fn {
   }
 };
 } // namespace __starts_with
-inline namespace __cpo {
 inline constexpr auto starts_with = __starts_with::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_swap_ranges.h b/libcxx/include/__algorithm/ranges_swap_ranges.h
index 1d0ebc0d5221e1..74db731ae865cc 100644
--- a/libcxx/include/__algorithm/ranges_swap_ranges.h
+++ b/libcxx/include/__algorithm/ranges_swap_ranges.h
@@ -53,9 +53,7 @@ struct __fn {
 };
 } // namespace __swap_ranges
 
-inline namespace __cpo {
 inline constexpr auto swap_ranges = __swap_ranges::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_transform.h b/libcxx/include/__algorithm/ranges_transform.h
index f66a07ac026e5f..ccf3f8b4c5fe77 100644
--- a/libcxx/include/__algorithm/ranges_transform.h
+++ b/libcxx/include/__algorithm/ranges_transform.h
@@ -160,9 +160,7 @@ struct __fn {
 };
 } // namespace __transform
 
-inline namespace __cpo {
 inline constexpr auto transform = __transform::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_unique.h b/libcxx/include/__algorithm/ranges_unique.h
index b17e01fc50577e..dd847ea1cba97e 100644
--- a/libcxx/include/__algorithm/ranges_unique.h
+++ b/libcxx/include/__algorithm/ranges_unique.h
@@ -65,9 +65,7 @@ struct __fn {
 
 } // namespace __unique
 
-inline namespace __cpo {
 inline constexpr auto unique = __unique::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_unique_copy.h b/libcxx/include/__algorithm/ranges_unique_copy.h
index 7e89f9d97af7f6..f1b8569caf91ef 100644
--- a/libcxx/include/__algorithm/ranges_unique_copy.h
+++ b/libcxx/include/__algorithm/ranges_unique_copy.h
@@ -103,9 +103,7 @@ struct __fn {
 
 } // namespace __unique_copy
 
-inline namespace __cpo {
 inline constexpr auto unique_copy = __unique_copy::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_upper_bound.h b/libcxx/include/__algorithm/ranges_upper_bound.h
index 7b571fb3448f94..725527a613e6d0 100644
--- a/libcxx/include/__algorithm/ranges_upper_bound.h
+++ b/libcxx/include/__algorithm/ranges_upper_bound.h
@@ -62,9 +62,7 @@ struct __fn {
 };
 } // namespace __upper_bound
 
-inline namespace __cpo {
 inline constexpr auto upper_bound = __upper_bound::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h
index 64c8d249f78f3e..6ef4063a03ec05 100644
--- a/libcxx/include/__iterator/advance.h
+++ b/libcxx/include/__iterator/advance.h
@@ -188,9 +188,7 @@ struct __fn {
 
 } // namespace __advance
 
-inline namespace __cpo {
 inline constexpr auto advance = __advance::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 #endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__iterator/distance.h b/libcxx/include/__iterator/distance.h
index 75bd49c9ae732b..bff79e55a0921b 100644
--- a/libcxx/include/__iterator/distance.h
+++ b/libcxx/include/__iterator/distance.h
@@ -87,9 +87,7 @@ struct __fn {
 
 } // namespace __distance
 
-inline namespace __cpo {
 inline constexpr auto distance = __distance::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 #endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h
index da60aacfd08d26..b380a5f0bc73bd 100644
--- a/libcxx/include/__iterator/next.h
+++ b/libcxx/include/__iterator/next.h
@@ -69,9 +69,7 @@ struct __fn {
 
 } // namespace __next
 
-inline namespace __cpo {
 inline constexpr auto next = __next::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 #endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h
index 1651942acea9e7..48d8cf57655a21 100644
--- a/libcxx/include/__iterator/prev.h
+++ b/libcxx/include/__iterator/prev.h
@@ -62,9 +62,7 @@ struct __fn {
 
 } // namespace __prev
 
-inline namespace __cpo {
 inline constexpr auto prev = __prev::__fn{};
-} // namespace __cpo
 } // namespace ranges
 
 #endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__memory/ranges_construct_at.h b/libcxx/include/__memory/ranges_construct_at.h
index f731e75e7bdc0d..b4490ab2894cf2 100644
--- a/libcxx/include/__memory/ranges_construct_at.h
+++ b/libcxx/include/__memory/ranges_construct_at.h
@@ -49,9 +49,7 @@ struct __fn {
 
 } // namespace __construct_at
 
-inline namespace __cpo {
 inline constexpr auto construct_at = __construct_at::__fn{};
-} // namespace __cpo
 
 // destroy_at
 
@@ -66,9 +64,7 @@ struct __fn {
 
 } // namespace __destroy_at
 
-inline namespace __cpo {
 inline constexpr auto destroy_at = __destroy_at::__fn{};
-} // namespace __cpo
 
 // destroy
 
@@ -90,9 +86,7 @@ struct __fn {
 
 } // namespace __destroy
 
-inline namespace __cpo {
 inline constexpr auto destroy = __destroy::__fn{};
-} // namespace __cpo
 
 // destroy_n
 
@@ -109,9 +103,7 @@ struct __fn {
 
 } // namespace __destroy_n
 
-inline namespace __cpo {
 inline constexpr auto destroy_n = __destroy_n::__fn{};
-} // namespace __cpo
 
 } // namespace ranges
 
diff --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
index d836d00820a658..dd4dcc442f6c2e 100644
--- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h
+++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
@@ -58,9 +58,7 @@ struct __fn {
 
 } // namespace __uninitialized_default_construct
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_default_construct = __uninitialized_default_construct::__fn{};
-} // namespace __cpo
 
 // uninitialized_default_construct_n
 
@@ -78,9 +76,7 @@ struct __fn {
 
 } // namespace __uninitialized_default_construct_n
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_default_construct_n = __uninitialized_default_construct_n::__fn{};
-} // namespace __cpo
 
 // uninitialized_value_construct
 
@@ -103,9 +99,7 @@ struct __fn {
 
 } // namespace __uninitialized_value_construct
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_value_construct = __uninitialized_value_construct::__fn{};
-} // namespace __cpo
 
 // uninitialized_value_construct_n
 
@@ -123,9 +117,7 @@ struct __fn {
 
 } // namespace __uninitialized_value_construct_n
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_value_construct_n = __uninitialized_value_construct_n::__fn{};
-} // namespace __cpo
 
 // uninitialized_fill
 
@@ -148,9 +140,7 @@ struct __fn {
 
 } // namespace __uninitialized_fill
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_fill = __uninitialized_fill::__fn{};
-} // namespace __cpo
 
 // uninitialized_fill_n
 
@@ -168,9 +158,7 @@ struct __fn {
 
 } // namespace __uninitialized_fill_n
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_fill_n = __uninitialized_fill_n::__fn{};
-} // namespace __cpo
 
 // uninitialized_copy
 
@@ -206,9 +194,7 @@ struct __fn {
 
 } // namespace __uninitialized_copy
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_copy = __uninitialized_copy::__fn{};
-} // namespace __cpo
 
 // uninitialized_copy_n
 
@@ -237,9 +223,7 @@ struct __fn {
 
 } // namespace __uninitialized_copy_n
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_copy_n = __uninitialized_copy_n::__fn{};
-} // namespace __cpo
 
 // uninitialized_move
 
@@ -275,9 +259,7 @@ struct __fn {
 
 } // namespace __uninitialized_move
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_move = __uninitialized_move::__fn{};
-} // namespace __cpo
 
 // uninitialized_move_n
 
@@ -307,9 +289,7 @@ struct __fn {
 
 } // namespace __uninitialized_move_n
 
-inline namespace __cpo {
 inline constexpr auto uninitialized_move_n = __uninitialized_move_n::__fn{};
-} // namespace __cpo
 
 } // namespace ranges
 



More information about the libcxx-commits mailing list