libstdc++: Improve test for views::reverse
libstdc++-v3/ChangeLog: * testsuite/std/ranges/adaptors/reverse.cc: Replace duplicated line with a check that uses the const being/end overloads.
This commit is contained in:
parent
1959955104
commit
d1aa5f57db
@ -141,11 +141,12 @@ namespace test_ns
|
||||
void test06()
|
||||
{
|
||||
// Check that views::reverse works and does not use ADL which could lead
|
||||
// to accidentally finding test_ns::make_reverse_iterator(const A&).
|
||||
// to accidentally finding test_ns::make_reverse_iterator(A*).
|
||||
test_ns::A as[] = {{}, {}};
|
||||
auto v = as | std::views::reverse;
|
||||
static_assert(std::ranges::view<decltype(v)>);
|
||||
static_assert(std::ranges::view<decltype(v)>);
|
||||
using V = decltype(v);
|
||||
static_assert( std::ranges::view<V> );
|
||||
static_assert( std::ranges::range<const V> );
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Loading…
Reference in New Issue
Block a user