[gcc r12-1664] libstdc++: Implement P2210 changes to rename views::split to lazy_split
Patrick Palka
ppalka@gcc.gnu.org
Sun Jun 20 16:51:09 GMT 2021
https://gcc.gnu.org/g:adbd2c7102d30cafdb82062940b2181df30c20c8
commit r12-1664-gadbd2c7102d30cafdb82062940b2181df30c20c8
Author: Patrick Palka <ppalka@redhat.com>
Date: Sun Jun 20 12:41:42 2021 -0400
libstdc++: Implement P2210 changes to rename views::split to lazy_split
This mostly mechanical patch renames split to lazy_split throughout.
libstdc++-v3/ChangeLog:
* include/std/ranges: Rename views::split to views::lazy_split,
split_view to lazy_split_view, etc. throughout.
* testsuite/std/ranges/*: Likewise.
Diff:
---
libstdc++-v3/include/std/ranges | 60 +++++++++----------
.../testsuite/std/ranges/adaptors/100479.cc | 2 +-
.../testsuite/std/ranges/adaptors/100577.cc | 20 +++----
libstdc++-v3/testsuite/std/ranges/adaptors/join.cc | 2 +-
.../ranges/adaptors/{split.cc => lazy_split.cc} | 70 +++++++++++-----------
.../adaptors/{split_neg.cc => lazy_split_neg.cc} | 6 +-
.../testsuite/std/ranges/adaptors/p2281.cc | 18 +++---
.../testsuite/std/ranges/adaptors/sizeof.cc | 2 +-
libstdc++-v3/testsuite/std/ranges/p2259.cc | 6 +-
libstdc++-v3/testsuite/std/ranges/p2325.cc | 10 ++--
libstdc++-v3/testsuite/std/ranges/p2367.cc | 4 +-
11 files changed, 100 insertions(+), 100 deletions(-)
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 5eba6913517..a7885f36f7e 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -2826,19 +2826,19 @@ namespace views::__adaptor
&& (remove_reference_t<_Range>::size() <= 1);
template<typename _Base>
- struct __split_view_outer_iter_cat
+ struct __lazy_split_view_outer_iter_cat
{ };
template<forward_range _Base>
- struct __split_view_outer_iter_cat<_Base>
+ struct __lazy_split_view_outer_iter_cat<_Base>
{ using iterator_category = input_iterator_tag; };
template<typename _Base>
- struct __split_view_inner_iter_cat
+ struct __lazy_split_view_inner_iter_cat
{ };
template<forward_range _Base>
- struct __split_view_inner_iter_cat<_Base>
+ struct __lazy_split_view_inner_iter_cat<_Base>
{
private:
static constexpr auto
@@ -2860,7 +2860,7 @@ namespace views::__adaptor
&& indirectly_comparable<iterator_t<_Vp>, iterator_t<_Pattern>,
ranges::equal_to>
&& (forward_range<_Vp> || __detail::__tiny_range<_Pattern>)
- class split_view : public view_interface<split_view<_Vp, _Pattern>>
+ class lazy_split_view : public view_interface<lazy_split_view<_Vp, _Pattern>>
{
private:
template<bool _Const>
@@ -2871,17 +2871,17 @@ namespace views::__adaptor
template<bool _Const>
struct _OuterIter
- : __detail::__split_view_outer_iter_cat<_Base<_Const>>
+ : __detail::__lazy_split_view_outer_iter_cat<_Base<_Const>>
{
private:
- using _Parent = __detail::__maybe_const_t<_Const, split_view>;
- using _Base = split_view::_Base<_Const>;
+ using _Parent = __detail::__maybe_const_t<_Const, lazy_split_view>;
+ using _Base = lazy_split_view::_Base<_Const>;
constexpr bool
__at_end() const
{ return __current() == ranges::end(_M_parent->_M_base) && !_M_trailing_empty; }
- // [range.split.outer] p1
+ // [range.lazy.split.outer] p1
// Many of the following specifications refer to the notional member
// current of outer-iterator. current is equivalent to current_ if
// V models forward_range, and parent_->current_ otherwise.
@@ -2915,7 +2915,7 @@ namespace views::__adaptor
using iterator_concept = conditional_t<forward_range<_Base>,
forward_iterator_tag,
input_iterator_tag>;
- // iterator_category defined in __split_view_outer_iter_cat
+ // iterator_category defined in __lazy_split_view_outer_iter_cat
using difference_type = range_difference_t<_Base>;
struct value_type : view_interface<value_type>
@@ -2969,7 +2969,7 @@ namespace views::__adaptor
operator++()
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
- // 3505. split_view::outer-iterator::operator++ misspecified
+ // 3505. lazy_split_view::outer-iterator::operator++ misspecified
const auto __end = ranges::end(_M_parent->_M_base);
if (__current() == __end)
{
@@ -3037,10 +3037,10 @@ namespace views::__adaptor
template<bool _Const>
struct _InnerIter
- : __detail::__split_view_inner_iter_cat<_Base<_Const>>
+ : __detail::__lazy_split_view_inner_iter_cat<_Base<_Const>>
{
private:
- using _Base = split_view::_Base<_Const>;
+ using _Base = lazy_split_view::_Base<_Const>;
constexpr bool
__at_end() const
@@ -3088,7 +3088,7 @@ namespace views::__adaptor
public:
using iterator_concept
= typename _OuterIter<_Const>::iterator_concept;
- // iterator_category defined in __split_view_inner_iter_cat
+ // iterator_category defined in __lazy_split_view_inner_iter_cat
using value_type = range_value_t<_Base>;
using difference_type = range_difference_t<_Base>;
@@ -3166,12 +3166,12 @@ namespace views::__adaptor
public:
- split_view() requires (default_initializable<_Vp>
- && default_initializable<_Pattern>)
+ lazy_split_view() requires (default_initializable<_Vp>
+ && default_initializable<_Pattern>)
= default;
constexpr
- split_view(_Vp __base, _Pattern __pattern)
+ lazy_split_view(_Vp __base, _Pattern __pattern)
: _M_pattern(std::move(__pattern)), _M_base(std::move(__base))
{ }
@@ -3179,7 +3179,7 @@ namespace views::__adaptor
requires constructible_from<_Vp, views::all_t<_Range>>
&& constructible_from<_Pattern, single_view<range_value_t<_Range>>>
constexpr
- split_view(_Range&& __r, range_value_t<_Range> __e)
+ lazy_split_view(_Range&& __r, range_value_t<_Range> __e)
: _M_pattern(views::single(std::move(__e))),
_M_base(views::all(std::forward<_Range>(__r)))
{ }
@@ -3231,35 +3231,35 @@ namespace views::__adaptor
};
template<typename _Range, typename _Pattern>
- split_view(_Range&&, _Pattern&&)
- -> split_view<views::all_t<_Range>, views::all_t<_Pattern>>;
+ lazy_split_view(_Range&&, _Pattern&&)
+ -> lazy_split_view<views::all_t<_Range>, views::all_t<_Pattern>>;
template<input_range _Range>
- split_view(_Range&&, range_value_t<_Range>)
- -> split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>;
+ lazy_split_view(_Range&&, range_value_t<_Range>)
+ -> lazy_split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>;
namespace views
{
namespace __detail
{
template<typename _Range, typename _Pattern>
- concept __can_split_view
- = requires { split_view(std::declval<_Range>(), std::declval<_Pattern>()); };
+ concept __can_lazy_split_view
+ = requires { lazy_split_view(std::declval<_Range>(), std::declval<_Pattern>()); };
} // namespace __detail
- struct _Split : __adaptor::_RangeAdaptor<_Split>
+ struct _LazySplit : __adaptor::_RangeAdaptor<_LazySplit>
{
template<viewable_range _Range, typename _Pattern>
- requires __detail::__can_split_view<_Range, _Pattern>
+ requires __detail::__can_lazy_split_view<_Range, _Pattern>
constexpr auto
operator()(_Range&& __r, _Pattern&& __f) const
{
- return split_view(std::forward<_Range>(__r), std::forward<_Pattern>(__f));
+ return lazy_split_view(std::forward<_Range>(__r), std::forward<_Pattern>(__f));
}
- using _RangeAdaptor<_Split>::operator();
+ using _RangeAdaptor<_LazySplit>::operator();
static constexpr int _S_arity = 2;
- // The pattern argument of views::split is not always simple -- it can be
+ // The pattern argument of views::lazy_split is not always simple -- it can be
// a non-view range, the value category of which affects whether the call
// is well-formed. But a scalar or a view pattern argument is surely
// simple.
@@ -3269,7 +3269,7 @@ namespace views::__adaptor
&& copy_constructible<_Pattern>);
};
- inline constexpr _Split split;
+ inline constexpr _LazySplit lazy_split;
} // namespace views
namespace views
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
index b16679075c6..b8c1e6f4f57 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/100479.cc
@@ -90,7 +90,7 @@ test03()
// Propagating cached iterators during copy/move would cause these asserts
// to fail here.
auto v = views::single(1)
- | views::split(1)
+ | views::lazy_split(1)
| views::drop(0)
| views::drop_while([](auto) { return false; })
| views::filter([](auto) { return true; });
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
index 06be4980ddb..5ef7f3f59a7 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/100577.cc
@@ -38,11 +38,11 @@ test01()
static_assert(__adaptor_has_simple_extra_args<decltype(views::take), int>);
static_assert(__adaptor_has_simple_extra_args<decltype(views::take_while), identity>);
static_assert(__adaptor_has_simple_extra_args<decltype(views::drop_while), identity>);
- static_assert(__adaptor_has_simple_extra_args<decltype(views::split), std::string_view>);
- static_assert(__adaptor_has_simple_extra_args<decltype(views::split), char>);
- static_assert(!__adaptor_has_simple_extra_args<decltype(views::split), std::string>);
+ static_assert(__adaptor_has_simple_extra_args<decltype(views::lazy_split), std::string_view>);
+ static_assert(__adaptor_has_simple_extra_args<decltype(views::lazy_split), char>);
+ static_assert(!__adaptor_has_simple_extra_args<decltype(views::lazy_split), std::string>);
- // Verify all adaptor closures except for views::split(pattern) have a simple
+ // Verify all adaptor closures except for views::lazy_split(pattern) have a simple
// operator().
using views::__adaptor::__closure_has_simple_call_op;
__closure_has_simple_call_op auto a00 = views::all;
@@ -56,14 +56,14 @@ test01()
__closure_has_simple_call_op auto a08 = views::common;
__closure_has_simple_call_op auto a09 = views::reverse;
__closure_has_simple_call_op auto a10 = views::keys;
- __closure_has_simple_call_op auto a11 = views::split(' ');
+ __closure_has_simple_call_op auto a11 = views::lazy_split(' ');
// Verify composition of simple closures is simple.
__closure_has_simple_call_op auto b
= (a00 | a01) | (a02 | a03) | (a04 | a05 | a06) | (a07 | a08 | a09 | a10) | a11;
- // Verify views::split(non_view_range) is an exception.
+ // Verify views::lazy_split(non_view_range) is an exception.
extern std::string s;
- auto a12 = views::split(s);
+ auto a12 = views::lazy_split(s);
static_assert(!__closure_has_simple_call_op<decltype(a12)>);
static_assert(!__closure_has_simple_call_op<decltype(a12 | a00)>);
static_assert(!__closure_has_simple_call_op<decltype(a00 | a12)>);
@@ -91,9 +91,9 @@ test02()
// implemented using a fallback deleted overload, so when a call is
// ill-formed overload resolution succeeds but selects the deleted overload
// (but only when the closure is invoked as an rvalue).
- views::split(badarg)(x); // { dg-error "deleted function" }
- (views::split(badarg) | views::all)(x); // { dg-error "deleted function" }
- auto a0 = views::split(badarg);
+ views::lazy_split(badarg)(x); // { dg-error "deleted function" }
+ (views::lazy_split(badarg) | views::all)(x); // { dg-error "deleted function" }
+ auto a0 = views::lazy_split(badarg);
a0(x); // { dg-error "no match" };
auto a1 = a0 | views::all;
a1(x); // { dg-error "no match" }
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
index d774e8d9385..50af3fdf729 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/join.cc
@@ -93,7 +93,7 @@ test05()
{
using namespace std::literals;
std::vector<std::string> x = {"the", " ", "quick", " ", "brown", " ", "fox"};
- auto v = x | views::join | views::split(' ');
+ auto v = x | views::join | views::lazy_split(' ');
auto i = v.begin();
VERIFY( ranges::equal(*i++, "the"sv) );
VERIFY( ranges::equal(*i++, "quick"sv) );
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
similarity index 69%
rename from libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
rename to libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
index 215856801ba..cfd9983f34e 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/split.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split.cc
@@ -39,7 +39,7 @@ test01()
{
auto x = "the quick brown fox"sv;
auto p = std::string{" "};
- auto v = x | views::split(views::all(p)); // views::all is needed here after P2281.
+ auto v = x | views::lazy_split(views::all(p)); // views::all is needed here after P2281.
auto i = v.begin();
VERIFY( ranges::equal(*i++, "the"sv) );
VERIFY( ranges::equal(*i++, "quick"sv) );
@@ -52,7 +52,7 @@ void
test02()
{
auto x = "the quick brown fox"sv;
- auto v = x | views::split(' ');
+ auto v = x | views::lazy_split(' ');
auto i = v.begin();
VERIFY( ranges::equal(*i++, "the"sv) );
VERIFY( ranges::equal(*i++, "quick"sv) );
@@ -66,7 +66,7 @@ test03()
{
char x[] = "the quick brown fox";
test_range<char, forward_iterator_wrapper> rx(x, x+sizeof(x)-1);
- auto v = rx | views::split(' ');
+ auto v = rx | views::lazy_split(' ');
auto i = v.begin();
VERIFY( ranges::equal(*i++, "the"sv) );
VERIFY( ranges::equal(*i++, "quick"sv) );
@@ -83,7 +83,7 @@ test04()
static_assert(!ranges::view<decltype(p)>);
static_assert(std::same_as<decltype(p | views::all),
ranges::ref_view<decltype(p)>>);
- auto v = x | views::split(views::all(p)); // views::all is needed here after P2281.
+ auto v = x | views::lazy_split(views::all(p)); // views::all is needed here after P2281.
auto i = v.begin();
VERIFY( ranges::equal(*i++, "the"sv) );
VERIFY( ranges::equal(*i++, "quick"sv) );
@@ -102,7 +102,7 @@ test05()
std::string str
= "Now is the time for all good men to come to the aid of their county.";
auto rng
- = str | views::split(' ') | views::transform(as_string) | views::common;
+ = str | views::lazy_split(' ') | views::transform(as_string) | views::common;
std::vector<std::string> words(rng.begin(), rng.end());
auto not_space_p = [](char c) { return c != ' '; };
VERIFY( ranges::equal(words | views::join,
@@ -113,7 +113,7 @@ void
test06()
{
std::string str = "hello world";
- auto v = str | views::transform(std::identity{}) | views::split(' ');
+ auto v = str | views::transform(std::identity{}) | views::lazy_split(' ');
// Verify that _Iterator<false> is implicitly convertible to _Iterator<true>.
static_assert(!std::same_as<decltype(ranges::begin(v)),
@@ -126,7 +126,7 @@ void
test07()
{
char str[] = "banana split";
- auto split = str | views::split(' ');
+ auto split = str | views::lazy_split(' ');
auto val = *split.begin();
auto b = val.begin();
auto b2 = b++;
@@ -139,7 +139,7 @@ test08()
{
char x[] = "the quick brown fox";
test_range<char, input_iterator_wrapper> rx(x, x+sizeof(x)-1);
- auto v = rx | views::split(' ');
+ auto v = rx | views::lazy_split(' ');
auto i = v.begin();
VERIFY( ranges::equal(*i, "the"sv) );
++i;
@@ -152,32 +152,32 @@ test08()
VERIFY( i == v.end() );
}
-template<auto split = views::split>
+template<auto lazy_split = views::lazy_split>
void
test09()
{
// Verify SFINAE behavior.
std::string s, p;
- static_assert(!requires { split(); });
- static_assert(!requires { split(s, p, 0); });
- static_assert(!requires { split(p)(); });
- static_assert(!requires { s | split; });
-
- static_assert(!requires { s | split(p); });
- static_assert(!requires { split(p)(s); });
- static_assert(!requires { s | (split(p) | views::all); });
- static_assert(!requires { (split(p) | views::all)(s); });
-
- static_assert(requires { s | split(views::all(p)); });
- static_assert(requires { split(views::all(p))(s); });
- static_assert(requires { s | (split(views::all(p)) | views::all); });
- static_assert(requires { (split(views::all(p)) | views::all)(s); });
-
- auto adapt = split(p);
+ static_assert(!requires { lazy_split(); });
+ static_assert(!requires { lazy_split(s, p, 0); });
+ static_assert(!requires { lazy_split(p)(); });
+ static_assert(!requires { s | lazy_split; });
+
+ static_assert(!requires { s | lazy_split(p); });
+ static_assert(!requires { lazy_split(p)(s); });
+ static_assert(!requires { s | (lazy_split(p) | views::all); });
+ static_assert(!requires { (lazy_split(p) | views::all)(s); });
+
+ static_assert(requires { s | lazy_split(views::all(p)); });
+ static_assert(requires { lazy_split(views::all(p))(s); });
+ static_assert(requires { s | (lazy_split(views::all(p)) | views::all); });
+ static_assert(requires { (lazy_split(views::all(p)) | views::all)(s); });
+
+ auto adapt = lazy_split(p);
static_assert(requires { s | adapt; });
static_assert(requires { adapt(s); });
- auto adapt2 = split(p) | views::all;
+ auto adapt2 = lazy_split(p) | views::all;
static_assert(requires { s | adapt2; });
static_assert(requires { adapt2(s); });
}
@@ -189,7 +189,7 @@ test10()
auto to_string = [] (auto r) {
return std::string(r.begin(), ranges::next(r.begin(), r.end()));
};
- auto v = "xxyx"sv | views::split("xy"sv) | views::transform(to_string);
+ auto v = "xxyx"sv | views::lazy_split("xy"sv) | views::transform(to_string);
VERIFY( ranges::equal(v, (std::string_view[]){"x", "x"}) );
}
@@ -197,19 +197,19 @@ void
test11()
{
// LWG 3478
- auto v = views::split("text"sv, "text"sv);
+ auto v = views::lazy_split("text"sv, "text"sv);
auto i = v.begin();
VERIFY( ranges::empty(*i++) );
VERIFY( ranges::empty(*i++) );
VERIFY( i == v.end() );
- static_assert(ranges::distance(views::split(" text "sv, ' ')) == 3);
- static_assert(ranges::distance(views::split(" t e x t "sv, ' ')) == 6);
- static_assert(ranges::distance(views::split(" text "sv, " "sv)) == 3);
- static_assert(ranges::distance(views::split(" text "sv, " "sv)) == 4);
- static_assert(ranges::distance(views::split(" text "sv, " "sv)) == 4);
- static_assert(ranges::distance(views::split("t"sv, 't')) == 2);
- static_assert(ranges::distance(views::split("text"sv, ""sv)) == 4);
+ static_assert(ranges::distance(views::lazy_split(" text "sv, ' ')) == 3);
+ static_assert(ranges::distance(views::lazy_split(" t e x t "sv, ' ')) == 6);
+ static_assert(ranges::distance(views::lazy_split(" text "sv, " "sv)) == 3);
+ static_assert(ranges::distance(views::lazy_split(" text "sv, " "sv)) == 4);
+ static_assert(ranges::distance(views::lazy_split(" text "sv, " "sv)) == 4);
+ static_assert(ranges::distance(views::lazy_split("t"sv, 't')) == 2);
+ static_assert(ranges::distance(views::lazy_split("text"sv, ""sv)) == 4);
}
int
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/split_neg.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
similarity index 79%
rename from libstdc++-v3/testsuite/std/ranges/adaptors/split_neg.cc
rename to libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
index 4229314a9dc..c59f828ee56 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/split_neg.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/lazy_split_neg.cc
@@ -30,7 +30,7 @@ test01()
{
using namespace std::literals;
auto x = "the quick brown fox"sv;
- auto v = views::split(x, std::initializer_list<char>{' ', ' '}); // { dg-error "no match" }
+ auto v = views::lazy_split(x, std::initializer_list<char>{' ', ' '}); // { dg-error "no match" }
}
void
@@ -38,8 +38,8 @@ test02()
{
using namespace std::literals;
auto x = "the quick brown fox"sv;
- auto v1 = views::split(std::initializer_list<char>{' ', ' '})(x); // { dg-error "deleted" }
- auto v2 = x | views::split(std::initializer_list<char>{' ', ' '}); // { dg-error "no match" }
+ auto v1 = views::lazy_split(std::initializer_list<char>{' ', ' '})(x); // { dg-error "deleted" }
+ auto v2 = x | views::lazy_split(std::initializer_list<char>{' ', ' '}); // { dg-error "no match" }
}
// { dg-prune-output "in requirements" }
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
index c916a5ea8b7..7950c43576d 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/p2281.cc
@@ -34,7 +34,7 @@ void
test01()
{
auto split_into_strings = [] (auto p) {
- return views::split(p) | views::transform([](auto r){
+ return views::lazy_split(p) | views::transform([](auto r){
return std::string(r.begin(), ranges::next(r.begin(), r.end()));
});
};
@@ -60,19 +60,19 @@ struct move_only_range
template<>
inline constexpr bool std::ranges::enable_view<move_only_range> = true;
-template<auto split = views::split>
+template<auto lazy_split = views::lazy_split>
void
test02()
{
std::string_view s;
move_only_range p;
- static_assert(requires { s | split(std::move(p)); });
- static_assert(requires { split(std::move(p))(s); });
- static_assert(requires { split(std::move(p)) | views::all; });
- static_assert(requires { views::all | split(std::move(p)); });
- static_assert(!requires { split(p); });
- static_assert(!requires { split(p) | views::all; });
- static_assert(!requires { views::all | split(p); });
+ static_assert(requires { s | lazy_split(std::move(p)); });
+ static_assert(requires { lazy_split(std::move(p))(s); });
+ static_assert(requires { lazy_split(std::move(p)) | views::all; });
+ static_assert(requires { views::all | lazy_split(std::move(p)); });
+ static_assert(!requires { lazy_split(p); });
+ static_assert(!requires { lazy_split(p) | views::all; });
+ static_assert(!requires { views::all | lazy_split(p); });
}
int
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
index 80326f8bf21..219e2a61f07 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/sizeof.cc
@@ -46,7 +46,7 @@ static_assert(sizeof(ranges::take_while_view<V, decltype(pred_l)>) == 3*ptr);
static_assert(sizeof(ranges::drop_while_view<V, decltype(pred_l)>) == 3*ptr);
static_assert(sizeof(ranges::transform_view<V, decltype(func_l)>) == 3*ptr);
-static_assert(sizeof(ranges::split_view<V, std::string_view>) == 4*ptr);
+static_assert(sizeof(ranges::lazy_split_view<V, std::string_view>) == 4*ptr);
static_assert
(sizeof(ranges::reverse_view<ranges::filter_view<V, decltype(pred_l)>>) == 4*ptr);
diff --git a/libstdc++-v3/testsuite/std/ranges/p2259.cc b/libstdc++-v3/testsuite/std/ranges/p2259.cc
index 1b422e44f16..0ec7e21f657 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2259.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2259.cc
@@ -49,12 +49,12 @@ test01()
// Verify the changes to transform_view.
only_cxx20_input_range auto v2 = v0 | views::transform([](int& c) -> auto& { return c; });
- // Verify the changes to split_view.
- only_cxx20_input_range auto v3 = v0 | views::split(12);
+ // Verify the changes to lazy_split_view.
+ only_cxx20_input_range auto v3 = v0 | views::lazy_split(12);
static_assert(only_cxx20_input_range<decltype(*v3.begin())>);
// Verify the changes to join_view.
- only_cxx20_input_range auto v4 = v0 | views::split(12) | views::join;
+ only_cxx20_input_range auto v4 = v0 | views::lazy_split(12) | views::join;
// Verify the changes to elements_view.
only_cxx20_input_range auto v5
diff --git a/libstdc++-v3/testsuite/std/ranges/p2325.cc b/libstdc++-v3/testsuite/std/ranges/p2325.cc
index df6cde29e4d..4d075409026 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2325.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2325.cc
@@ -113,14 +113,14 @@ test07()
void
test08()
{
- // Verify split_view is conditionally default constructible.
- using type1 = ranges::split_view<ranges::ref_view<int[2]>, ranges::single_view<int>>;
+ // Verify lazy_split_view is conditionally default constructible.
+ using type1 = ranges::lazy_split_view<ranges::ref_view<int[2]>, ranges::single_view<int>>;
static_assert(!default_initializable<type1>);
- using type2 = ranges::split_view<ranges::single_view<int>, ranges::ref_view<int[2]>>;
+ using type2 = ranges::lazy_split_view<ranges::single_view<int>, ranges::ref_view<int[2]>>;
static_assert(!default_initializable<type2>);
- using type3 = ranges::split_view<ranges::ref_view<int[2]>, ranges::ref_view<int[2]>>;
+ using type3 = ranges::lazy_split_view<ranges::ref_view<int[2]>, ranges::ref_view<int[2]>>;
static_assert(!default_initializable<type3>);
- using type4 = ranges::split_view<ranges::single_view<int>, ranges::single_view<int>>;
+ using type4 = ranges::lazy_split_view<ranges::single_view<int>, ranges::single_view<int>>;
static_assert(default_initializable<type4>);
}
diff --git a/libstdc++-v3/testsuite/std/ranges/p2367.cc b/libstdc++-v3/testsuite/std/ranges/p2367.cc
index 40875233d88..5228b021602 100644
--- a/libstdc++-v3/testsuite/std/ranges/p2367.cc
+++ b/libstdc++-v3/testsuite/std/ranges/p2367.cc
@@ -43,6 +43,6 @@ test01()
// Verify changes to views::drop.
auto v5 = views::drop(x, 0ull);
- // Verify changes to views::split.
- auto v6 = views::split(x, 5u);
+ // Verify changes to views::lazy_split.
+ auto v6 = views::lazy_split(x, 5u);
}
More information about the Libstdc++-cvs
mailing list