@@ -69,24 +69,17 @@ constexpr bool test() {
69
69
assert (tv.end () == std::ranges::next (tv.begin (), 8 ));
70
70
}
71
71
72
- // Check that (non-)simple, non-sized views have different types for their end() member function.
73
72
{
74
- // These assertions must be true in order to trigger the different paths through the end member function
75
- // that will return values with different types:
76
- static_assert (!simple_view<NonSimpleViewNonSized>);
77
- static_assert (!std::ranges::sized_range<NonSimpleViewNonSized>);
78
- static_assert (simple_view<SimpleViewNonSized>);
79
- static_assert (std::ranges::range<const SimpleViewNonSized>);
80
- static_assert (!std::ranges::sized_range<const SimpleViewNonSized>);
81
-
82
- std::ranges::take_view<NonSimpleViewNonSized> tvns (NonSimpleViewNonSized{buffer, buffer + 8 }, 0 );
83
- std::ranges::take_view<SimpleViewNonSized> tvs (SimpleViewNonSized{buffer, buffer + 8 }, 0 );
84
-
85
73
// __iterator<false> has base with type std::ranges::sentinel_t<NonSimpleViewNonSized>; adding a const qualifier
86
74
// would change the equality.
75
+ std::ranges::take_view<NonSimpleViewNonSized> tvns (NonSimpleViewNonSized{buffer, buffer + 8 }, 0 );
87
76
static_assert (!std::is_same_v<decltype (tvns.end ().base ()), std::ranges::sentinel_t <const NonSimpleViewNonSized>>);
77
+ }
78
+
79
+ {
88
80
// __iterator<true> has base with type std::ranges::sentinel_t<const NonSimpleViewNonSized>; adding a const qualifier
89
81
// would not change the equality.
82
+ std::ranges::take_view<SimpleViewNonSized> tvs (SimpleViewNonSized{buffer, buffer + 8 }, 0 );
90
83
static_assert (std::is_same_v<decltype (tvs.end ().base ()), std::ranges::sentinel_t <const SimpleViewNonSized>>);
91
84
}
92
85
0 commit comments