summaryrefslogtreecommitdiff
path: root/libcxx/include/ranges
diff options
context:
space:
mode:
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>2022-02-02 12:23:51 -0500
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>2022-02-04 12:37:47 -0500
commit44cdca37c01a58da94087be8ebd0ee2bd2ba724e (patch)
treee6d9fada1c96fea713ec4c0fe9441d8c21edbe9d /libcxx/include/ranges
parentb35be6fe98e30b2373e8fdf024ef8c13a32121d7 (diff)
[libc++] Define `namespace views` in its own detail header.
Discovered in the comments on D118748: we would like this namespace to exist anytime Ranges exists, regardless of whether concepts syntax is supported. Also, we'd like to fully granularize the <ranges> header, which means not putting any loose declarations at the top level. Differential Revision: https://reviews.llvm.org/D118809
Diffstat (limited to 'libcxx/include/ranges')
-rw-r--r--libcxx/include/ranges11
1 files changed, 1 insertions, 10 deletions
diff --git a/libcxx/include/ranges b/libcxx/include/ranges
index 8c9569cbaaea..e8142084fe97 100644
--- a/libcxx/include/ranges
+++ b/libcxx/include/ranges
@@ -258,6 +258,7 @@ namespace std {
#include <__ranges/take_view.h>
#include <__ranges/transform_view.h>
#include <__ranges/view_interface.h>
+#include <__ranges/views.h>
#include <compare> // Required by the standard.
#include <initializer_list> // Required by the standard.
#include <iterator> // Required by the standard.
@@ -267,16 +268,6 @@ namespace std {
# pragma GCC system_header
#endif
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
-namespace views = ranges::views;
-
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
-_LIBCPP_END_NAMESPACE_STD
-
#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
#endif // _LIBCPP_RANGES