diff --git a/source/ranges.tex b/source/ranges.tex index c93b855ec9..ee17326a40 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -5898,6 +5898,11 @@ except that the evaluations of \tcode{E} and \tcode{F} are indeterminately sequenced. +\item +Otherwise, if \tcode{T} is a specialization of +\tcode{optional} and \tcode{T} models \libconcept{view}, then +\tcode{(static_cast(F) == D() ? ((void)E, T()) : \exposidnc{decay-copy}(E))}. + \item Otherwise, if \tcode{T} models \libconcept{random_access_range} and \libconcept{sized_range} @@ -6381,6 +6386,11 @@ except that the evaluations of \tcode{E} and \tcode{F} are indeterminately sequenced. +\item +Otherwise, if \tcode{T} is a specialization of \tcode{optional} +and \tcode{T} models \libconcept{view}, then +\tcode{(static_cast(F) == D() ? \exposidnc{decay-copy}(E) : ((void)E, T()))}. + \item Otherwise, if \tcode{T} models \libconcept{random_access_range} and \libconcept{sized_range} @@ -9909,6 +9919,11 @@ If the type of \tcode{E} is a (possibly cv-qualified) specialization of \tcode{reverse_view}, then \tcode{E.base()}. + +\item + Otherwise, if \tcode{E} is specialization of \tcode{optional} and \tcode{E} + models \libconcept{view}, then \tcode{\exposidnc{decay-copy}(E)}. + \item Otherwise, if the type of \tcode{E} is \cv{} \tcode{subrange, reverse_iterator, K>} for some iterator type \tcode{I} and @@ -10060,6 +10075,11 @@ Otherwise, if \tcode{U} denotes \tcode{empty_view} for some type \tcode{X}, then \tcode{auto(views::empty)}. + +\item +Otherwise, if \tcode{U} denotes \tcode{optional} +for some type \tcode{X}, then \tcode{optional(E)}. + \item Otherwise, if \tcode{U} denotes \tcode{span}