File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
libcxx/test/std/ranges/range.adaptors/range.concat/iterator Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,20 @@ constexpr bool test() {
156156 static_assert (std::is_same_v<ConstIter::value_type, double >);
157157 }
158158
159+ {
160+ // If is_reference_v<concat-reference-t<maybe-const<Const, Views>...>> is false,
161+ // then iterator_category denotes input_iterator_tag.
162+ auto v1 = std::views::iota (0 , 3 );
163+ auto v2 = std::views::iota (4 , 6 );
164+ auto cat = std::views::concat (v1, v2);
165+
166+ using Iter = decltype (cat.begin ());
167+ using ConstIter = decltype (std::as_const (cat).begin ());
168+
169+ static_assert (std::is_same_v<typename Iter::iterator_category, std::input_iterator_tag>);
170+ static_assert (std::is_same_v<typename ConstIter::iterator_category, std::input_iterator_tag>);
171+ }
172+
159173 return true ;
160174}
161175
You can’t perform that action at this time.
0 commit comments