Skip to content

Commit 6cbbb98

Browse files
burblebeetkoeppe
authored andcommitted
LWG3811 views::as_const on ref_view<T> should return ref_view<const T>
1 parent 8b266ca commit 6cbbb98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/ranges.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8630,6 +8630,11 @@
86308630
then \tcode{span<const X, Extent>(E)}.
86318631
\item
86328632
Otherwise,
8633+
if \tcode{U} denotes \tcode{ref_view<X>} for some type \tcode{X} and
8634+
\tcode{const X} models \libconcept{constant_range},
8635+
then \tcode{ref_view(static_cast<const X\&>(E.base()))}.
8636+
\item
8637+
Otherwise,
86338638
if \tcode{E} is an lvalue,
86348639
\tcode{const U} models \libconcept{constant_range}, and
86358640
\tcode{U} does not model \libconcept{view},

0 commit comments

Comments
 (0)