diff --git a/source/classes.tex b/source/classes.tex index 1c9bed03ca..77105a2dbd 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -1152,7 +1152,7 @@ \pnum For a class, its direct non-static data members, its non-virtual direct base classes, and, if the class is not abstract\iref{class.abstract}, its virtual base -classes are called its \term{potentially constructed subobjects}. +classes are called its \defnadjx{potentially constructed}{subobjects}{subobject}. \rSec2[class.ctor]{Constructors}% @@ -5478,7 +5478,7 @@ typedef A global_A; struct B { }; struct C: public A, public B { C(); }; -C::C(): global_A() { } // mem-initializer for base \tcode{A} +C::C(): global_A() { } // \grammarterm{mem-initializer} for base \tcode{A} \end{codeblock} \end{example} diff --git a/source/declarations.tex b/source/declarations.tex index d3821debca..80d34f0cfc 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -249,7 +249,9 @@ \pnum If the \grammarterm{decl-specifier-seq} contains the \keyword{typedef} -specifier, the declaration is a \defnx{typedef declaration}{declaration!\idxcode{typedef}} +specifier, the declaration is a +\indextext{typedef declaration|see{declaration, \idxcode{typedef}}} +\defnx{typedef declaration}{declaration!\idxcode{typedef}} and each \grammarterm{declarator-id} is declared to be a \grammarterm{typedef-name}\iref{dcl.typedef}. \begin{note} @@ -258,10 +260,10 @@ \end{note} Otherwise, if the type associated with a \grammarterm{declarator-id} is a function type\iref{dcl.fct}, -the declaration is a \defnx{function declaration}{declaration!function}. +the declaration is a \defnadj{function}{declaration}. Otherwise, if the type associated with a \grammarterm{declarator-id} is an object or reference type, the declaration is -an \defnx{object declaration}{declaration!object}. +an \defnadj{object}{declaration}. Otherwise, the program is ill-formed. \begin{example} \begin{codeblock} diff --git a/source/iterators.tex b/source/iterators.tex index 8c8469c0fa..1f6a95cae0 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -5100,7 +5100,7 @@ \indexlibrarymember{operator<}{move_iterator}% \begin{itemdecl} template -constexpr bool operator<(const move_iterator& x, const move_iterator& y); + constexpr bool operator<(const move_iterator& x, const move_iterator& y); \end{itemdecl} \begin{itemdescr} @@ -5117,7 +5117,7 @@ \indexlibrarymember{operator>}{move_iterator}% \begin{itemdecl} template -constexpr bool operator>(const move_iterator& x, const move_iterator& y); + constexpr bool operator>(const move_iterator& x, const move_iterator& y); \end{itemdecl} \begin{itemdescr} @@ -5134,7 +5134,7 @@ \indexlibrarymember{operator<=}{move_iterator}% \begin{itemdecl} template -constexpr bool operator<=(const move_iterator& x, const move_iterator& y); + constexpr bool operator<=(const move_iterator& x, const move_iterator& y); \end{itemdecl} \begin{itemdescr} @@ -5151,7 +5151,7 @@ \indexlibrarymember{operator>=}{move_iterator}% \begin{itemdecl} template -constexpr bool operator>=(const move_iterator& x, const move_iterator& y); + constexpr bool operator>=(const move_iterator& x, const move_iterator& y); \end{itemdecl} \begin{itemdescr} diff --git a/source/numerics.tex b/source/numerics.tex index f228a4ed5c..58ccd556ed 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -21396,5 +21396,5 @@ \remarks Each function template has the same semantics as the corresponding type-generic macro with the same name -specified in \xrefc{7.20}. +specified in \IsoC{} 7.20. \end{itemdescr} diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 39cd5e50f2..ae6414c88a 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -443,7 +443,7 @@ Otherwise, \mname{STDC_EMBED_NOT_FOUND}. \end{itemize} \begin{note} -An unrecognized \grammarterm{embed-parameter} in an \grammarterm{has-embed-expression} +An unrecognized \grammarterm{embed-parameter} in a \grammarterm{has-embed-expression} is not ill-formed and is instead treated as not supported. \end{note} @@ -1218,7 +1218,7 @@ \rSec3[cpp.embed.param.if.empty]{\tcode{if_empty} parameter} \pnum -An embed-parameter of the form +An \grammarterm{embed-parameter} of the form \begin{ncsimplebnf} \terminal{if_empty (} \opt{pp-balanced-token-seq} \terminal{)} \end{ncsimplebnf} diff --git a/source/support.tex b/source/support.tex index 28fd69f6ee..7f55876592 100644 --- a/source/support.tex +++ b/source/support.tex @@ -1838,34 +1838,6 @@ macros that specify limits of integer types. \indexheader{cstdint}% -\indexlibraryglobal{int8_t}% -\indexlibraryglobal{int16_t}% -\indexlibraryglobal{int32_t}% -\indexlibraryglobal{int64_t}% -\indexlibraryglobal{int_fast8_t}% -\indexlibraryglobal{int_fast16_t}% -\indexlibraryglobal{int_fast32_t}% -\indexlibraryglobal{int_fast64_t}% -\indexlibraryglobal{int_least8_t}% -\indexlibraryglobal{int_least16_t}% -\indexlibraryglobal{int_least32_t}% -\indexlibraryglobal{int_least64_t}% -\indexlibraryglobal{intmax_t}% -\indexlibraryglobal{intptr_t}% -\indexlibraryglobal{uint8_t}% -\indexlibraryglobal{uint16_t}% -\indexlibraryglobal{uint32_t}% -\indexlibraryglobal{uint64_t}% -\indexlibraryglobal{uint_fast8_t}% -\indexlibraryglobal{uint_fast16_t}% -\indexlibraryglobal{uint_fast32_t}% -\indexlibraryglobal{uint_fast64_t}% -\indexlibraryglobal{uint_least8_t}% -\indexlibraryglobal{uint_least16_t}% -\indexlibraryglobal{uint_least32_t}% -\indexlibraryglobal{uint_least64_t}% -\indexlibraryglobal{uintmax_t}% -\indexlibraryglobal{uintptr_t}% \indexlibraryglobal{INTN_MIN}% \indexlibraryglobal{INTN_MAX}% \indexlibraryglobal{UINTN_MAX}% @@ -1875,71 +1847,54 @@ \indexlibraryglobal{INT_LEASTN_MIN}% \indexlibraryglobal{INT_LEASTN_MAX}% \indexlibraryglobal{UINT_LEASTN_MAX}% -\indexlibraryglobal{INTMAX_MIN}% -\indexlibraryglobal{INTMAX_MAX}% -\indexlibraryglobal{UINTMAX_MAX}% -\indexlibraryglobal{INTPTR_MIN}% -\indexlibraryglobal{INTPTR_MAX}% -\indexlibraryglobal{UINTPTR_MAX}% -\indexlibraryglobal{PTRDIFF_MIN}% -\indexlibraryglobal{PTRDIFF_MAX}% -\indexlibraryglobal{SIZE_MAX}% -\indexlibraryglobal{SIG_ATOMIC_MIN}% -\indexlibraryglobal{SIG_ATOMIC_MAX}% -\indexlibraryglobal{WCHAR_MAX}% -\indexlibraryglobal{WCHAR_MIN}% -\indexlibraryglobal{WINT_MIN}% -\indexlibraryglobal{WINT_MAX}% \indexlibraryglobal{INTN_C}% \indexlibraryglobal{UINTN_C}% -\indexlibraryglobal{INTMAX_C}% -\indexlibraryglobal{UINTMAX_C}% \begin{codeblock} // all freestanding #define @\libmacro{__STDC_VERSION_STDINT_H__}@ 202311L namespace std { - using int8_t = @\textit{signed integer type}@; // optional - using int16_t = @\textit{signed integer type}@; // optional - using int32_t = @\textit{signed integer type}@; // optional - using int64_t = @\textit{signed integer type}@; // optional + using @\libglobal{int8_t}@ = @\textit{signed integer type}@; // optional + using @\libglobal{int16_t}@ = @\textit{signed integer type}@; // optional + using @\libglobal{int32_t}@ = @\textit{signed integer type}@; // optional + using @\libglobal{int64_t}@ = @\textit{signed integer type}@; // optional using int@\placeholdernc{N}@_t = @\seebelow@; // optional - using int_fast8_t = @\textit{signed integer type}@; - using int_fast16_t = @\textit{signed integer type}@; - using int_fast32_t = @\textit{signed integer type}@; - using int_fast64_t = @\textit{signed integer type}@; + using @\libglobal{int_fast8_t}@ = @\textit{signed integer type}@; + using @\libglobal{int_fast16_t}@ = @\textit{signed integer type}@; + using @\libglobal{int_fast32_t}@ = @\textit{signed integer type}@; + using @\libglobal{int_fast64_t}@ = @\textit{signed integer type}@; using int_fast@\placeholdernc{N}@_t = @\seebelow@; // optional - using int_least8_t = @\textit{signed integer type}@; - using int_least16_t = @\textit{signed integer type}@; - using int_least32_t = @\textit{signed integer type}@; - using int_least64_t = @\textit{signed integer type}@; + using @\libglobal{int_least8_t}@ = @\textit{signed integer type}@; + using @\libglobal{int_least16_t}@ = @\textit{signed integer type}@; + using @\libglobal{int_least32_t}@ = @\textit{signed integer type}@; + using @\libglobal{int_least64_t}@ = @\textit{signed integer type}@; using int_least@\placeholdernc{N}@_t = @\seebelow@; // optional - using intmax_t = @\textit{signed integer type}@; - using intptr_t = @\textit{signed integer type}@; + using @\libglobal{intmax_t}@ = @\textit{signed integer type}@; + using @\libglobal{intptr_t}@ = @\textit{signed integer type}@; - using uint8_t = @\textit{unsigned integer type}@; // optional - using uint16_t = @\textit{unsigned integer type}@; // optional - using uint32_t = @\textit{unsigned integer type}@; // optional - using uint64_t = @\textit{unsigned integer type}@; // optional + using @\libglobal{uint8_t}@ = @\textit{unsigned integer type}@; // optional + using @\libglobal{uint16_t}@ = @\textit{unsigned integer type}@; // optional + using @\libglobal{uint32_t}@ = @\textit{unsigned integer type}@; // optional + using @\libglobal{uint64_t}@ = @\textit{unsigned integer type}@; // optional using uint@\placeholdernc{N}@_t = @\seebelow@; // optional - using uint_fast8_t = @\textit{unsigned integer type}@; - using uint_fast16_t = @\textit{unsigned integer type}@; - using uint_fast32_t = @\textit{unsigned integer type}@; - using uint_fast64_t = @\textit{unsigned integer type}@; + using @\libglobal{uint_fast8_t}@ = @\textit{unsigned integer type}@; + using @\libglobal{uint_fast16_t}@ = @\textit{unsigned integer type}@; + using @\libglobal{uint_fast32_t}@ = @\textit{unsigned integer type}@; + using @\libglobal{uint_fast64_t}@ = @\textit{unsigned integer type}@; using uint_fast@\placeholdernc{N}@_t = @\seebelow@; // optional - using uint_least8_t = @\textit{unsigned integer type}@; - using uint_least16_t = @\textit{unsigned integer type}@; - using uint_least32_t = @\textit{unsigned integer type}@; - using uint_least64_t = @\textit{unsigned integer type}@; + using @\libglobal{uint_least8_t}@ = @\textit{unsigned integer type}@; + using @\libglobal{uint_least16_t}@ = @\textit{unsigned integer type}@; + using @\libglobal{uint_least32_t}@ = @\textit{unsigned integer type}@; + using @\libglobal{uint_least64_t}@ = @\textit{unsigned integer type}@; using uint_least@\placeholdernc{N}@_t = @\seebelow@; // optional - using uintmax_t = @\textit{unsigned integer type}@; - using uintptr_t = @\textit{unsigned integer type}@; + using @\libglobal{uintmax_t}@ = @\textit{unsigned integer type}@; + using @\libglobal{uintptr_t}@ = @\textit{unsigned integer type}@; } #define INT@\placeholdernc{N}@_MIN @\seebelow@ @@ -1960,40 +1915,40 @@ #define INT_LEAST@\placeholdernc{N}@_WIDTH @\seebelow@ #define UINT_LEAST@\placeholdernc{N}@_WIDTH @\seebelow@ -#define INTMAX_MIN @\seebelow@ -#define INTMAX_MAX @\seebelow@ -#define UINTMAX_MAX @\seebelow@ -#define INTMAX_WIDTH @\seebelow@ -#define UINTMAX_WIDTH @\seebelow@ +#define @\libmacro{INTMAX_MIN}@ @\seebelow@ +#define @\libmacro{INTMAX_MAX}@ @\seebelow@ +#define @\libmacro{UINTMAX_MAX}@ @\seebelow@ +#define @\libmacro{INTMAX_WIDTH}@ @\seebelow@ +#define @\libmacro{UINTMAX_WIDTH}@ @\seebelow@ -#define INTPTR_MIN @\seebelow@ -#define INTPTR_MAX @\seebelow@ -#define UINTPTR_MAX @\seebelow@ -#define INTPTR_WIDTH @\seebelow@ -#define UINTPTR_WIDTH @\seebelow@ +#define @\libglobal{INTPTR_MIN}@ @\seebelow@ +#define @\libglobal{INTPTR_MAX}@ @\seebelow@ +#define @\libglobal{UINTPTR_MAX}@ @\seebelow@ +#define @\libglobal{INTPTR_WIDTH}@ @\seebelow@ +#define @\libglobal{UINTPTR_WIDTH}@ @\seebelow@ -#define PTRDIFF_MIN @\seebelow@ -#define PTRDIFF_MAX @\seebelow@ -#define PTRDIFF_WIDTH @\seebelow@ -#define SIZE_MAX @\seebelow@ -#define SIZE_WIDTH @\seebelow@ +#define @\libmacro{PTRDIFF_MIN}@ @\seebelow@ +#define @\libmacro{PTRDIFF_MAX}@ @\seebelow@ +#define @\libmacro{PTRDIFF_WIDTH}@ @\seebelow@ +#define @\libmacro{SIZE_MAX}@ @\seebelow@ +#define @\libmacro{SIZE_WIDTH}@ @\seebelow@ -#define SIG_ATOMIC_MIN @\seebelow@ -#define SIG_ATOMIC_MAX @\seebelow@ -#define SIG_ATOMIC_WIDTH @\seebelow@ +#define @\libmacro{SIG_ATOMIC_MIN}@ @\seebelow@ +#define @\libmacro{SIG_ATOMIC_MAX}@ @\seebelow@ +#define @\libmacro{SIG_ATOMIC_WIDTH}@ @\seebelow@ -#define WCHAR_MIN @\seebelow@ -#define WCHAR_MAX @\seebelow@ -#define WCHAR_WIDTH @\seebelow@ +#define @\libmacro{WCHAR_MIN}@ @\seebelow@ +#define @\libmacro{WCHAR_MAX}@ @\seebelow@ +#define @\libmacro{WCHAR_WIDTH}@ @\seebelow@ -#define WINT_MIN @\seebelow@ -#define WINT_MAX @\seebelow@ -#define WINT_WIDTH @\seebelow@ +#define @\libmacro{WINT_MIN}@ @\seebelow@ +#define @\libmacro{WINT_MAX}@ @\seebelow@ +#define @\libmacro{WINT_WIDTH}@ @\seebelow@ #define INT@\placeholdernc{N}@_C(value) @\seebelow@ #define UINT@\placeholdernc{N}@_C(value) @\seebelow@ -#define INTMAX_C(value) @\seebelow@ -#define UINTMAX_C(value) @\seebelow@ +#define @\libmacro{INTMAX_C}@(value) @\seebelow@ +#define @\libmacro{UINTMAX_C}@(value) @\seebelow@ \end{codeblock} \pnum diff --git a/source/templates.tex b/source/templates.tex index e9dc7b7d19..9c0e511ef7 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -3885,7 +3885,7 @@ template class A { }; // partial specialization } -A a; // uses the partial specialization, which is found through the using-declaration +A a; // uses the partial specialization, which is found through the \grammarterm{using-declaration} // which refers to the primary template \end{codeblock} \end{example} diff --git a/source/text.tex b/source/text.tex index 3d885dde58..10e3a416be 100644 --- a/source/text.tex +++ b/source/text.tex @@ -10391,76 +10391,76 @@ \begin{codeblock} namespace std { template> - class basic_regex { - public: - // types - using value_type = charT; - using traits_type = traits; - using string_type = traits::string_type; - using flag_type = regex_constants::syntax_option_type; - using locale_type = traits::locale_type; - - // \ref{re.synopt}, constants - static constexpr flag_type icase = regex_constants::icase; - static constexpr flag_type nosubs = regex_constants::nosubs; - static constexpr flag_type optimize = regex_constants::optimize; - static constexpr flag_type collate = regex_constants::collate; - static constexpr flag_type ECMAScript = regex_constants::ECMAScript; - static constexpr flag_type basic = regex_constants::basic; - static constexpr flag_type extended = regex_constants::extended; - static constexpr flag_type awk = regex_constants::awk; - static constexpr flag_type grep = regex_constants::grep; - static constexpr flag_type egrep = regex_constants::egrep; - static constexpr flag_type multiline = regex_constants::multiline; - - // \ref{re.regex.construct}, construct/copy/destroy - basic_regex(); - explicit basic_regex(const charT* p, flag_type f = regex_constants::ECMAScript); - basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); - basic_regex(const basic_regex&); - basic_regex(basic_regex&&) noexcept; - template - explicit basic_regex(const basic_string& s, - flag_type f = regex_constants::ECMAScript); - template - basic_regex(ForwardIterator first, ForwardIterator last, - flag_type f = regex_constants::ECMAScript); - basic_regex(initializer_list il, flag_type f = regex_constants::ECMAScript); - - ~basic_regex(); - - // \ref{re.regex.assign}, assign - basic_regex& operator=(const basic_regex& e); - basic_regex& operator=(basic_regex&& e) noexcept; - basic_regex& operator=(const charT* p); - basic_regex& operator=(initializer_list il); - template - basic_regex& operator=(const basic_string& s); - - basic_regex& assign(const basic_regex& e); - basic_regex& assign(basic_regex&& e) noexcept; - basic_regex& assign(const charT* p, flag_type f = regex_constants::ECMAScript); - basic_regex& assign(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); - template - basic_regex& assign(const basic_string& s, - flag_type f = regex_constants::ECMAScript); - template - basic_regex& assign(InputIterator first, InputIterator last, - flag_type f = regex_constants::ECMAScript); - basic_regex& assign(initializer_list, + class basic_regex { + public: + // types + using value_type = charT; + using traits_type = traits; + using string_type = traits::string_type; + using flag_type = regex_constants::syntax_option_type; + using locale_type = traits::locale_type; + + // \ref{re.synopt}, constants + static constexpr flag_type icase = regex_constants::icase; + static constexpr flag_type nosubs = regex_constants::nosubs; + static constexpr flag_type optimize = regex_constants::optimize; + static constexpr flag_type collate = regex_constants::collate; + static constexpr flag_type ECMAScript = regex_constants::ECMAScript; + static constexpr flag_type basic = regex_constants::basic; + static constexpr flag_type extended = regex_constants::extended; + static constexpr flag_type awk = regex_constants::awk; + static constexpr flag_type grep = regex_constants::grep; + static constexpr flag_type egrep = regex_constants::egrep; + static constexpr flag_type multiline = regex_constants::multiline; + + // \ref{re.regex.construct}, construct/copy/destroy + basic_regex(); + explicit basic_regex(const charT* p, flag_type f = regex_constants::ECMAScript); + basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); + basic_regex(const basic_regex&); + basic_regex(basic_regex&&) noexcept; + template + explicit basic_regex(const basic_string& s, + flag_type f = regex_constants::ECMAScript); + template + basic_regex(ForwardIterator first, ForwardIterator last, + flag_type f = regex_constants::ECMAScript); + basic_regex(initializer_list il, flag_type f = regex_constants::ECMAScript); + + ~basic_regex(); + + // \ref{re.regex.assign}, assign + basic_regex& operator=(const basic_regex& e); + basic_regex& operator=(basic_regex&& e) noexcept; + basic_regex& operator=(const charT* p); + basic_regex& operator=(initializer_list il); + template + basic_regex& operator=(const basic_string& s); + + basic_regex& assign(const basic_regex& e); + basic_regex& assign(basic_regex&& e) noexcept; + basic_regex& assign(const charT* p, flag_type f = regex_constants::ECMAScript); + basic_regex& assign(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); + template + basic_regex& assign(const basic_string& s, + flag_type f = regex_constants::ECMAScript); + template + basic_regex& assign(InputIterator first, InputIterator last, flag_type f = regex_constants::ECMAScript); + basic_regex& assign(initializer_list, + flag_type f = regex_constants::ECMAScript); - // \ref{re.regex.operations}, const operations - unsigned mark_count() const; - flag_type flags() const; + // \ref{re.regex.operations}, const operations + unsigned mark_count() const; + flag_type flags() const; - // \ref{re.regex.locale}, locale - locale_type imbue(locale_type loc); - locale_type getloc() const; + // \ref{re.regex.locale}, locale + locale_type imbue(locale_type loc); + locale_type getloc() const; - // \ref{re.regex.swap}, swap - void swap(basic_regex&); - }; + // \ref{re.regex.swap}, swap + void swap(basic_regex&); + }; template basic_regex(ForwardIterator, ForwardIterator, @@ -10895,27 +10895,27 @@ \begin{codeblock} namespace std { template - class sub_match : public pair { - public: - using value_type = iterator_traits::value_type; - using difference_type = iterator_traits::difference_type; - using iterator = BidirectionalIterator; - using string_type = basic_string; + class sub_match : public pair { + public: + using value_type = iterator_traits::value_type; + using difference_type = iterator_traits::difference_type; + using iterator = BidirectionalIterator; + using string_type = basic_string; - bool matched; + bool matched; - constexpr sub_match(); + constexpr sub_match(); - difference_type length() const; - operator string_type() const; - string_type str() const; + difference_type length() const; + operator string_type() const; + string_type str() const; - int compare(const sub_match& s) const; - int compare(const string_type& s) const; - int compare(const value_type* s) const; + int compare(const sub_match& s) const; + int compare(const string_type& s) const; + int compare(const value_type* s) const; - void swap(sub_match& s) noexcept(@\seebelow@); - }; + void swap(sub_match& s) noexcept(@\seebelow@); + }; } \end{codeblock} @@ -11061,8 +11061,8 @@ \begin{itemdecl} template bool operator==( - const sub_match& lhs, - const basic_string::value_type, ST, SA>& rhs); + const sub_match& lhs, + const basic_string::value_type, ST, SA>& rhs); \end{itemdecl} \begin{itemdescr} @@ -11077,8 +11077,8 @@ \begin{itemdecl} template auto operator<=>( - const sub_match& lhs, - const basic_string::value_type, ST, SA>& rhs); + const sub_match& lhs, + const basic_string::value_type, ST, SA>& rhs); \end{itemdecl} \begin{itemdescr} @@ -11086,9 +11086,9 @@ \returns \begin{codeblock} static_cast<@\placeholdernc{SM-CAT}@(BiIter)>(lhs.compare( - typename sub_match::string_type(rhs.data(), rhs.size())) - <=> 0 - ) + typename sub_match::string_type(rhs.data(), rhs.size())) + <=> 0 + ) \end{codeblock} \end{itemdescr} @@ -11143,9 +11143,9 @@ \returns \begin{codeblock} static_cast<@\placeholdernc{SM-CAT}@(BiIter)>(lhs.compare( - typename sub_match::string_type(1, rhs)) - <=> 0 - ) + typename sub_match::string_type(1, rhs)) + <=> 0 + ) \end{codeblock} \end{itemdescr} @@ -11217,76 +11217,76 @@ namespace std { template>> - class match_results { - public: - using value_type = sub_match; - using const_reference = const value_type&; - using reference = value_type&; - using const_iterator = @\impdefx{type of \tcode{match_results::const_iterator}}@; - using iterator = const_iterator; - using difference_type = iterator_traits::difference_type; - using size_type = allocator_traits::size_type; - using allocator_type = Allocator; - using char_type = iterator_traits::value_type; - using string_type = basic_string; - - // \ref{re.results.const}, construct/copy/destroy - match_results() : match_results(Allocator()) {} - explicit match_results(const Allocator& a); - match_results(const match_results& m); - match_results(const match_results& m, const Allocator& a); - match_results(match_results&& m) noexcept; - match_results(match_results&& m, const Allocator& a); - match_results& operator=(const match_results& m); - match_results& operator=(match_results&& m); - ~match_results(); - - // \ref{re.results.state}, state - bool ready() const; - - // \ref{re.results.size}, size - size_type size() const; - size_type max_size() const; - bool empty() const; - - // \ref{re.results.acc}, element access - difference_type length(size_type sub = 0) const; - difference_type position(size_type sub = 0) const; - string_type str(size_type sub = 0) const; - const_reference operator[](size_type n) const; - - const_reference prefix() const; - const_reference suffix() const; - const_iterator begin() const; - const_iterator end() const; - const_iterator cbegin() const; - const_iterator cend() const; - - // \ref{re.results.form}, format - template - OutputIter - format(OutputIter out, - const char_type* fmt_first, const char_type* fmt_last, - regex_constants::match_flag_type flags = regex_constants::format_default) const; - template - OutputIter - format(OutputIter out, - const basic_string& fmt, - regex_constants::match_flag_type flags = regex_constants::format_default) const; - template - basic_string - format(const basic_string& fmt, - regex_constants::match_flag_type flags = regex_constants::format_default) const; - string_type - format(const char_type* fmt, + class match_results { + public: + using value_type = sub_match; + using const_reference = const value_type&; + using reference = value_type&; + using const_iterator = @\impdefx{type of \tcode{match_results::const_iterator}}@; + using iterator = const_iterator; + using difference_type = iterator_traits::difference_type; + using size_type = allocator_traits::size_type; + using allocator_type = Allocator; + using char_type = iterator_traits::value_type; + using string_type = basic_string; + + // \ref{re.results.const}, construct/copy/destroy + match_results() : match_results(Allocator()) {} + explicit match_results(const Allocator& a); + match_results(const match_results& m); + match_results(const match_results& m, const Allocator& a); + match_results(match_results&& m) noexcept; + match_results(match_results&& m, const Allocator& a); + match_results& operator=(const match_results& m); + match_results& operator=(match_results&& m); + ~match_results(); + + // \ref{re.results.state}, state + bool ready() const; + + // \ref{re.results.size}, size + size_type size() const; + size_type max_size() const; + bool empty() const; + + // \ref{re.results.acc}, element access + difference_type length(size_type sub = 0) const; + difference_type position(size_type sub = 0) const; + string_type str(size_type sub = 0) const; + const_reference operator[](size_type n) const; + + const_reference prefix() const; + const_reference suffix() const; + const_iterator begin() const; + const_iterator end() const; + const_iterator cbegin() const; + const_iterator cend() const; + + // \ref{re.results.form}, format + template + OutputIter + format(OutputIter out, + const char_type* fmt_first, const char_type* fmt_last, + regex_constants::match_flag_type flags = regex_constants::format_default) const; + template + OutputIter + format(OutputIter out, + const basic_string& fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const; + template + basic_string + format(const basic_string& fmt, + regex_constants::match_flag_type flags = regex_constants::format_default) const; + string_type + format(const char_type* fmt, + regex_constants::match_flag_type flags = regex_constants::format_default) const; - // \ref{re.results.all}, allocator - allocator_type get_allocator() const; + // \ref{re.results.all}, allocator + allocator_type get_allocator() const; - // \ref{re.results.swap}, swap - void swap(match_results& that); - }; + // \ref{re.results.swap}, swap + void swap(match_results& that); + }; } \end{codeblock} @@ -12304,39 +12304,39 @@ template::value_type, class traits = regex_traits> - class regex_iterator { - public: - using regex_type = basic_regex; - using iterator_category = forward_iterator_tag; - using iterator_concept = input_iterator_tag; - using value_type = match_results; - using difference_type = ptrdiff_t; - using pointer = const value_type*; - using reference = const value_type&; - - regex_iterator(); - regex_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, - regex_constants::match_flag_type m = regex_constants::match_default); - regex_iterator(BidirectionalIterator, BidirectionalIterator, - const regex_type&&, - regex_constants::match_flag_type = regex_constants::match_default) = delete; - regex_iterator(const regex_iterator&); - regex_iterator& operator=(const regex_iterator&); - bool operator==(const regex_iterator&) const; - bool operator==(default_sentinel_t) const { return *this == regex_iterator(); } - const value_type& operator*() const; - const value_type* operator->() const; - regex_iterator& operator++(); - regex_iterator operator++(int) = default; - - private: - BidirectionalIterator begin; // \expos - BidirectionalIterator end; // \expos - const regex_type* pregex; // \expos - regex_constants::match_flag_type flags; // \expos - match_results match; // \expos - }; + class regex_iterator { + public: + using regex_type = basic_regex; + using iterator_category = forward_iterator_tag; + using iterator_concept = input_iterator_tag; + using value_type = match_results; + using difference_type = ptrdiff_t; + using pointer = const value_type*; + using reference = const value_type&; + + regex_iterator(); + regex_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, + regex_constants::match_flag_type m = regex_constants::match_default); + regex_iterator(BidirectionalIterator, BidirectionalIterator, + const regex_type&&, + regex_constants::match_flag_type = regex_constants::match_default) = delete; + regex_iterator(const regex_iterator&); + regex_iterator& operator=(const regex_iterator&); + bool operator==(const regex_iterator&) const; + bool operator==(default_sentinel_t) const { return *this == regex_iterator(); } + const value_type& operator*() const; + const value_type* operator->() const; + regex_iterator& operator++(); + regex_iterator operator++(int) = default; + + private: + BidirectionalIterator begin; // \expos + BidirectionalIterator end; // \expos + const regex_type* pregex; // \expos + regex_constants::match_flag_type flags; // \expos + match_results match; // \expos + }; } \end{codeblock} @@ -12559,77 +12559,77 @@ template::value_type, class traits = regex_traits> - class regex_token_iterator { - public: - using regex_type = basic_regex; - using iterator_category = forward_iterator_tag; - using iterator_concept = input_iterator_tag; - using value_type = sub_match; - using difference_type = ptrdiff_t; - using pointer = const value_type*; - using reference = const value_type&; - - regex_token_iterator(); - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, - int submatch = 0, - regex_constants::match_flag_type m = - regex_constants::match_default); - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, - const vector& submatches, - regex_constants::match_flag_type m = - regex_constants::match_default); + class regex_token_iterator { + public: + using regex_type = basic_regex; + using iterator_category = forward_iterator_tag; + using iterator_concept = input_iterator_tag; + using value_type = sub_match; + using difference_type = ptrdiff_t; + using pointer = const value_type*; + using reference = const value_type&; + + regex_token_iterator(); + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, + int submatch = 0, + regex_constants::match_flag_type m = + regex_constants::match_default); + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, + const vector& submatches, + regex_constants::match_flag_type m = + regex_constants::match_default); + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, + initializer_list submatches, + regex_constants::match_flag_type m = + regex_constants::match_default); + template regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, - initializer_list submatches, + const int (&submatches)[N], regex_constants::match_flag_type m = regex_constants::match_default); - template - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, - const int (&submatches)[N], - regex_constants::match_flag_type m = - regex_constants::match_default); - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type&& re, - int submatch = 0, - regex_constants::match_flag_type m = - regex_constants::match_default) = delete; - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type&& re, - const vector& submatches, - regex_constants::match_flag_type m = - regex_constants::match_default) = delete; - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type&& re, - initializer_list submatches, - regex_constants::match_flag_type m = - regex_constants::match_default) = delete; - template + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type&& re, + int submatch = 0, + regex_constants::match_flag_type m = + regex_constants::match_default) = delete; + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type&& re, + const vector& submatches, + regex_constants::match_flag_type m = + regex_constants::match_default) = delete; + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type&& re, + initializer_list submatches, + regex_constants::match_flag_type m = + regex_constants::match_default) = delete; + template regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type&& re, const int (&submatches)[N], regex_constants::match_flag_type m = regex_constants::match_default) = delete; - regex_token_iterator(const regex_token_iterator&); - regex_token_iterator& operator=(const regex_token_iterator&); - bool operator==(const regex_token_iterator&) const; - bool operator==(default_sentinel_t) const { return *this == regex_token_iterator(); } - const value_type& operator*() const; - const value_type* operator->() const; - regex_token_iterator& operator++(); - regex_token_iterator operator++(int) = default; - - private: - using position_iterator = - regex_iterator; // \expos - position_iterator position; // \expos - const value_type* result; // \expos - value_type suffix; // \expos - size_t N; // \expos - vector subs; // \expos - }; + regex_token_iterator(const regex_token_iterator&); + regex_token_iterator& operator=(const regex_token_iterator&); + bool operator==(const regex_token_iterator&) const; + bool operator==(default_sentinel_t) const { return *this == regex_token_iterator(); } + const value_type& operator*() const; + const value_type* operator->() const; + regex_token_iterator& operator++(); + regex_token_iterator operator++(int) = default; + + private: + using position_iterator = + regex_iterator; // \expos + position_iterator position; // \expos + const value_type* result; // \expos + value_type suffix; // \expos + size_t N; // \expos + vector subs; // \expos + }; } \end{codeblock} @@ -13293,6 +13293,7 @@ using mbstate_t = @\seebelow@; using size_t = @\textit{see \ref{support.types.layout}}@; + // \ref{c.mb.wcs}, multibyte / wide string and character conversion functions size_t mbrtoc8(char8_t* pc8, const char* s, size_t n, mbstate_t* ps); size_t c8rtomb(char* s, char8_t c8, mbstate_t* ps); size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps); diff --git a/source/ub.tex b/source/ub.tex index 8267694f37..2e7b9d8590 100644 --- a/source/ub.tex +++ b/source/ub.tex @@ -1995,7 +1995,7 @@ A() try : x(0 ? 1 : throw 1) { } catch (int) { std::cout << "y: " << y << std::endl; // undefined behavior, referring to non-static member \tcode{y} in - // the handler of function-try-block + // the handler of \grammarterm{function-try-block} } int x; int y = 42; diff --git a/source/utilities.tex b/source/utilities.tex index a4b767dce7..cbea83517e 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -17031,7 +17031,7 @@ large enough to represent all possible result values. Each function template has the same semantics as the corresponding type-generic function with the same name -specified in \xrefc{7.18}. +specified in \IsoC{} 7.18. \pnum \mandates