libstdc++: Fix typo in adjacent_view::_Iterator [PR106798]
PR libstdc++/106798 libstdc++-v3/ChangeLog: * include/std/ranges (adjacent_view::_Iterator::_Iterator): Fix typo. * testsuite/std/ranges/adaptors/adjacent/1.cc (test04): New test.
This commit is contained in:
parent
718a6d475b
commit
e469506b7f
2 changed files with 13 additions and 1 deletions
|
@ -5239,7 +5239,7 @@ namespace views::__adaptor
|
|||
requires _Const && convertible_to<iterator_t<_Vp>, iterator_t<_Base>>
|
||||
{
|
||||
for (size_t __j = 0; __j < _Nm; ++__j)
|
||||
_M_current[__j] = std::move(__i[__j]);
|
||||
_M_current[__j] = std::move(__i._M_current[__j]);
|
||||
}
|
||||
|
||||
constexpr auto
|
||||
|
|
|
@ -101,10 +101,22 @@ test03()
|
|||
return true;
|
||||
}
|
||||
|
||||
constexpr bool
|
||||
test04()
|
||||
{
|
||||
// PR libstdc++/106798
|
||||
auto r = views::single(0) | views::lazy_split(0) | views::pairwise;
|
||||
decltype(ranges::cend(r)) s = r.end();
|
||||
VERIFY( r.begin() == s );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
static_assert(test01());
|
||||
static_assert(test02());
|
||||
static_assert(test03());
|
||||
static_assert(test04());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue