diff --git a/source/containers.tex b/source/containers.tex index 69494898fa..7bf51f6327 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -887,7 +887,7 @@ \pnum \expects -Either \tcode{<=>} is defined for values of type (possibly const) \tcode{T}, +Either \tcode{T} models \libconcept{three_way_comparable}, or \tcode{<} is defined for values of type (possibly const) \tcode{T} and \tcode{<} is a total ordering relationship. @@ -919,7 +919,9 @@ and an \tcode{allocator_type} identical to \tcode{allocator_traits::rebind_alloc} and given an lvalue \tcode{m} of type \tcode{A}, a pointer \tcode{p} of type \tcode{T*}, -an expression \tcode{v} of type \tcode{T} or \tcode{const T}, +an expression \tcode{v} that denotes +an lvalue of type \tcode{T} or \tcode{const T} or +an rvalue of type \tcode{const T}, and an rvalue \tcode{rv} of type \tcode{T}, the following terms are defined. If \tcode{X} is not allocator-aware or is a specialization of \tcode{basic_string}, @@ -18355,6 +18357,12 @@ \tcode{ElementType} is required to be a complete object type that is not an abstract class type. +\pnum +For a \tcode{span} \tcode{s}, +any operation that invalidates a pointer in +the range \range{s.data()}{s.data() + s.size()} +invalidates pointers, iterators, and references to elements of \tcode{s}. + \rSec4[span.cons]{Constructors, copy, and assignment} \indexlibraryctor{span}% @@ -19018,6 +19026,9 @@ template struct submdspan_mapping_result; + struct full_extent_t { explicit full_extent_t() = default; }; + inline constexpr full_extent_t full_extent{}; + template constexpr auto submdspan_extents(const extents&, SliceSpecifiers...); @@ -21462,7 +21473,7 @@ is \tcode{true}. Equivalent to: \begin{codeblock} -return operator[](as_const(indices[P])...); +return operator[](extents_type::@\exposid{index-cast}@(as_const(indices[P]))...); \end{codeblock} \end{itemdescr} diff --git a/source/future.tex b/source/future.tex index 40d4e2a814..60133e942f 100644 --- a/source/future.tex +++ b/source/future.tex @@ -2124,10 +2124,12 @@ \tcode{codecvt_utf16}, and \tcode{codecvt_utf8_utf16}: \begin{itemize} \item - \tcode{Elem} is the wide-character type, such as + \tcode{Elem} is one of \keyword{wchar_t}, \keyword{char16_t}, or \keyword{char32_t}. \item - \tcode{Maxcode} is the largest wide-character code that the facet + \tcode{Maxcode} is the largest value of \tcode{Elem} + converted to \tcode{\keyword{unsigned} \keyword{long}} + that the facet will read or write without reporting a conversion error. \item If \tcode{(Mode \& consume_header)}, the facet shall consume an diff --git a/source/iostreams.tex b/source/iostreams.tex index 155919c60f..7bedc3d0b2 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -128,8 +128,9 @@ \pnum In the classes of \ref{input.output}, a template parameter with name \tcode{charT} represents a member of the set of types containing \tcode{char}, \keyword{wchar_t}, -and any other \impldef{set of character types that iostreams templates can be instantiated for} -character types that meet the requirements for a character on which any of +and any other \impldef{set of character container types that iostreams templates can be instantiated for} +character container types\iref{defns.character.container} +that meet the requirements for a character on which any of the iostream components can be instantiated. \rSec2[iostreams.threadsafety]{Thread safety} @@ -6361,7 +6362,7 @@ If a formatted output function of a stream \tcode{os} determines padding, it does so as follows. Given a \tcode{charT} character sequence \tcode{seq} where -\tcode{charT} is the character type of the stream, if +\tcode{charT} is the character container type of the stream, if the length of \tcode{seq} is less than \tcode{os.width()}, then enough copies of \tcode{os.fill()} are added to this sequence as necessary to pad to a width of \tcode{os.width()} characters. If @@ -6705,7 +6706,7 @@ of \tcode{out}. Constructs a character sequence \tcode{seq}. If \tcode{c} has type \tcode{char} -and the character type of the stream is not +and the character container type of the stream is not \tcode{char}, then \tcode{seq} consists of \tcode{out.widen(c)}; diff --git a/source/iterators.tex b/source/iterators.tex index b765432c95..dba63f6775 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -5458,7 +5458,7 @@ friend constexpr iter_difference_t operator-( const common_iterator& x, const common_iterator& y); - friend constexpr iter_rvalue_reference_t iter_move(const common_iterator& i) + friend constexpr decltype(auto) iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) requires @\libconcept{input_iterator}@; template<@\libconcept{indirectly_swappable}@ I2, class S2> @@ -5477,7 +5477,7 @@ template<@\libconcept{input_iterator}@ I, class S> struct iterator_traits> { using iterator_concept = @\seebelow@; - using iterator_category = @\seebelow@; + using iterator_category = @\seebelow@; // not always present using value_type = iter_value_t; using difference_type = iter_difference_t; using pointer = @\seebelow@; @@ -5489,22 +5489,25 @@ \rSec3[common.iter.types]{Associated types} \pnum -The nested \grammarterm{typedef-name}s of the specialization of -\tcode{iterator_traits} for \tcode{common_iterator} are defined as follows. +The nested \grammarterm{typedef-name} \tcode{iterator_category} of +the specialization of \tcode{iterator_traits} for \tcode{common_iterator} +is defined if and only if \tcode{iter_difference_t} is an integral type. +In that case, +\tcode{iterator_category} denotes \tcode{forward_iterator_tag} if +the \grammarterm{qualified-id} \tcode{iterator_traits::iterator_category} +is valid and denotes a type that +models \tcode{\libconcept{derived_from}}; +otherwise it denotes \tcode{input_iterator_tag}. + +\pnum +The remaining nested \grammarterm{typedef-name}s of the specialization of +\tcode{iterator_traits} for \tcode{common_iterator} are defined as follows: \begin{itemize} \item \tcode{iterator_concept} denotes \tcode{forward_iterator_tag} if \tcode{I} models \libconcept{forward_iterator}; otherwise it denotes \tcode{input_iterator_tag}. -\item -\tcode{iterator_category} denotes -\tcode{forward_iterator_tag} -if the \grammarterm{qualified-id} \tcode{iterator_traits::iter\-ator_category} -is valid and denotes a type that -models \tcode{\libconcept{derived_from}}; -otherwise it denotes \tcode{input_iterator_tag}. - \item Let \tcode{a} denote an lvalue of type \tcode{const common_iterator}. If the expression \tcode{a.operator->()} is well-formed, @@ -5797,7 +5800,7 @@ \indexlibrarymember{iter_move}{common_iterator}% \begin{itemdecl} -friend constexpr iter_rvalue_reference_t iter_move(const common_iterator& i) +friend constexpr decltype(auto) iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) requires @\libconcept{input_iterator}@; \end{itemdecl} @@ -5956,7 +5959,7 @@ friend constexpr strong_ordering operator<=>( const counted_iterator& x, const counted_iterator& y); - friend constexpr iter_rvalue_reference_t iter_move(const counted_iterator& i) + friend constexpr decltype(auto) iter_move(const counted_iterator& i) noexcept(noexcept(ranges::iter_move(i.current))) requires @\libconcept{input_iterator}@; template<@\libconcept{indirectly_swappable}@ I2> @@ -6384,7 +6387,7 @@ \indexlibrarymember{iter_move}{counted_iterator}% \begin{itemdecl} -friend constexpr iter_rvalue_reference_t +friend constexpr decltype(auto) iter_move(const counted_iterator& i) noexcept(noexcept(ranges::iter_move(i.current))) requires @\libconcept{input_iterator}@; @@ -7212,6 +7215,8 @@ headers are included: \libheaderref{array}, \libheaderref{deque}, +\libheaderrefx{flat_map}{flat.map.syn}, +\libheaderrefx{flat_set}{flat.set.syn}, \libheaderrefx{forward_list}{forward.list.syn}, \libheaderref{list}, \libheaderrefx{map}{associative.map.syn}, diff --git a/source/locales.tex b/source/locales.tex index e36f215d68..962d0acb01 100644 --- a/source/locales.tex +++ b/source/locales.tex @@ -394,9 +394,9 @@ respectively\iref{iterator.requirements}. A template parameter with name \tcode{C} represents the set of types containing \keyword{char}, \keyword{wchar_t}, and any other -\impldef{set of character types +\impldef{set of character container types that iostreams templates can be instantiated for} -character types +character container types\iref{defns.character.container} that meet the requirements for a character on which any of the iostream components can be instantiated. A template parameter with name \tcode{International} diff --git a/source/memory.tex b/source/memory.tex index d3bc9c6071..8cb79385db 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -5451,10 +5451,8 @@ % pretend to \item that there is real text here, but undo the vertical spacing \mbox{}\vspace{-\baselineskip}\vspace{-\parskip} \begin{codeblock} -if (p) { - apply([&](auto&&... args) { - s = Smart( static_cast(p), std::forward(args)...); }, std::move(a)); -} +apply([&](auto&&... args) { + s = Smart(static_cast(p), std::forward(args)...); }, std::move(a)); \end{codeblock} if \tcode{is_pointer_v} is \tcode{true}; \item diff --git a/source/numerics.tex b/source/numerics.tex index 14308f349e..a8293f2c3a 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2885,13 +2885,13 @@ static constexpr size_t long_lag = r; static constexpr result_type min() { return 0; } static constexpr result_type max() { return @$m - 1$@; } - static constexpr result_type default_seed = 19780503u; + static constexpr uint_least32_t default_seed = 19780503u; // constructors and seeding functions - subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {} + subtract_with_carry_engine() : subtract_with_carry_engine(0u) {} explicit subtract_with_carry_engine(result_type value); template explicit subtract_with_carry_engine(Sseq& q); - void seed(result_type value = default_seed); + void seed(result_type value = 0u); template void seed(Sseq& q); // equality operators @@ -2946,7 +2946,7 @@ first construct \tcode{e}, a \tcode{linear_congruential_engine} object, as if by the following definition: \begin{codeblock} -linear_congruential_engine e(value == 0u ? default_seed : value); \end{codeblock} Then, to set each $X_k$, diff --git a/source/ranges.tex b/source/ranges.tex index e7f3c4946a..ad29f97687 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -65,9 +65,9 @@ template<@\libconcept{range}@ R> using sentinel_t = decltype(ranges::end(declval())); // freestanding template<@\libconcept{range}@ R> - using const_iterator_t = const_iterator>; // freestanding + using const_iterator_t = decltype(ranges::cbegin(declval())); // freestanding template<@\libconcept{range}@ R> - using const_sentinel_t = const_sentinel>; // freestanding + using const_sentinel_t = decltype(ranges::cend(declval())); // freestanding template<@\libconcept{range}@ R> using range_difference_t = iter_difference_t>; // freestanding template<@\libconcept{sized_range}@ R> @@ -393,7 +393,7 @@ // \ref{range.as.const}, as const view template<@\libconcept{input_range}@ R> - constexpr auto& @\exposid{possibly-const-range}@(R& r) { // \expos + constexpr auto& @\exposid{possibly-const-range}@(R& r) noexcept { // \expos if constexpr (@\libconcept{constant_range}@ && !@\libconcept{constant_range}@) { return const_cast(r); } else { @@ -1184,7 +1184,7 @@ \begin{codeblock} template -constexpr auto @\exposid{as-const-pointer}@(const T* p) { return p; } // \expos +constexpr auto @\exposid{as-const-pointer}@(const T* p) noexcept { return p; } // \expos \end{codeblock} \pnum @@ -2685,6 +2685,7 @@ constexpr auto end() const; constexpr @\exposid{iterator}@ end() const requires @\libconcept{same_as}@; + constexpr bool empty() const; constexpr auto size() const requires @\seebelow@; }; @@ -2902,6 +2903,17 @@ Equivalent to: \tcode{return \exposid{iterator}\{\exposid{bound_}\};} \end{itemdescr} +\indexlibrarymember{empty}{iota_view}% +\begin{itemdecl} +constexpr bool empty() const; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: \tcode{return \exposid{value_} == \exposid{bound_};} +\end{itemdescr} + \indexlibrarymember{size}{iota_view}% \begin{itemdecl} constexpr auto size() const requires @\seebelow@; @@ -11884,7 +11896,7 @@ adjacent_transform_view() = default; constexpr explicit adjacent_transform_view(V base, F fun); - constexpr V base() const & requires @\libconcept{copy_constructible}@<@\exposid{InnerView}@> { return @\exposid{inner_}@.base(); } + constexpr V base() const & requires @\libconcept{copy_constructible}@ { return @\exposid{inner_}@.base(); } constexpr V base() && { return std::move(@\exposid{inner_}@).base(); } constexpr auto begin() { diff --git a/source/strings.tex b/source/strings.tex index c0213a348a..ef157c9cd4 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -751,10 +751,10 @@ any operation that invalidates a pointer in the range \begin{codeblock} -@\range{str.data()}{\brk{}str.data() + str.size()}@ +@\range{str.data()}{str.data() + str.size()}@ \end{codeblock} invalidates pointers, iterators, and references -returned from \tcode{str}'s member functions. +to elements of \tcode{str}. \pnum The complexity of \tcode{basic_string_view} member functions is \bigoh{1} diff --git a/source/threads.tex b/source/threads.tex index ab471217c1..c906079668 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -3712,6 +3712,7 @@ \pnum The specialization \tcode{atomic} is a standard-layout struct. +It has a trivial destructor. \pnum \begin{note} diff --git a/source/utilities.tex b/source/utilities.tex index fd9453e2e3..686afd2774 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -1615,8 +1615,10 @@ \end{itemdescr} \rSec2[tuple.tuple]{Class template \tcode{tuple}} -\indexlibraryglobal{tuple}% +\rSec3[tuple.tuple.general]{General} + +\indexlibraryglobal{tuple}% \begin{codeblock} namespace std { template @@ -1742,6 +1744,10 @@ } \end{codeblock} +\pnum +If a program declares an explicit or partial specialization of \tcode{tuple}, +the program is ill-formed, no diagnostic required. + \rSec3[tuple.cnstr]{Construction} \pnum @@ -4153,7 +4159,7 @@ \begin{itemdescr} \pnum -Let \tcode{U} be \tcode{invoke_result_t}. +Let \tcode{U} be \tcode{invoke_result_t}. \pnum \mandates @@ -4164,7 +4170,7 @@ Equivalent to: \begin{codeblock} if (*this) { - return invoke(std::forward(f), value()); + return invoke(std::forward(f), *val); } else { return remove_cvref_t(); } @@ -4179,7 +4185,7 @@ \begin{itemdescr} \pnum -Let \tcode{U} be \tcode{invoke_result_t}. +Let \tcode{U} be \tcode{invoke_result_t}. \pnum \mandates @@ -4190,7 +4196,7 @@ Equivalent to: \begin{codeblock} if (*this) { - return invoke(std::forward(f), std::move(value())); + return invoke(std::forward(f), std::move(*val)); } else { return remove_cvref_t(); } @@ -4205,7 +4211,7 @@ \begin{itemdescr} \pnum -Let \tcode{U} be \tcode{remove_cv_t>}. +Let \tcode{U} be \tcode{remove_cv_t>}. \pnum \mandates @@ -4213,7 +4219,7 @@ other than \tcode{in_place_t} or \tcode{nullopt_t}. The declaration \begin{codeblock} -U u(invoke(std::forward(f), value())); +U u(invoke(std::forward(f), *val)); \end{codeblock} is well-formed for some invented variable \tcode{u}. \begin{note} @@ -4224,7 +4230,7 @@ \returns If \tcode{*this} contains a value, an \tcode{optional} object whose contained value is direct-non-list-initialized with -\tcode{invoke(std::forward(f), value())}; +\tcode{invoke(std::forward(f), *val)}; otherwise, \tcode{optional()}. \end{itemdescr} @@ -4237,7 +4243,7 @@ \begin{itemdescr} \pnum Let \tcode{U} be -\tcode{remove_cv_t>}. +\tcode{remove_cv_t>}. \pnum \mandates @@ -4245,7 +4251,7 @@ other than \tcode{in_place_t} or \tcode{nullopt_t}. The declaration \begin{codeblock} -U u(invoke(std::forward(f), std::move(value()))); +U u(invoke(std::forward(f), std::move(*val))); \end{codeblock} is well-formed for some invented variable \tcode{u}. \begin{note} @@ -4256,7 +4262,7 @@ \returns If \tcode{*this} contains a value, an \tcode{optional} object whose contained value is direct-non-list-initialized with -\tcode{invoke(std::forward(f), std::move(value()))}; +\tcode{invoke(std::forward(f), std::move(*val))}; otherwise, \tcode{optional()}. \end{itemdescr} @@ -5051,6 +5057,10 @@ A program that instantiates the definition of \tcode{variant} with no template arguments is ill-formed. +\pnum +If a program declares an explicit or partial specialization of \tcode{variant}, +the program is ill-formed, no diagnostic required. + \rSec3[variant.ctor]{Constructors} \pnum @@ -6906,9 +6916,13 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\mandates +\tcode{is_void_v} is \tcode{false}. + \pnum \returns -If \tcode{operand != nullptr \&\& operand->type() == typeid(T)}, +If \tcode{operand != nullptr \&\& operand->type() == typeid(T)} is \tcode{true}, a pointer to the object contained by \tcode{operand}; otherwise, \keyword{nullptr}. @@ -8097,7 +8111,7 @@ equivalent to: \tcode{using std::swap; swap(\exposid{unex}, rhs.\exposid{unex});} \\ \end{floattable} -For the case where \tcode{rhs.value()} is \tcode{false} and +For the case where \tcode{rhs.has_value()} is \tcode{false} and \tcode{this->has_value()} is \tcode{true}, equivalent to: \begin{codeblock} if constexpr (is_nothrow_move_constructible_v) { @@ -8364,7 +8378,7 @@ \begin{itemdescr} \pnum -Let \tcode{U} be \tcode{remove_cvref_t>}. +Let \tcode{U} be \tcode{remove_cvref_t>}. \pnum \constraints @@ -8380,7 +8394,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return invoke(std::forward(f), **this); + return invoke(std::forward(f), @\exposid{val}@); else return U(unexpect, error()); \end{codeblock} @@ -8395,7 +8409,7 @@ \begin{itemdescr} \pnum Let \tcode{U} be -\tcode{remove_cvref_t>}. +\tcode{remove_cvref_t>}. \pnum \constraints @@ -8411,7 +8425,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return invoke(std::forward(f), std::move(**this)); + return invoke(std::forward(f), std::move(@\exposid{val}@)); else return U(unexpect, std::move(error())); \end{codeblock} @@ -8429,7 +8443,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8441,7 +8455,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return G(in_place, **this); + return G(in_place, @\exposid{val}@); else return invoke(std::forward(f), error()); \end{codeblock} @@ -8460,7 +8474,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8472,7 +8486,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return G(in_place, std::move(**this)); + return G(in_place, std::move(@\exposid{val}@)); else return invoke(std::forward(f), std::move(error())); \end{codeblock} @@ -8487,7 +8501,7 @@ \begin{itemdescr} \pnum Let \tcode{U} be -\tcode{remove_cv_t>}. +\tcode{remove_cv_t>}. \pnum \constraints @@ -8499,7 +8513,7 @@ If \tcode{is_void_v} is \tcode{false}, the declaration \begin{codeblock} -U u(invoke(std::forward(f), **this)); +U u(invoke(std::forward(f), @\exposid{val}@)); \end{codeblock} is well-formed. @@ -8513,9 +8527,9 @@ Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an \tcode{expected} object whose \exposid{has_val} member is \tcode{true} and \exposid{val} member is direct-non-list-initialized with -\tcode{invoke(std::forward(f), **this)}. +\tcode{invoke(std::forward(f), \exposid{val})}. \item -Otherwise, evaluates \tcode{invoke(std::forward(f), **this)} and then +Otherwise, evaluates \tcode{invoke(std::forward(f), \exposid{val})} and then returns \tcode{expected()}. \end{itemize} \end{itemdescr} @@ -8529,7 +8543,7 @@ \begin{itemdescr} \pnum Let \tcode{U} be -\tcode{remove_cv_t>}. +\tcode{remove_cv_t>}. \pnum \constraints @@ -8540,7 +8554,7 @@ \tcode{U} is a valid value type for \tcode{expected}. If \tcode{is_void_v} is \tcode{false}, the declaration \begin{codeblock} -U u(invoke(std::forward(f), std::move(**this))); +U u(invoke(std::forward(f), std::move(@\exposid{val}@))); \end{codeblock} is well-formed. @@ -8554,9 +8568,9 @@ Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an \tcode{expected} object whose \exposid{has_val} member is \tcode{true} and \exposid{val} member is direct-non-list-initialized with -\tcode{invoke(std::forward(f), std::move(**this))}. +\tcode{invoke(std::forward(f), std::move(\exposid{val}))}. \item -Otherwise, evaluates \tcode{invoke(std::forward(f), std::move(**this))} and +Otherwise, evaluates \tcode{invoke(std::forward(f), std::move(\exposid{val}))} and then returns \tcode{ex\-pected()}. \end{itemize} \end{itemdescr} @@ -8573,7 +8587,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8587,7 +8601,7 @@ \pnum \returns If \tcode{has_value()} is \tcode{true}, -\tcode{expected(in_place, **this)}; otherwise, an \tcode{expected} +\tcode{expected(in_place, \exposid{val})}; otherwise, an \tcode{expected} object whose \exposid{has_val} member is \tcode{false} and \exposid{unex} member is direct-non-list-initialized with \tcode{invoke(std::forward(f), error())}. \end{itemdescr} @@ -8605,7 +8619,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8619,7 +8633,7 @@ \pnum \returns If \tcode{has_value()} is \tcode{true}, -\tcode{expected(in_place, std::move(**this))}; otherwise, an +\tcode{expected(in_place, std::move(\exposid{val}))}; otherwise, an \tcode{expected} object whose \exposid{has_val} member is \tcode{false} and \exposid{unex} member is direct-non-list-initialized with \tcode{invoke(std::forward(f), std::move(error()))}. @@ -9180,7 +9194,7 @@ equivalent to: \tcode{using std::swap; swap(\exposid{unex}, rhs.\exposid{unex});} \\ \end{floattable} -For the case where \tcode{rhs.value()} is \tcode{false} and +For the case where \tcode{rhs.has_value()} is \tcode{false} and \tcode{this->has_value()} is \tcode{true}, equivalent to: \begin{codeblock} construct_at(addressof(@\exposid{unex}@), std::move(rhs.@\exposid{unex}@)); @@ -15731,7 +15745,7 @@ \begin{ncbnf} \fmtnontermdef{format-spec}\br - \textnormal{as specified by the \tcode{formatter} specialization for the argument type} + \textnormal{as specified by the \tcode{formatter} specialization for the argument type; cannot start with \terminal{\}} } \end{ncbnf} \pnum @@ -16780,7 +16794,7 @@ \fmtgrammarterm{format-spec}\iref{format.string} of the replacement field being formatted in the format string. -If \fmtgrammarterm{format-spec} is empty then either +If \fmtgrammarterm{format-spec} is not present or empty then either \tcode{pc.begin() == pc.end()} or \tcode{*pc.begin() == '\}'}. @@ -17151,7 +17165,7 @@ string s4 = format("[{:?}]", string("\0 \n \t \x02 \x1b", 9)); // \tcode{s4} has value: \tcode{["\textbackslash u\{0\} \textbackslash n \textbackslash t \textbackslash u\{2\} \textbackslash u\{1b\}"]} string s5 = format("[{:?}]", "\xc3\x28"); // invalid UTF-8, \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}("]} -string s6 = format("[{:?}]", "@\importexample{example_02}@"); @\kern0.75pt@// \tcode{s6} has value: \tcode{["\importexample{example_03}\textbackslash{u}\{200d\}\importexample{example_04}\textbackslash{u}\{fe0f\}"]} +string s6 = format("[{:?}]", "@\importexample{example_02}@"); @\kern0.75pt@// \tcode{s6} has value: \tcode{["\importexample{example_03}\textbackslash{u}\{200d\}\importexample{example_04}"]} string s7 = format("[{:?}]", "\u0301"); // \tcode{s7} has value: \tcode{["\textbackslash u\{301\}"]} string s8 = format("[{:?}]", "\\\u0301"); // \tcode{s8} has value: \tcode{["\textbackslash \textbackslash \textbackslash u\{301\}"]} string s9 = format("[{:?}]", "e\u0301\u0323"); // \tcode{s9} has value: \tcode{["\importexample[-2pt]{example_06}"]} @@ -17754,8 +17768,11 @@ \begin{itemdescr} \pnum \effects -Parses the format specifier as a \fmtgrammarterm{range-format-spec} and +Parses the format specifiers as a \fmtgrammarterm{range-format-spec} and stores the parsed specifiers in \tcode{*this}. +Calls \tcode{\exposid{underlying_}.parse(ctx)} to parse +\fmtgrammarterm{format-spec} in \fmtgrammarterm{range-format-spec} or, +if the latter is not present, an empty \fmtgrammarterm{format-spec}. The values of \exposid{opening-bracket_}, \exposid{closing-bracket_}, and \exposid{separator_} are modified if and only if required by @@ -18598,7 +18615,7 @@ \begin{itemdescr} \pnum \effects -Parses the format specifier as a \fmtgrammarterm{tuple-format-spec} and +Parses the format specifiers as a \fmtgrammarterm{tuple-format-spec} and stores the parsed specifiers in \tcode{*this}. The values of \exposid{opening-bracket_}, @@ -18607,6 +18624,8 @@ are modified if and only if required by the \fmtgrammarterm{tuple-type}, if present. For each element \tcode{\placeholder{e}} in \exposid{underlying_}, +calls \tcode{\placeholder{e}.parse(ctx)} to parse +an empty \fmtgrammarterm{format-spec} and, if \tcode{\placeholder{e}.set_debug_format()} is a valid expression, calls \tcode{\placeholder{e}.set_debug_format()}.