diff --git a/source/algorithms.tex b/source/algorithms.tex index a64ccb1efa..4e6f9028aa 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -4682,7 +4682,8 @@ \returns \tcode{false} if $\tcode{N1} < \tcode{N2}$, otherwise \begin{codeblock} -ranges::equal(views::drop(ranges::ref_view(r1), N1 - N2), r2, pred, proj1, proj2) +ranges::equal(views::drop(ranges::ref_view(r1), N1 - static_cast(N2)), + r2, pred, proj1, proj2) \end{codeblock} \end{itemdescr} diff --git a/source/containers.tex b/source/containers.tex index 76f5cea891..f0438c0702 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -23392,7 +23392,13 @@ is \tcode{true}. \pnum -Let \tcode{offset} be a value of type \tcode{size_t} equal to +If \tcode{\exposid{first_}(slices...)} +equals \tcode{extents().extent($k$)} +for any rank index $k$ of \tcode{extents()}, then +let \tcode{offset} be a value of type \tcode{size_t} equal to +\tcode{(*this).required_span_size()}. +Otherwise, +let \tcode{offset} be a value of type \tcode{size_t} equal to \tcode{(*this)(\exposid{first_}(slices...)...)}. \rSec5[mdspan.sub.map.left]{\tcode{layout_left} specialization of \tcode{submdspan_mapping}} @@ -23840,9 +23846,9 @@ \effects Equivalent to: \begin{codeblock} -auto sub_map_offset = submdspan_mapping(src.mapping(), slices...); -return mdspan(src.accessor().offset(src.data(), sub_map_offset.offset), - sub_map_offset.mapping, +auto sub_map_result = submdspan_mapping(src.mapping(), slices...); +return mdspan(src.accessor().offset(src.data(), sub_map_result.offset), + sub_map_result.mapping, AccessorPolicy::offset_policy(src.accessor())); \end{codeblock} \end{itemdescr} diff --git a/source/ranges.tex b/source/ranges.tex index 928d3aa180..1856ff631c 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -334,13 +334,8 @@ namespace views { inline constexpr @\unspecnc@ join = @\unspecnc@; } // freestanding // \ref{range.join.with}, join with view - template - concept @\exposconcept{compatible-joinable-ranges}@ = @\seebelow@; // \expos - template<@\libconcept{input_range}@ V, @\libconcept{forward_range}@ Pattern> - requires @\libconcept{view}@ && @\libconcept{input_range}@> - && @\libconcept{view}@ - && @\exposconcept{compatible-joinable-ranges}@, Pattern> + requires @\seebelow@ class join_with_view; // freestanding namespace views { inline constexpr @\unspecnc@ join_with = @\unspecnc@; } // freestanding @@ -369,9 +364,9 @@ // \ref{range.concat}, concat view template<@\libconcept{input_range}@... Views> requires @\seebelow@ - class concat_view; + class concat_view; // freestanding - namespace views { inline constexpr @\unspecnc@ concat = @\unspecnc@; } + namespace views { inline constexpr @\unspecnc@ concat = @\unspecnc@; } // freestanding // \ref{range.counted}, counted view namespace views { inline constexpr @\unspecnc@ counted = @\unspecnc@; } // freestanding @@ -2668,7 +2663,8 @@ Given subexpressions \tcode{E} and \tcode{F}, the expressions \tcode{views::iota(E)} and \tcode{views::iota(E, F)} are expression-equivalent to -\tcode{iota_view(E)} and \tcode{iota_view(E, F)}, respectively. +\tcode{iota_view>(E)} and \tcode{iota_view(E, F)}, +respectively. \pnum \begin{example} @@ -4520,7 +4516,9 @@ The expression \tcode{views::as_rvalue(E)} is expression-equivalent to: \begin{itemize} \item -\tcode{views::all(E)} if \tcode{\libconcept{same_as}, range_reference_t>} is \tcode{true}. +\tcode{views::all(E)} if +\tcode{T} models \libconcept{input_range} and +\tcode{\libconcept{same_as}, range_reference_t>} is \tcode{true}. \item Otherwise, \tcode{as_rvalue_view(E)}. \end{itemize} @@ -7023,19 +7021,13 @@ \begin{codeblock} namespace std::ranges { - template - concept @\defexposconcept{compatible-joinable-ranges}@ = // \expos - @\libconcept{common_with}@, range_value_t

> && - @\libconcept{common_reference_with}@, range_reference_t

> && - @\libconcept{common_reference_with}@, range_rvalue_reference_t

>; - template concept @\defexposconcept{bidirectional-common}@ = @\libconcept{bidirectional_range}@ && @\libconcept{common_range}@; // \expos template<@\libconcept{input_range}@ V, @\libconcept{forward_range}@ Pattern> requires @\libconcept{view}@ && @\libconcept{input_range}@> && @\libconcept{view}@ - && @\exposconcept{compatible-joinable-ranges}@, Pattern> + && @\exposconcept{concatable}@, Pattern> class join_with_view : public view_interface> { using @\exposid{InnerRng}@ = range_reference_t; // \expos @@ -7081,7 +7073,8 @@ requires @\libconcept{forward_range}@ && @\libconcept{forward_range}@ && is_reference_v> && - @\libconcept{input_range}@> { + @\libconcept{input_range}@> && + @\exposconcept{concatable}@, const Pattern> { return @\exposid{iterator}@{*this, ranges::begin(@\exposid{base_}@)}; } @@ -7096,7 +7089,8 @@ constexpr auto end() const requires @\libconcept{forward_range}@ && @\libconcept{forward_range}@ && is_reference_v> && - @\libconcept{input_range}@> { + @\libconcept{input_range}@> && + @\exposconcept{concatable}@, const Pattern> { using InnerConstRng = range_reference_t; if constexpr (@\libconcept{forward_range}@ && @\libconcept{common_range}@ && @\libconcept{common_range}@) @@ -7146,7 +7140,7 @@ namespace std::ranges { template<@\libconcept{input_range}@ V, @\libconcept{forward_range}@ Pattern> requires @\libconcept{view}@ && @\libconcept{input_range}@> - && @\libconcept{view}@ && @\exposconcept{compatible-joinable-ranges}@, Pattern> + && @\libconcept{view}@ && @\exposconcept{concatable}@, Pattern> template class join_with_view::@\exposid{iterator}@ { using @\exposid{Parent}@ = @\exposid{maybe-const}@; // \expos @@ -7553,7 +7547,7 @@ namespace std::ranges { template<@\libconcept{input_range}@ V, @\libconcept{forward_range}@ Pattern> requires @\libconcept{view}@ && @\libconcept{input_range}@> - && @\libconcept{view}@ && @\exposconcept{compatible-joinable-ranges}@, Pattern> + && @\libconcept{view}@ && @\exposconcept{concatable}@, Pattern> template class join_with_view::@\exposid{sentinel}@ { using @\exposid{Parent}@ = @\exposid{maybe-const}@; // \expos @@ -8483,7 +8477,8 @@ Given a pack of subexpressions \tcode{Es...}, the expression \tcode{views::concat(Es...)} is expression-equivalent to \begin{itemize} -\item \tcode{views::all(Es...)} if \tcode{Es} is a pack with only one element, +\item \tcode{views::all(Es...)} if \tcode{Es} is a pack with only one element +whose type models \libconcept{input_range}, \item otherwise, \tcode{concat_view(Es...)}. \end{itemize} \begin{example} @@ -8987,6 +8982,10 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\expects +\tcode{it.\exposid{it_}.valueless_by_exception()} is \tcode{false}. + \pnum \effects Initializes \exposid{parent_} with \tcode{it.\exposid{parent_}}, and @@ -12242,7 +12241,8 @@ \begin{itemize} \item \tcode{((void)E, auto(views::empty>))} -if \tcode{N} is equal to \tcode{0}, +if \tcode{N} is equal to \tcode{0} and +\tcode{decltype((E))} models \libconcept{forward_range}, \item otherwise, \tcode{adjacent_view, N>(E)}. \end{itemize} @@ -12875,7 +12875,8 @@ a constant expression \tcode{N}: \begin{itemize} \item -If \tcode{N} is equal to \tcode{0}, +If \tcode{N} is equal to \tcode{0} and +\tcode{decltype((E))} models \libconcept{forward_range}, \tcode{views::adjacent_transform(E, F)} is expression-equivalent to \tcode{((void)E, views::zip_transform(F))}, except that the evaluations of \tcode{E} and \tcode{F} are diff --git a/source/support.tex b/source/support.tex index 4090a276d0..4baa2ac4bd 100644 --- a/source/support.tex +++ b/source/support.tex @@ -738,7 +738,7 @@ #define @\defnlibxname{cpp_lib_ranges_cartesian_product}@ 202207L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_chunk}@ 202202L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_chunk_by}@ 202202L // freestanding, also in \libheader{ranges} -#define @\defnlibxname{cpp_lib_ranges_concat}@ 202403L // also in \libheader{ranges} +#define @\defnlibxname{cpp_lib_ranges_concat}@ 202403L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_contains}@ 202207L // also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_ranges_enumerate}@ 202302L // also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_find_last}@ 202207L // also in \libheader{algorithm} diff --git a/source/utilities.tex b/source/utilities.tex index 3ab7583ff9..335b85035a 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -11003,10 +11003,9 @@ friend constexpr bool operator==(reference_wrapper, const T&); friend constexpr bool operator==(reference_wrapper, reference_wrapper); - friend constexpr @\exposidnc{synth-three-way-result}@ operator<=>(reference_wrapper, reference_wrapper); - friend constexpr @\exposidnc{synth-three-way-result}@ operator<=>(reference_wrapper, const T&); - friend constexpr @\exposidnc{synth-three-way-result}@ operator<=>(reference_wrapper, - reference_wrapper); + friend constexpr auto operator<=>(reference_wrapper, reference_wrapper); + friend constexpr auto operator<=>(reference_wrapper, const T&); + friend constexpr auto operator<=>(reference_wrapper, reference_wrapper); }; template @@ -11183,34 +11182,45 @@ \end{itemdescr} \begin{itemdecl} -friend constexpr @\exposidnc{synth-three-way-result}@ operator<=>(reference_wrapper x, reference_wrapper y); +friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper y); \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +The expression \tcode{\exposid{synth-three-way}(x.get(), y.get())} +is well-formed. + \pnum \returns \tcode{\exposid{synth-three-way}(x.get(), y.get())}. \end{itemdescr} \begin{itemdecl} -friend constexpr @\exposidnc{synth-three-way-result}@ operator<=>(reference_wrapper x, const T& y); +friend constexpr auto operator<=>(reference_wrapper x, const T& y); \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +The expression \tcode{\exposid{synth-three-way}(x.get(), y)} +is well-formed. + \pnum \returns \tcode{\exposid{synth-three-way}(x.get(), y)}. \end{itemdescr} \begin{itemdecl} -friend constexpr @\exposidnc{synth-three-way-result}@ operator<=>(reference_wrapper x, - reference_wrapper y); +friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper y); \end{itemdecl} \begin{itemdescr} \pnum \constraints \tcode{is_const_v} is \tcode{false}. +The expression \tcode{\exposid{synth-three-way}(x.get(), y.get())} +is well-formed. \pnum \returns @@ -17147,11 +17157,27 @@ \end{codeblock} \begin{note} Specializations such as \tcode{formatter} -and \tcode{formatter} that would require implicit multibyte / wide string or character conversion are disabled. \end{note} +\pnum +The header \libheaderdef{format} provides +the following disabled specializations: +\begin{itemize} +\item +The string type specializations +\begin{codeblock} +template<> struct formatter; +template<> struct formatter; +template struct formatter; +template + struct formatter, wchar_t>; +template + struct formatter, wchar_t>; +\end{codeblock} +\end{itemize} + \pnum For any types \tcode{T} and \tcode{charT} for which neither the library nor the user provides @@ -17604,6 +17630,9 @@ basic_format_args args_; // \expos Out out_; // \expos + basic_format_context(const basic_format_context&) = delete; + basic_format_context& operator=(const basic_format_context&) = delete; + public: using iterator = Out; using char_type = charT; @@ -18622,8 +18651,6 @@ const basic_format_arg* data_; // \expos public: - basic_format_args() noexcept; - template basic_format_args(const @\exposid{format-arg-store}@& store) noexcept; @@ -18646,17 +18673,6 @@ and packing the former. \end{note} -\indexlibraryctor{basic_format_args}% -\begin{itemdecl} -basic_format_args() noexcept; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\effects -Initializes \tcode{size_} with \tcode{0}. -\end{itemdescr} - \indexlibraryctor{basic_format_args}% \begin{itemdecl} template