From f9fd4492031a1b9d655a6043ed41aec070f21383 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Mar 2025 17:21:21 +0800 Subject: [PATCH] [lib] Use `CharT` and `Traits` as template parameter names --- source/compatibility.tex | 2 +- source/containers.tex | 30 +- source/diagnostics.tex | 16 +- source/intro.tex | 2 +- source/iostreams.tex | 1990 +++++++++++++++++++------------------- source/iterators.tex | 116 +-- source/numerics.tex | 358 +++---- source/strings.tex | 1204 +++++++++++------------ source/text.tex | 1200 +++++++++++------------ source/threads.tex | 26 +- source/time.tex | 844 ++++++++-------- source/utilities.tex | 136 +-- 12 files changed, 2962 insertions(+), 2962 deletions(-) diff --git a/source/compatibility.tex b/source/compatibility.tex index fe9d4ce861..f8633c073d 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -666,7 +666,7 @@ \change Removed the \tcode{formatter} specialization: \begin{codeblock} -template struct formatter; +template struct formatter; \end{codeblock} \rationale The specialization is inconsistent with the design of \tcode{formatter}, diff --git a/source/containers.tex b/source/containers.tex index aeedcd2c3b..42397c73b0 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -9825,8 +9825,8 @@ template struct hash>; // \ref{vector.bool.fmt}, formatter specialization for \tcode{vector} - template requires @\exposid{is-vector-bool-reference}@ - struct formatter; + template requires @\exposid{is-vector-bool-reference}@ + struct formatter; } \end{codeblock} @@ -10656,11 +10656,11 @@ \indexlibraryglobal{formatter}% \begin{codeblock} namespace std { - template + template requires @\exposid{is-vector-bool-reference}@ - struct formatter { + struct formatter { private: - formatter @\exposid{underlying_}@; // \expos + formatter @\exposid{underlying_}@; // \expos public: template @@ -15622,8 +15622,8 @@ struct uses_allocator, Alloc>; // \ref{container.adaptors.format}, formatter specialization for \tcode{queue} - template Container> - struct formatter, charT>; + template Container> + struct formatter, CharT>; // \ref{priority.queue}, class template \tcode{priority_queue} template, @@ -15637,8 +15637,8 @@ struct uses_allocator, Alloc>; // \ref{container.adaptors.format}, formatter specialization for \tcode{priority_queue} - template Container, class Compare> - struct formatter, charT>; + template Container, class Compare> + struct formatter, CharT>; } \end{codeblock} @@ -16548,8 +16548,8 @@ struct uses_allocator, Alloc>; // \ref{container.adaptors.format}, formatter specialization for \tcode{stack} - template Container> - struct formatter, charT>; + template Container> + struct formatter, CharT>; } \end{codeblock} @@ -20121,15 +20121,15 @@ \indexlibraryglobal{formatter}% \begin{codeblock} namespace std { - template Container, class... U> - struct formatter<@\placeholder{adaptor-type}@, charT> { + template Container, class... U> + struct formatter<@\placeholder{adaptor-type}@, CharT> { private: using @\exposid{maybe-const-container}@ = // \expos - @\exposid{fmt-maybe-const}@; + @\exposid{fmt-maybe-const}@; using @\exposid{maybe-const-adaptor}@ = // \expos @\exposid{maybe-const}@, // see \ref{ranges.syn} @\placeholder{adaptor-type}@>; - formatter, charT> @\exposid{underlying_}@; // \expos + formatter, CharT> @\exposid{underlying_}@; // \expos public: template diff --git a/source/diagnostics.tex b/source/diagnostics.tex index 1f5f1ad48a..37b3851931 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -737,9 +737,9 @@ // \ref{syserr.errcode.nonmembers}, non-member functions error_code make_error_code(errc e) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const error_code& ec); + template + basic_ostream& + operator<<(basic_ostream& os, const error_code& ec); // \ref{syserr.errcondition.nonmembers}, non-member functions error_condition make_error_condition(errc e) noexcept; @@ -1049,9 +1049,9 @@ // \ref{syserr.errcode.nonmembers}, non-member functions error_code make_error_code(errc e) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const error_code& ec); + template + basic_ostream& + operator<<(basic_ostream& os, const error_code& ec); } \end{codeblock} @@ -1222,8 +1222,8 @@ \indexlibrarymember{operator<<}{error_code}% \begin{itemdecl} -template - basic_ostream& operator<<(basic_ostream& os, const error_code& ec); +template + basic_ostream& operator<<(basic_ostream& os, const error_code& ec); \end{itemdecl} \begin{itemdescr} diff --git a/source/intro.tex b/source/intro.tex index 75705a2bab..1ba6a1bfa0 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -378,7 +378,7 @@ \termref{defns.character}{character}{} type that precede the terminating null character type value -\tcode{charT()} +\tcode{CharT()} \definition{observer function}{defns.observer} \defncontext{library} diff --git a/source/iostreams.tex b/source/iostreams.tex index 1a5a1cc663..d21ab5f176 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -96,25 +96,25 @@ \pnum The classes of \ref{input.output} with template arguments -\tcode{charT} +\tcode{CharT} and -\tcode{traits} +\tcode{Traits} behave as described if -\tcode{traits::pos_type} +\tcode{Traits::pos_type} and -\tcode{traits::off_type} +\tcode{Traits::off_type} are \tcode{streampos} and \tcode{streamoff} respectively. Except as noted explicitly below, their behavior when -\tcode{traits::pos_type} +\tcode{Traits::pos_type} and -\tcode{traits::off_type} +\tcode{Traits::off_type} are other types is -\impldef{behavior of iostream classes when \tcode{traits::pos_type} is not -\tcode{streampos} or when \tcode{traits::\brk{}off_type} is not \tcode{streamoff}}. +\impldef{behavior of iostream classes when \tcode{Traits::pos_type} is not +\tcode{streampos} or when \tcode{Traits::\brk{}off_type} is not \tcode{streamoff}}. \pnum \begin{note} @@ -127,7 +127,7 @@ \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}, +\tcode{CharT} represents a member of the set of types containing \tcode{char}, \keyword{wchar_t}, 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 @@ -205,7 +205,7 @@ \indexlibraryglobal{u32streampos}% \begin{codeblock} namespace std { - template struct char_traits; + template struct char_traits; template<> struct char_traits; template<> struct char_traits; template<> struct char_traits; @@ -214,58 +214,58 @@ template class allocator; - template> + template> class basic_ios; - template> + template> class basic_streambuf; - template> + template> class basic_istream; - template> + template> class basic_ostream; - template> + template> class basic_iostream; - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_stringbuf; - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_istringstream; - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_ostringstream; - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_stringstream; - template> + template> class basic_spanbuf; - template> + template> class basic_ispanstream; - template> + template> class basic_ospanstream; - template> + template> class basic_spanstream; - template> + template> class basic_filebuf; - template> + template> class basic_ifstream; - template> + template> class basic_ofstream; - template> + template> class basic_fstream; - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_syncbuf; - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_osyncstream; - template> + template> class istreambuf_iterator; - template> + template> class ostreambuf_iterator; using ios = basic_ios; @@ -346,7 +346,7 @@ \pnum The class template specialization -\tcode{basic_ios} +\tcode{basic_ios} serves as a virtual base class for the class templates \tcode{basic_istream}, @@ -358,14 +358,14 @@ is a class template derived from both -\tcode{basic_istream} +\tcode{basic_istream} and -\tcode{basic_ostream}. +\tcode{basic_ostream}. \pnum The class template specialization -\tcode{basic_streambuf} +\tcode{basic_streambuf} serves as a base class for class templates \tcode{basic_stringbuf}, \tcode{basic_filebuf}, @@ -375,7 +375,7 @@ \pnum The class template specialization -\tcode{basic_istream} +\tcode{basic_istream} serves as a base class for class templates \tcode{basic_istringstream} and @@ -384,7 +384,7 @@ \pnum The class template specialization -\tcode{basic_ostream} +\tcode{basic_ostream} serves as a base class for class templates \tcode{basic_ostringstream}, \tcode{basic_ofstream}, @@ -394,7 +394,7 @@ \pnum The class template specialization -\tcode{basic_iostream} +\tcode{basic_iostream} serves as a base class for class templates \tcode{basic_stringstream} and @@ -404,9 +404,9 @@ \begin{note} For each of the class templates above, the program is ill-formed if -\tcode{traits::char_type} +\tcode{Traits::char_type} is not the same type as -\tcode{charT}\iref{char.traits}. +\tcode{CharT}\iref{char.traits}. \end{note} \pnum @@ -698,7 +698,7 @@ // \ref{ios.base}, class \tcode{ios_base} class ios_base; // \ref{ios}, class template \tcode{basic_ios} - template> + template> class basic_ios; // \ref{std.ios.manip}, manipulators @@ -1795,7 +1795,7 @@ \pnum Stream operations that return a value of type -\tcode{traits::pos_type} +\tcode{Traits::pos_type} return \tcode{P(O(-1))} as an invalid value to signal an error. @@ -1805,7 +1805,7 @@ or \tcode{streambuf} member that accepts a value of type -\tcode{traits::pos_type} +\tcode{Traits::pos_type} then the behavior of that function is undefined. \indextext{undefined}% @@ -1816,14 +1816,14 @@ \indexlibraryglobal{basic_ios}% \begin{codeblock} namespace std { - template> + template> class basic_ios : public ios_base { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{iostate.flags}, flags functions explicit operator bool() const; @@ -1840,15 +1840,15 @@ void exceptions(iostate except); // \ref{basic.ios.cons}, constructor/destructor - explicit basic_ios(basic_streambuf* sb); + explicit basic_ios(basic_streambuf* sb); virtual ~basic_ios(); // \ref{basic.ios.members}, members - basic_ostream* tie() const; - basic_ostream* tie(basic_ostream* tiestr); + basic_ostream* tie() const; + basic_ostream* tie(basic_ostream* tiestr); - basic_streambuf* rdbuf() const; - basic_streambuf* rdbuf(basic_streambuf* sb); + basic_streambuf* rdbuf() const; + basic_streambuf* rdbuf(basic_streambuf* sb); basic_ios& copyfmt(const basic_ios& rhs); @@ -1865,11 +1865,11 @@ protected: basic_ios(); - void init(basic_streambuf* sb); + void init(basic_streambuf* sb); void move(basic_ios& rhs); void move(basic_ios&& rhs); void swap(basic_ios& rhs) noexcept; - void set_rdbuf(basic_streambuf* sb); + void set_rdbuf(basic_streambuf* sb); }; } \end{codeblock} @@ -1878,7 +1878,7 @@ \indexlibraryctor{basic_ios}% \begin{itemdecl} -explicit basic_ios(basic_streambuf* sb); +explicit basic_ios(basic_streambuf* sb); \end{itemdecl} \begin{itemdescr} @@ -1917,7 +1917,7 @@ \indexlibrarymember{init}{basic_ios}% \begin{itemdecl} -void init(basic_streambuf* sb); +void init(basic_streambuf* sb); \end{itemdecl} \begin{itemdescr} @@ -1955,7 +1955,7 @@ \indexlibrarymember{tie}{basic_ios}% \begin{itemdecl} -basic_ostream* tie() const; +basic_ostream* tie() const; \end{itemdecl} \begin{itemdescr} @@ -1968,7 +1968,7 @@ \indexlibrarymember{tie}{basic_ios}% \begin{itemdecl} -basic_ostream* tie(basic_ostream* tiestr); +basic_ostream* tie(basic_ostream* tiestr); \end{itemdecl} \begin{itemdescr} @@ -1990,7 +1990,7 @@ \indexlibrarymember{rdbuf}{basic_ios}% \begin{itemdecl} -basic_streambuf* rdbuf() const; +basic_streambuf* rdbuf() const; \end{itemdecl} \begin{itemdescr} @@ -2003,7 +2003,7 @@ \indexlibrarymember{rdbuf}{basic_ios}% \begin{itemdecl} -basic_streambuf* rdbuf(basic_streambuf* sb); +basic_streambuf* rdbuf(basic_streambuf* sb); \end{itemdecl} \begin{itemdescr} @@ -2086,7 +2086,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{traits::eq(fillch, fill())}. +\tcode{Traits::eq(fillch, fill())}. \pnum \returns @@ -2210,7 +2210,7 @@ \indexlibrarymember{set_rdbuf}{basic_ios}% \begin{itemdecl} -void set_rdbuf(basic_streambuf* sb); +void set_rdbuf(basic_streambuf* sb); \end{itemdecl} \begin{itemdescr} @@ -2882,7 +2882,7 @@ \begin{codeblock} namespace std { // \ref{streambuf}, class template \tcode{basic_streambuf} - template> + template> class basic_streambuf; using streambuf = basic_streambuf; using wstreambuf = basic_streambuf; @@ -2922,7 +2922,7 @@ \pnum Each sequence is characterized by three pointers which, if non-null, all point into the same -\tcode{charT} +\tcode{CharT} array object. The array object represents, at any moment, a (sub)sequence of characters from the sequence. @@ -2957,7 +2957,7 @@ If \tcode{xnext} is not a null pointer, then \tcode{xbeg} and \tcode{xend} shall also be non-null pointers into the same -\tcode{charT} +\tcode{CharT} array, as described above; otherwise, \tcode{xbeg} and \tcode{xend} shall also be null. \item @@ -3001,14 +3001,14 @@ \indexlibraryglobal{basic_streambuf}% \begin{codeblock} namespace std { - template> + template> class basic_streambuf { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; virtual ~basic_streambuf(); @@ -3084,11 +3084,11 @@ virtual int_type uflow(); // \ref{streambuf.virt.pback}, putback - virtual int_type pbackfail(int_type c = traits::eof()); + virtual int_type pbackfail(int_type c = Traits::eof()); // \ref{streambuf.virt.put}, put area virtual streamsize xsputn(const char_type* s, streamsize n); - virtual int_type overflow(int_type c = traits::eof()); + virtual int_type overflow(int_type c = Traits::eof()); }; } \end{codeblock} @@ -3306,9 +3306,9 @@ \pnum \returns If that function returns -\tcode{traits::eof()}, +\tcode{Traits::eof()}, returns -\tcode{traits::eof()}. +\tcode{Traits::eof()}. Otherwise, returns \tcode{sgetc()}. \end{itemdescr} @@ -3325,7 +3325,7 @@ returns \tcode{uflow()}. Otherwise, returns -\tcode{traits::to_int_type(*gptr())} +\tcode{Traits::to_int_type(*gptr())} and increments the next pointer for the input sequence. \end{itemdescr} @@ -3341,7 +3341,7 @@ returns \tcode{underflow()}. Otherwise, returns -\tcode{traits::to_int_type(*gptr())}. +\tcode{Traits::to_int_type(*gptr())}. \end{itemdescr} \indexlibrarymember{sgetn}{basic_streambuf}% @@ -3367,12 +3367,12 @@ \effects If the input sequence putback position is not available, or if -\tcode{traits::eq(c, gptr()[-1])} +\tcode{Traits::eq(c, gptr()[-1])} is \tcode{false}, returns -\tcode{pbackfail(traits::to_int_type(c))}. +\tcode{pbackfail(Traits::to_int_type(c))}. Otherwise, decrements the next pointer for the input sequence and returns -\tcode{traits::to_int_type(*gptr())}. +\tcode{Traits::to_int_type(*gptr())}. \end{itemdescr} \indexlibrarymember{sungetc}{basic_streambuf}% @@ -3388,7 +3388,7 @@ \tcode{pbackfail()}. Otherwise, decrements the next pointer for the input sequence and returns -\tcode{traits::to_int_type(*gptr())}. +\tcode{Traits::to_int_type(*gptr())}. \end{itemdescr} \rSec4[streambuf.pub.put]{Put area} @@ -3403,11 +3403,11 @@ \effects If the output sequence write position is not available, returns -\tcode{overflow(traits::to_int_type(c))}. +\tcode{overflow(Traits::to_int_type(c))}. Otherwise, stores \tcode{c} at the next pointer for the output sequence, increments the pointer, and returns -\tcode{traits::to_int_type(c)}. +\tcode{Traits::to_int_type(c)}. \end{itemdescr} \indexlibrarymember{sputn}{basic_streambuf}% @@ -3729,7 +3729,7 @@ a positive value, then successive calls to \tcode{underflow()} will not return -\tcode{traits::eof()} +\tcode{Traits::eof()} until at least that number of characters have been extracted from the stream. If @@ -3756,7 +3756,7 @@ \pnum \remarks Uses -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \end{itemdescr} \indexlibrarymember{xsgetn}{basic_streambuf}% @@ -3776,7 +3776,7 @@ have been assigned or a call to \tcode{sbumpc()} would return -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \pnum \returns @@ -3794,7 +3794,7 @@ \pnum \remarks Uses -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \end{itemdescr} \indexlibrarymember{underflow}{basic_streambuf}% @@ -3870,20 +3870,20 @@ \pnum \returns -\tcode{traits::to_int_type(c)}, +\tcode{Traits::to_int_type(c)}, where \tcode{c} is the first \textit{character} of the \term{pending sequence}, without moving the input sequence position past it. If the pending sequence is null then the function returns -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate failure. \pnum \default Returns -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \pnum \remarks @@ -3915,16 +3915,16 @@ If \tcode{underflow()} returns -\tcode{traits::eof()}, +\tcode{Traits::eof()}, returns -\tcode{traits::eof()}. +\tcode{Traits::eof()}. Otherwise, returns the value of -\tcode{traits::to_int_type(*gptr())} +\tcode{Traits::to_int_type(*gptr())} and increments the value of the next pointer for the input sequence. \pnum \returns -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate failure. \end{itemdescr} @@ -3932,7 +3932,7 @@ \indexlibrarymember{pbackfail}{basic_streambuf}% \begin{itemdecl} -int_type pbackfail(int_type c = traits::eof()); +int_type pbackfail(int_type c = Traits::eof()); \end{itemdecl} \begin{itemdescr} @@ -3945,13 +3945,13 @@ \begin{itemize} \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{true}, then the input sequence is backed up one character before the pending sequence is determined. \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{false}, then \tcode{c} is prepended. Whether the input sequence is backed up or modified in any other way is unspecified. \end{itemize} @@ -3968,7 +3968,7 @@ \pnum \returns -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate failure. Failure may occur because the input sequence could not be backed up, or if for some other reason the pointers cannot be set consistent with the constraints. @@ -3977,13 +3977,13 @@ \pnum Returns some value other than -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate success. \pnum \default Returns -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \pnum \remarks @@ -3994,7 +3994,7 @@ is null, \tcode{gptr() == eback()}, or -\tcode{traits::eq(traits::to_char_type(c), gptr()[-1])} +\tcode{Traits::eq(Traits::to_char_type(c), gptr()[-1])} returns \tcode{false}. Other calls shall also satisfy that constraint. @@ -4019,7 +4019,7 @@ a call to \tcode{sputc(c)} would return -\tcode{traits::eof()}. +\tcode{Traits::eof()}. It is unspecified whether the function calls \tcode{overflow()} when \tcode{pptr() == epptr()} becomes \tcode{true} or whether it achieves the same effects by other means. \pnum @@ -4029,7 +4029,7 @@ \indexlibrarymember{overflow}{basic_streambuf}% \begin{itemdecl} -int_type overflow(int_type c = traits::eof()); +int_type overflow(int_type c = Traits::eof()); \end{itemdecl} \begin{itemdescr} % NOCHECK: order @@ -4047,7 +4047,7 @@ \item the empty sequence if -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{true}, otherwise the sequence consisting of \tcode{c}. \end{itemize} @@ -4104,29 +4104,29 @@ \pnum \returns -\tcode{traits::eof()} +\tcode{Traits::eof()} or throws an exception if the function fails. Otherwise, returns some value other than -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate success. \begin{footnote} Typically, \tcode{overflow} returns \tcode{c} to indicate success, except when -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{true}, in which case it returns -\tcode{traits::not_eof(c)}. +\tcode{Traits::not_eof(c)}. \end{footnote} \pnum \default Returns -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \pnum \remarks @@ -4147,22 +4147,22 @@ \begin{codeblock} namespace std { // \ref{istream}, class template \tcode{basic_istream} - template> + template> class basic_istream; using istream = basic_istream; using wistream = basic_istream; // \ref{iostreamclass}, class template \tcode{basic_iostream} - template> + template> class basic_iostream; using iostream = basic_iostream; using wiostream = basic_iostream; // \ref{istream.manip}, standard \tcode{basic_istream} manipulators - template - basic_istream& ws(basic_istream& is); + template + basic_istream& ws(basic_istream& is); // \ref{istream.rvalue}, rvalue stream extraction template @@ -4181,26 +4181,26 @@ \begin{codeblock} namespace std { // \ref{ostream}, class template \tcode{basic_ostream} - template> + template> class basic_ostream; using ostream = basic_ostream; using wostream = basic_ostream; // \ref{ostream.manip}, standard \tcode{basic_ostream} manipulators - template - basic_ostream& endl(basic_ostream& os); - template - basic_ostream& ends(basic_ostream& os); - template - basic_ostream& flush(basic_ostream& os); - - template - basic_ostream& emit_on_flush(basic_ostream& os); - template - basic_ostream& noemit_on_flush(basic_ostream& os); - template - basic_ostream& flush_emit(basic_ostream& os); + template + basic_ostream& endl(basic_ostream& os); + template + basic_ostream& ends(basic_ostream& os); + template + basic_ostream& flush(basic_ostream& os); + + template + basic_ostream& emit_on_flush(basic_ostream& os); + template + basic_ostream& noemit_on_flush(basic_ostream& os); + template + basic_ostream& flush_emit(basic_ostream& os); // \ref{ostream.rvalue}, rvalue stream insertion template @@ -4232,31 +4232,31 @@ @\unspec@ resetiosflags(ios_base::fmtflags mask); @\unspec@ setiosflags (ios_base::fmtflags mask); @\unspec@ setbase(int base); - template @\unspec@ setfill(charT c); + template @\unspec@ setfill(CharT c); @\unspec@ setprecision(int n); @\unspec@ setw(int n); // \ref{ext.manip}, extended manipulators template @\unspec@ get_money(moneyT& mon, bool intl = false); template @\unspec@ put_money(const moneyT& mon, bool intl = false); - template @\unspec@ get_time(tm* tmb, const charT* fmt); - template @\unspec@ put_time(const tm* tmb, const charT* fmt); + template @\unspec@ get_time(tm* tmb, const CharT* fmt); + template @\unspec@ put_time(const tm* tmb, const CharT* fmt); // \ref{quoted.manip}, quoted manipulators - template - @\unspec@ quoted(const charT* s, charT delim = charT('"'), charT escape = charT('\\')); + template + @\unspec@ quoted(const CharT* s, CharT delim = CharT('"'), CharT escape = CharT('\\')); - template - @\unspec@ quoted(const basic_string& s, - @\itcorr@ charT delim = charT('"'), charT escape = charT('\\')); + template + @\unspec@ quoted(const basic_string& s, + @\itcorr@ CharT delim = CharT('"'), CharT escape = CharT('\\')); - template - @\unspec@ quoted(basic_string& s, - @\itcorr@ charT delim = charT('"'), charT escape = charT('\\')); + template + @\unspec@ quoted(basic_string& s, + @\itcorr@ CharT delim = CharT('"'), CharT escape = CharT('\\')); - template - @\unspec@ quoted(basic_string_view s, - @\itcorr@ charT delim = charT('"'), charT escape = charT('\\')); + template + @\unspec@ quoted(basic_string_view s, + @\itcorr@ CharT delim = CharT('"'), CharT escape = CharT('\\')); } \end{codeblock} @@ -4311,18 +4311,18 @@ \indexlibraryglobal{basic_istream}% \begin{codeblock} namespace std { - template> - class basic_istream : virtual public basic_ios { + template> + class basic_istream : virtual public basic_ios { public: // types (inherited from \tcode{basic_ios}\iref{ios}) - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{istream.cons}, constructor/destructor - explicit basic_istream(basic_streambuf* sb); + explicit basic_istream(basic_streambuf* sb); virtual ~basic_istream(); // \ref{istream.sentry}, prefix/suffix @@ -4330,7 +4330,7 @@ // \ref{istream.formatted}, formatted input basic_istream& operator>>(basic_istream& (*pf)(basic_istream&)); - basic_istream& operator>>(basic_ios& (*pf)(basic_ios&)); + basic_istream& operator>>(basic_ios& (*pf)(basic_ios&)); basic_istream& operator>>(ios_base& (*pf)(ios_base&)); basic_istream& operator>>(bool& n); @@ -4348,7 +4348,7 @@ basic_istream& operator>>(@\placeholder{extended-floating-point-type}@& f); basic_istream& operator>>(void*& p); - basic_istream& operator>>(basic_streambuf* sb); + basic_istream& operator>>(basic_streambuf* sb); // \ref{istream.unformatted}, unformatted input streamsize gcount() const; @@ -4356,13 +4356,13 @@ basic_istream& get(char_type& c); basic_istream& get(char_type* s, streamsize n); basic_istream& get(char_type* s, streamsize n, char_type delim); - basic_istream& get(basic_streambuf& sb); - basic_istream& get(basic_streambuf& sb, char_type delim); + basic_istream& get(basic_streambuf& sb); + basic_istream& get(basic_streambuf& sb, char_type delim); basic_istream& getline(char_type* s, streamsize n); basic_istream& getline(char_type* s, streamsize n, char_type delim); - basic_istream& ignore(streamsize n = 1, int_type delim = traits::eof()); + basic_istream& ignore(streamsize n = 1, int_type delim = Traits::eof()); int_type peek(); basic_istream& read (char_type* s, streamsize n); streamsize readsome(char_type* s, streamsize n); @@ -4387,19 +4387,19 @@ }; // \ref{istream.extractors}, character extraction templates - template - basic_istream& operator>>(basic_istream&, charT&); - template - basic_istream& operator>>(basic_istream&, unsigned char&); - template - basic_istream& operator>>(basic_istream&, signed char&); - - template - basic_istream& operator>>(basic_istream&, charT(&)[N]); - template - basic_istream& operator>>(basic_istream&, unsigned char(&)[N]); - template - basic_istream& operator>>(basic_istream&, signed char(&)[N]); + template + basic_istream& operator>>(basic_istream&, CharT&); + template + basic_istream& operator>>(basic_istream&, unsigned char&); + template + basic_istream& operator>>(basic_istream&, signed char&); + + template + basic_istream& operator>>(basic_istream&, CharT(&)[N]); + template + basic_istream& operator>>(basic_istream&, unsigned char(&)[N]); + template + basic_istream& operator>>(basic_istream&, signed char(&)[N]); } \end{codeblock} @@ -4433,7 +4433,7 @@ \indexlibraryctor{basic_istream}% \begin{itemdecl} -explicit basic_istream(basic_streambuf* sb); +explicit basic_istream(basic_streambuf* sb); \end{itemdecl} \indexlibrarymember{init}{basic_ios}% @@ -4459,7 +4459,7 @@ \effects Default constructs the base class, copies the \tcode{gcount()} from \tcode{rhs}, calls -\tcode{basic_ios::move(rhs)} to initialize the base +\tcode{basic_ios::move(rhs)} to initialize the base class, and sets the \tcode{gcount()} for \tcode{rhs} to 0. \end{itemdescr} @@ -4500,7 +4500,7 @@ \begin{itemdescr} \pnum \effects -Calls \tcode{basic_ios::swap(rhs)}. +Calls \tcode{basic_ios::swap(rhs)}. Exchanges the values returned by \tcode{gcount()} and \tcode{rhs.gcount()}. \end{itemdescr} @@ -4511,8 +4511,8 @@ \indexlibrarymember{sentry}{basic_istream}% \begin{codeblock} namespace std { - template - class basic_istream::sentry { + template + class basic_istream::sentry { bool @\exposid{ok_}@; // \expos public: @@ -4585,7 +4585,7 @@ or \tcode{is.rdbuf()->sgetc()} returns -\tcode{traits::eof()}, +\tcode{Traits::eof()}, the function calls \tcode{setstate(failbit | eofbit)} (which may throw @@ -4605,7 +4605,7 @@ To decide if the character \tcode{c} is a whitespace character, the constructor performs as if it executes the following code fragment: \begin{codeblock} -const ctype& ctype = use_facet>(is.getloc()); +const ctype& ctype = use_facet>(is.getloc()); if (ctype.is(ctype.space, c) != 0) // \tcode{c} is a whitespace character. \end{codeblock} @@ -4683,7 +4683,7 @@ when converted to a value of type \tcode{bool}, the function returns without attempting to obtain any input. If \tcode{rdbuf()->sbumpc()} or \tcode{rdbuf()->sgetc()} -returns \tcode{traits::eof()}, then +returns \tcode{Traits::eof()}, then \tcode{ios_base::eofbit} is set in the local error state and the input function stops trying to obtain the requested input. If an exception is thrown during input then @@ -4726,7 +4726,7 @@ conversion occurs as if performed by the following code fragment, where \tcode{state} represents the input function's local error state: \begin{codeblock} -using numget = num_get>; +using numget = num_get>; use_facet(loc).get(*this, 0, *this, state, val); \end{codeblock} In the above fragment, @@ -4759,7 +4759,7 @@ The conversion occurs as if performed by the following code fragment (using the same notation as for the preceding code fragment): \begin{codeblock} -using numget = num_get>; +using numget = num_get>; long lval; use_facet(loc).get(*this, 0, *this, state, lval); if (lval < numeric_limits::min()) { @@ -4783,7 +4783,7 @@ The conversion occurs as if performed by the following code fragment (using the same notation as for the preceding code fragment): \begin{codeblock} -using numget = num_get>; +using numget = num_get>; long lval; use_facet(loc).get(*this, 0, *this, state, lval); if (lval < numeric_limits::min()) { @@ -4830,7 +4830,7 @@ The conversion occurs as if performed by the following code fragment (using the same notation as for the preceding code fragment): \begin{codeblock} -using numget = num_get>; +using numget = num_get>; FP fval; use_facet(loc).get(*this, 0, *this, state, fval); if (fval < -numeric_limits<@\placeholder{extended-floating-point-type}@>::max()) { @@ -4879,7 +4879,7 @@ \indexlibrarymember{operator>>}{basic_istream}% \begin{itemdecl} -basic_istream& operator>>(basic_ios& (*pf)(basic_ios&)); +basic_istream& operator>>(basic_ios& (*pf)(basic_ios&)); \end{itemdecl} \begin{itemdescr} @@ -4919,12 +4919,12 @@ \indexlibrarymember{operator>>}{basic_istream}% \begin{itemdecl} -template - basic_istream& operator>>(basic_istream& in, charT (&s)[N]); -template - basic_istream& operator>>(basic_istream& in, unsigned char (&s)[N]); -template - basic_istream& operator>>(basic_istream& in, signed char (&s)[N]); +template + basic_istream& operator>>(basic_istream& in, CharT (&s)[N]); +template + basic_istream& operator>>(basic_istream& in, unsigned char (&s)[N]); +template + basic_istream& operator>>(basic_istream& in, signed char (&s)[N]); \end{itemdecl} \begin{itemdescr} @@ -4950,14 +4950,14 @@ \begin{itemize} \item \tcode{n-1} characters are stored; \item end of file occurs on the input sequence; -\item letting \tcode{ct} be \tcode{use_facet>(in.getloc())}, +\item letting \tcode{ct} be \tcode{use_facet>(in.getloc())}, \tcode{ct.is(ct.space, c)} is \tcode{true}. \end{itemize} \pnum \tcode{operator>>} then stores a null byte -(\tcode{charT()}) +(\tcode{CharT()}) in the next position, which may be the first position if no characters were extracted. \tcode{operator>>} @@ -4976,12 +4976,12 @@ \indexlibrarymember{operator>>}{basic_istream}% \begin{itemdecl} -template - basic_istream& operator>>(basic_istream& in, charT& c); -template - basic_istream& operator>>(basic_istream& in, unsigned char& c); -template - basic_istream& operator>>(basic_istream& in, signed char& c); +template + basic_istream& operator>>(basic_istream& in, CharT& c); +template + basic_istream& operator>>(basic_istream& in, unsigned char& c); +template + basic_istream& operator>>(basic_istream& in, signed char& c); \end{itemdecl} \begin{itemdescr} @@ -5001,7 +5001,7 @@ \indexlibrarymember{operator>>}{basic_istream}% \begin{itemdecl} -basic_istream& operator>>(basic_streambuf* sb); +basic_istream& operator>>(basic_streambuf* sb); \end{itemdecl} \begin{itemdescr} @@ -5064,10 +5064,10 @@ In either case the number of extracted characters is set to 0; unformatted input functions taking a character array of nonzero size as an argument shall also store a null character (using -\tcode{charT()}) +\tcode{CharT()}) in the first location of the array. If \tcode{rdbuf()->sbumpc()} or \tcode{rdbuf()->sgetc()} -returns \tcode{traits::eof()}, then +returns \tcode{Traits::eof()}, then \tcode{ios_base::eofbit} is set in the local error state and the input function stops trying to obtain the requested input. If an exception is thrown during input then @@ -5125,7 +5125,7 @@ \returns \tcode{c} if available, otherwise -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \end{itemdescr} \indexlibrarymember{get}{basic_istream}% @@ -5184,7 +5184,7 @@ \item end-of-file occurs on the input sequence; \item -\tcode{traits::eq(c, delim)} +\tcode{Traits::eq(c, delim)} for the next available input character \tcode{c} (in which case \tcode{c} is not extracted). @@ -5220,7 +5220,7 @@ \indexlibrarymember{get}{basic_istream}% \begin{itemdecl} -basic_istream& get(basic_streambuf& sb, char_type delim); +basic_istream& get(basic_streambuf& sb, char_type delim); \end{itemdecl} \begin{itemdescr} @@ -5240,7 +5240,7 @@ inserting in the output sequence fails (in which case the character to be inserted is not extracted); \item -\tcode{traits::eq(c, delim)} for the next available input +\tcode{Traits::eq(c, delim)} for the next available input character \tcode{c} (in which case \tcode{c} is not extracted); \item @@ -5260,7 +5260,7 @@ \indexlibrarymember{get}{basic_istream}% \begin{itemdecl} -basic_istream& get(basic_streambuf& sb); +basic_istream& get(basic_streambuf& sb); \end{itemdecl} \begin{itemdescr} @@ -5299,7 +5299,7 @@ \item end-of-file occurs on the input sequence; \item -\tcode{traits::eq(c, delim)} +\tcode{Traits::eq(c, delim)} for the next available input character \tcode{c} (in which case the input character is extracted but not stored); @@ -5340,7 +5340,7 @@ \pnum In any case, if \tcode{n} is greater than zero, it then stores a null character (using -\tcode{charT()}) +\tcode{CharT()}) into the next successive location of the array. \pnum @@ -5389,7 +5389,7 @@ \indexlibrarymember{ignore}{basic_istream}% \begin{itemdecl} -basic_istream& ignore(streamsize n = 1, int_type delim = traits::eof()); +basic_istream& ignore(streamsize n = 1, int_type delim = Traits::eof()); \end{itemdecl} \begin{itemdescr} @@ -5412,13 +5412,13 @@ which may throw \tcode{ios_base::failure}\iref{iostate.flags}); \item -\tcode{traits::eq_int_type(traits::to_int_type(c), delim)} +\tcode{Traits::eq_int_type(Traits::to_int_type(c), delim)} for the next available input character \tcode{c} (in which case \tcode{c} is extracted). \end{itemize} \begin{note} The last condition will never occur if -\tcode{traits::eq_int_type(delim, traits::eof())}. +\tcode{Traits::eq_int_type(delim, Traits::eof())}. \end{note} \pnum @@ -5441,7 +5441,7 @@ \pnum \returns -\tcode{traits::eof()} +\tcode{Traits::eof()} if \tcode{good()} is @@ -5560,7 +5560,7 @@ is null, or if \tcode{sputbackc} returns -\tcode{traits::eof()}, +\tcode{Traits::eof()}, calls \tcode{setstate(badbit)} (which may throw @@ -5602,7 +5602,7 @@ is null, or if \tcode{sungetc} returns -\tcode{traits::eof()}, +\tcode{Traits::eof()}, calls \tcode{setstate(badbit)} (which may throw @@ -5731,8 +5731,8 @@ \indexlibraryglobal{ws}% \begin{itemdecl} -template - basic_istream& ws(basic_istream& is); +template + basic_istream& ws(basic_istream& is); \end{itemdecl} \begin{itemdescr} @@ -5787,19 +5787,19 @@ \indexlibraryglobal{basic_iostream}% \begin{codeblock} namespace std { - template> + template> class basic_iostream - : public basic_istream, - public basic_ostream { + : public basic_istream, + public basic_ostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{iostream.cons}, constructor - explicit basic_iostream(basic_streambuf* sb); + explicit basic_iostream(basic_streambuf* sb); // \ref{iostream.dest}, destructor virtual ~basic_iostream(); @@ -5827,16 +5827,16 @@ \indexlibraryctor{basic_iostream}% \begin{itemdecl} -explicit basic_iostream(basic_streambuf* sb); +explicit basic_iostream(basic_streambuf* sb); \end{itemdecl} \begin{itemdescr} \pnum \effects Initializes the base class subobjects with -\tcode{basic_istream(sb)}\iref{istream} +\tcode{basic_istream(sb)}\iref{istream} and -\tcode{basic_ostream(sb)}\iref{ostream}. +\tcode{basic_ostream(sb)}\iref{ostream}. \pnum \ensures @@ -5893,7 +5893,7 @@ \begin{itemdescr} \pnum \effects -Calls \tcode{basic_istream::swap(rhs)}. +Calls \tcode{basic_istream::swap(rhs)}. \end{itemdescr} @@ -5919,18 +5919,18 @@ \indexlibraryglobal{basic_ostream}% \begin{codeblock} namespace std { - template> - class basic_ostream : virtual public basic_ios { + template> + class basic_ostream : virtual public basic_ios { public: // types (inherited from \tcode{basic_ios}\iref{ios}) - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{ostream.cons}, constructor/destructor - explicit basic_ostream(basic_streambuf* sb); + explicit basic_ostream(basic_streambuf* sb); virtual ~basic_ostream(); // \ref{ostream.sentry}, prefix/suffix @@ -5938,7 +5938,7 @@ // \ref{ostream.formatted}, formatted output basic_ostream& operator<<(basic_ostream& (*pf)(basic_ostream&)); - basic_ostream& operator<<(basic_ios& (*pf)(basic_ios&)); + basic_ostream& operator<<(basic_ios& (*pf)(basic_ios&)); basic_ostream& operator<<(ios_base& (*pf)(ios_base&)); basic_ostream& operator<<(bool n); @@ -5958,7 +5958,7 @@ basic_ostream& operator<<(const void* p); basic_ostream& operator<<(const volatile void* p); basic_ostream& operator<<(nullptr_t); - basic_ostream& operator<<(basic_streambuf* sb); + basic_ostream& operator<<(basic_streambuf* sb); // \ref{ostream.unformatted}, unformatted output basic_ostream& put(char_type c); @@ -5983,69 +5983,69 @@ }; // \ref{ostream.inserters.character}, character inserters - template - basic_ostream& operator<<(basic_ostream&, charT); - template - basic_ostream& operator<<(basic_ostream&, char); - template - basic_ostream& operator<<(basic_ostream&, char); - - template - basic_ostream& operator<<(basic_ostream&, signed char); - template - basic_ostream& operator<<(basic_ostream&, unsigned char); - - template - basic_ostream& operator<<(basic_ostream&, wchar_t) = delete; - template - basic_ostream& operator<<(basic_ostream&, char8_t) = delete; - template - basic_ostream& operator<<(basic_ostream&, char16_t) = delete; - template - basic_ostream& operator<<(basic_ostream&, char32_t) = delete; - template - basic_ostream& - operator<<(basic_ostream&, char8_t) = delete; - template - basic_ostream& - operator<<(basic_ostream&, char16_t) = delete; - template - basic_ostream& - operator<<(basic_ostream&, char32_t) = delete; - - template - basic_ostream& operator<<(basic_ostream&, const charT*); - template - basic_ostream& operator<<(basic_ostream&, const char*); - template - basic_ostream& operator<<(basic_ostream&, const char*); - - template - basic_ostream& operator<<(basic_ostream&, const signed char*); - template - basic_ostream& operator<<(basic_ostream&, const unsigned char*); - - template - basic_ostream& - operator<<(basic_ostream&, const wchar_t*) = delete; - template - basic_ostream& - operator<<(basic_ostream&, const char8_t*) = delete; - template - basic_ostream& - operator<<(basic_ostream&, const char16_t*) = delete; - template - basic_ostream& - operator<<(basic_ostream&, const char32_t*) = delete; - template - basic_ostream& - operator<<(basic_ostream&, const char8_t*) = delete; - template - basic_ostream& - operator<<(basic_ostream&, const char16_t*) = delete; - template - basic_ostream& - operator<<(basic_ostream&, const char32_t*) = delete; + template + basic_ostream& operator<<(basic_ostream&, CharT); + template + basic_ostream& operator<<(basic_ostream&, char); + template + basic_ostream& operator<<(basic_ostream&, char); + + template + basic_ostream& operator<<(basic_ostream&, signed char); + template + basic_ostream& operator<<(basic_ostream&, unsigned char); + + template + basic_ostream& operator<<(basic_ostream&, wchar_t) = delete; + template + basic_ostream& operator<<(basic_ostream&, char8_t) = delete; + template + basic_ostream& operator<<(basic_ostream&, char16_t) = delete; + template + basic_ostream& operator<<(basic_ostream&, char32_t) = delete; + template + basic_ostream& + operator<<(basic_ostream&, char8_t) = delete; + template + basic_ostream& + operator<<(basic_ostream&, char16_t) = delete; + template + basic_ostream& + operator<<(basic_ostream&, char32_t) = delete; + + template + basic_ostream& operator<<(basic_ostream&, const CharT*); + template + basic_ostream& operator<<(basic_ostream&, const char*); + template + basic_ostream& operator<<(basic_ostream&, const char*); + + template + basic_ostream& operator<<(basic_ostream&, const signed char*); + template + basic_ostream& operator<<(basic_ostream&, const unsigned char*); + + template + basic_ostream& + operator<<(basic_ostream&, const wchar_t*) = delete; + template + basic_ostream& + operator<<(basic_ostream&, const char8_t*) = delete; + template + basic_ostream& + operator<<(basic_ostream&, const char16_t*) = delete; + template + basic_ostream& + operator<<(basic_ostream&, const char32_t*) = delete; + template + basic_ostream& + operator<<(basic_ostream&, const char8_t*) = delete; + template + basic_ostream& + operator<<(basic_ostream&, const char16_t*) = delete; + template + basic_ostream& + operator<<(basic_ostream&, const char32_t*) = delete; } \end{codeblock} @@ -6104,7 +6104,7 @@ \indexlibraryctor{basic_ostream}% \begin{itemdecl} -explicit basic_ostream(basic_streambuf* sb); +explicit basic_ostream(basic_streambuf* sb); \end{itemdecl} \indexlibrarymember{init}{basic_ostream}% @@ -6112,7 +6112,7 @@ \pnum \effects Initializes the base class subobject with -\tcode{basic_ios::init(sb)}\iref{basic.ios.cons}. +\tcode{basic_ios::init(sb)}\iref{basic.ios.cons}. \pnum \ensures @@ -6129,7 +6129,7 @@ \effects Move constructs from the rvalue \tcode{rhs}. This is accomplished by default constructing the base class and calling -\tcode{basic_ios::move(rhs)} to initialize the +\tcode{basic_ios::move(rhs)} to initialize the base class. \end{itemdescr} @@ -6170,7 +6170,7 @@ \begin{itemdescr} \pnum \effects -Calls \tcode{basic_ios::swap(rhs)}. +Calls \tcode{basic_ios::swap(rhs)}. \end{itemdescr} \rSec4[ostream.sentry]{Class \tcode{basic_ostream::sentry}} @@ -6179,8 +6179,8 @@ \indexlibrarymember{sentry}{basic_ostream}% \begin{codeblock} namespace std { - template - class basic_ostream::sentry { + template + class basic_ostream::sentry { bool @\exposid{ok_}@; // \expos public: @@ -6385,8 +6385,8 @@ \pnum 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 container type of the stream, if +follows. Given a \tcode{CharT} character sequence \tcode{seq} where +\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 @@ -6438,7 +6438,7 @@ \tcode{const void*}, the formatting conversion occurs as if it performed the following code fragment: \begin{codeblock} -bool failed = use_facet>>( +bool failed = use_facet>>( getloc()).put(*this, *this, fill(), val).failed(); \end{codeblock} @@ -6447,7 +6447,7 @@ the formatting conversion occurs as if it performed the following code fragment: \begin{codeblock} ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield; -bool failed = use_facet>>( +bool failed = use_facet>>( getloc()).put(*this, *this, fill(), baseflags == ios_base::oct || baseflags == ios_base::hex ? static_cast(static_cast(val)) @@ -6459,7 +6459,7 @@ the formatting conversion occurs as if it performed the following code fragment: \begin{codeblock} ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield; -bool failed = use_facet>>( +bool failed = use_facet>>( getloc()).put(*this, *this, fill(), baseflags == ios_base::oct || baseflags == ios_base::hex ? static_cast(static_cast(val)) @@ -6472,7 +6472,7 @@ \tcode{unsigned int} the formatting conversion occurs as if it performed the following code fragment: \begin{codeblock} -bool failed = use_facet>>( +bool failed = use_facet>>( getloc()).put(*this, *this, fill(), static_cast(val)).failed(); \end{codeblock} @@ -6480,7 +6480,7 @@ \tcode{float} the formatting conversion occurs as if it performed the following code fragment: \begin{codeblock} -bool failed = use_facet>>( +bool failed = use_facet>>( getloc()).put(*this, *this, fill(), static_cast(val)).failed(); \end{codeblock} @@ -6538,7 +6538,7 @@ is less than or equal to that of \tcode{double}, the formatting conversion occurs as if it performed the following code fragment: \begin{codeblock} -bool failed = use_facet>>( +bool failed = use_facet>>( getloc()).put(*this, *this, fill(), static_cast(val)).failed(); \end{codeblock} Otherwise, @@ -6546,7 +6546,7 @@ is less than or equal to that of \tcode{long double}, the formatting conversion occurs as if it performed the following code fragment: \begin{codeblock} -bool failed = use_facet>>( +bool failed = use_facet>>( getloc()).put(*this, *this, fill(), static_cast(val)).failed(); \end{codeblock} Otherwise, an invocation of the operator function is conditionally supported @@ -6587,7 +6587,7 @@ \indexlibrarymember{operator<<}{basic_ostream}% \begin{itemdecl} -basic_ostream& operator<<(basic_ios& (*pf)(basic_ios&)); +basic_ostream& operator<<(basic_ios& (*pf)(basic_ios&)); \end{itemdecl} \begin{itemdescr} @@ -6628,7 +6628,7 @@ \indexlibrarymember{operator<<}{basic_ostream}% \begin{itemdecl} -basic_ostream& operator<<(basic_streambuf* sb); +basic_ostream& operator<<(basic_streambuf* sb); \end{itemdecl} \begin{itemdescr} @@ -6690,7 +6690,7 @@ return *this << s; \end{codeblock} where \tcode{s} is an -\impldef{NTCTS in \tcode{basic_ostream\& op\-er\-ator<<(nullptr_t)}} +\impldef{NTCTS in \tcode{basic_ostream\& op\-er\-ator<<(nullptr_t)}} NTCTS\iref{defns.ntcts}. \end{itemdescr} @@ -6698,18 +6698,18 @@ \indexlibrarymember{operator<<}{basic_ostream}% \begin{itemdecl} -template - basic_ostream& operator<<(basic_ostream& out, charT c); -template - basic_ostream& operator<<(basic_ostream& out, char c); +template + basic_ostream& operator<<(basic_ostream& out, CharT c); +template + basic_ostream& operator<<(basic_ostream& out, char c); // specialization -template - basic_ostream& operator<<(basic_ostream& out, char c); +template + basic_ostream& operator<<(basic_ostream& out, char c); // signed and unsigned -template - basic_ostream& operator<<(basic_ostream& out, signed char c); -template - basic_ostream& operator<<(basic_ostream& out, unsigned char c); +template + basic_ostream& operator<<(basic_ostream& out, signed char c); +template + basic_ostream& operator<<(basic_ostream& out, unsigned char c); \end{itemdecl} \begin{itemdescr} @@ -6735,16 +6735,16 @@ \indexlibrarymember{operator<<}{basic_ostream}% \begin{itemdecl} -template - basic_ostream& operator<<(basic_ostream& out, const charT* s); -template - basic_ostream& operator<<(basic_ostream& out, const char* s); -template - basic_ostream& operator<<(basic_ostream& out, const char* s); -template - basic_ostream& operator<<(basic_ostream& out, const signed char* s); -template - basic_ostream& operator<<(basic_ostream& out, +template + basic_ostream& operator<<(basic_ostream& out, const CharT* s); +template + basic_ostream& operator<<(basic_ostream& out, const char* s); +template + basic_ostream& operator<<(basic_ostream& out, const char* s); +template + basic_ostream& operator<<(basic_ostream& out, const signed char* s); +template + basic_ostream& operator<<(basic_ostream& out, const unsigned char* s); \end{itemdecl} @@ -6762,23 +6762,23 @@ where \tcode{n} is the number that would be computed as if by: \begin{itemize} \item -\tcode{traits::length(s)} +\tcode{Traits::length(s)} for the overload where the first argument is of type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and the second is of type -\tcode{const charT*}, +\tcode{const CharT*}, and also for the overload where the first argument is of type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and the second is of type \tcode{const char*}, \item \tcode{char_traits::length(s)} for the overload where the first argument is of type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and the second is of type \tcode{const char*}, \item -\tcode{traits::length(reinterpret_cast(s))} +\tcode{Traits::length(reinterpret_cast(s))} for the other two overloads. \end{itemize} Determines padding for \tcode{seq} as described @@ -7032,8 +7032,8 @@ \indexlibraryglobal{endl}% \begin{itemdecl} -template - basic_ostream& endl(basic_ostream& os); +template + basic_ostream& endl(basic_ostream& os); \end{itemdecl} \begin{itemdescr} @@ -7051,8 +7051,8 @@ \indexlibraryglobal{ends}% \begin{itemdecl} -template - basic_ostream& ends(basic_ostream& os); +template + basic_ostream& ends(basic_ostream& os); \end{itemdecl} \begin{itemdescr} @@ -7060,7 +7060,7 @@ \effects Inserts a null character into the output sequence: calls -\tcode{os.put(charT())}. +\tcode{os.put(CharT())}. \pnum \returns @@ -7069,8 +7069,8 @@ \indexlibraryglobal{flush}% \begin{itemdecl} -template - basic_ostream& flush(basic_ostream& os); +template + basic_ostream& flush(basic_ostream& os); \end{itemdecl} \begin{itemdescr} @@ -7086,15 +7086,15 @@ \indexlibraryglobal{emit_on_flush}% \begin{itemdecl} -template - basic_ostream& emit_on_flush(basic_ostream& os); +template + basic_ostream& emit_on_flush(basic_ostream& os); \end{itemdecl} \begin{itemdescr} \pnum \effects If \tcode{os.rdbuf()} is a -\tcode{basic_syncbuf*}, +\tcode{basic_syncbuf*}, called \tcode{buf} for the purpose of exposition, calls \tcode{buf->set_emit_on_sync(true)}. Otherwise this manipulator has no effect. @@ -7112,15 +7112,15 @@ \indexlibraryglobal{noemit_on_flush}% \begin{itemdecl} -template - basic_ostream& noemit_on_flush(basic_ostream& os); +template + basic_ostream& noemit_on_flush(basic_ostream& os); \end{itemdecl} \begin{itemdescr} \pnum \effects If \tcode{os.rdbuf()} is a -\tcode{basic_syncbuf*}, +\tcode{basic_syncbuf*}, called \tcode{buf} for the purpose of exposition, calls \tcode{buf->set_emit_on_sync(false)}. Otherwise this manipulator has no effect. @@ -7132,8 +7132,8 @@ \indexlibraryglobal{flush_emit}% \begin{itemdecl} -template - basic_ostream& flush_emit(basic_ostream& os); +template + basic_ostream& flush_emit(basic_ostream& os); \end{itemdecl} \begin{itemdescr} @@ -7141,7 +7141,7 @@ \effects Calls \tcode{os.flush()}. Then, if \tcode{os.rdbuf()} is a -\tcode{basic_syncbuf*}, +\tcode{basic_syncbuf*}, called \tcode{buf} for the purpose of exposition, behaves as an unformatted output function\iref{ostream.unformatted} of \tcode{os}. @@ -7195,20 +7195,20 @@ \returns An object of unspecified type such that if \tcode{out} is an object of type -\tcode{basic_ostream} then the expression +\tcode{basic_ostream} then the expression \tcode{out << resetiosflags(mask)} behaves as if it called \tcode{f(out, mask)}, or if \tcode{in} is an object of type -\tcode{basic_istream} then the expression +\tcode{basic_istream} then the expression \tcode{in >> resetiosflags(\brk{}mask)} behaves as if it called \tcode{f(in, mask)}, where the function \tcode{f} is defined as: \begin{footnote} The expression \tcode{cin >> resetiosflags(ios_base::skipws)} clears \tcode{ios_base::skipws} in the format flags stored in the -\tcode{basic_istream} object \tcode{cin} (the same as +\tcode{basic_istream} object \tcode{cin} (the same as \tcode{cin >> noskipws}), and the expression \tcode{cout << resetiosflags(ios_base::showbase)} clears \tcode{ios_base::showbase} in the -format flags stored in the \tcode{basic_ostream} object +format flags stored in the \tcode{basic_ostream} object \tcode{cout} (the same as \tcode{cout << noshowbase}). \end{footnote} @@ -7220,9 +7220,9 @@ \end{codeblock} The expression \tcode{out << resetiosflags(mask)} has -type \tcode{basic_ostream\&} and value \tcode{out}. The +type \tcode{basic_ostream\&} and value \tcode{out}. The expression \tcode{in >> resetiosflags(mask)} has type -\tcode{basic_istream\&} and value \tcode{in}. +\tcode{basic_istream\&} and value \tcode{in}. \end{itemdescr} \indexlibraryglobal{setiosflags}% @@ -7236,7 +7236,7 @@ An object of unspecified type such that if \tcode{out} is an object of type -\tcode{basic_ostream} +\tcode{basic_ostream} then the expression \tcode{out << setiosflags(mask)} behaves as if it called @@ -7244,7 +7244,7 @@ or if \tcode{in} is an object of type -\tcode{basic_istream} +\tcode{basic_istream} then the expression \tcode{in >> setiosflags(mask)} behaves as if it called @@ -7261,13 +7261,13 @@ The expression \tcode{out << setiosflags(mask)} has type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and value \tcode{out}. The expression \tcode{in >> setiosflags(mask)} has type -\tcode{basic_istream\&} +\tcode{basic_istream\&} and value \tcode{in}. \end{itemdescr} @@ -7283,7 +7283,7 @@ An object of unspecified type such that if \tcode{out} is an object of type -\tcode{basic_ostream} +\tcode{basic_ostream} then the expression \tcode{out << setbase(base)} behaves as if it called @@ -7291,7 +7291,7 @@ or if \tcode{in} is an object of type -\tcode{basic_istream} +\tcode{basic_istream} then the expression \tcode{in >> setbase(base)} behaves as if it called @@ -7310,13 +7310,13 @@ The expression \tcode{out << setbase(base)} has type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and value \tcode{out}. The expression \tcode{in >> setbase(base)} has type -\tcode{basic_istream\&} +\tcode{basic_istream\&} and value \tcode{in}. \end{itemdescr} @@ -7332,17 +7332,17 @@ An object of unspecified type such that if \tcode{out} is an object of type -\tcode{basic_ostream} +\tcode{basic_ostream} and \tcode{c} has type -\tcode{charT} +\tcode{CharT} then the expression \tcode{out << setfill(c)} behaves as if it called \tcode{f(out, c)}, where the function \tcode{f} is defined as: \begin{codeblock} -template -void f(basic_ios& str, charT c) { +template +void f(basic_ios& str, CharT c) { // set fill character str.fill(c); } @@ -7351,7 +7351,7 @@ The expression \tcode{out << setfill(c)} has type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and value \tcode{out}. \end{itemdescr} @@ -7367,7 +7367,7 @@ An object of unspecified type such that if \tcode{out} is an object of type -\tcode{basic_ostream} +\tcode{basic_ostream} then the expression \tcode{out << setprecision(n)} behaves as if it called @@ -7375,7 +7375,7 @@ or if \tcode{in} is an object of type -\tcode{basic_istream} +\tcode{basic_istream} then the expression \tcode{in >> setprecision(n)} behaves as if it called @@ -7391,13 +7391,13 @@ The expression \tcode{out << setprecision(n)} has type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and value \tcode{out}. The expression \tcode{in >> setprecision(n)} has type -\tcode{basic_istream\&} +\tcode{basic_istream\&} and value \tcode{in}. \end{itemdescr} @@ -7413,7 +7413,7 @@ An object of unspecified type such that if \tcode{out} is an instance of -\tcode{basic_ostream} +\tcode{basic_ostream} then the expression \tcode{out << setw(n)} behaves as if it called @@ -7421,7 +7421,7 @@ or if \tcode{in} is an object of type -\tcode{basic_istream} +\tcode{basic_istream} then the expression \tcode{in >> setw(n)} behaves as if it called @@ -7437,13 +7437,13 @@ The expression \tcode{out << setw(n)} has type -\tcode{basic_ostream\&} +\tcode{basic_ostream\&} and value \tcode{out}. The expression \tcode{in >> setw(n)} has type -\tcode{basic_istream\&} +\tcode{basic_istream\&} and value \tcode{in}. \end{itemdescr} @@ -7473,15 +7473,15 @@ \pnum \returns An object of unspecified type such that if -\tcode{in} is an object of type \tcode{basic_istream} +\tcode{in} is an object of type \tcode{basic_istream} then the expression \tcode{in >> get_money(mon, intl)} behaves as if it called \tcode{f(in, mon, intl)}, where the function \tcode{f} is defined as: \begin{codeblock} -template -void f(basic_ios& str, moneyT& mon, bool intl) { - using Iter = istreambuf_iterator; - using MoneyGet = money_get; +template +void f(basic_ios& str, moneyT& mon, bool intl) { + using Iter = istreambuf_iterator; + using MoneyGet = money_get; ios_base::iostate err = ios_base::goodbit; const MoneyGet& mg = use_facet(str.getloc()); @@ -7494,7 +7494,7 @@ \end{codeblock} The expression \tcode{in >> get_money(mon, intl)} has type -\tcode{basic_istream\&} and value \tcode{in}. +\tcode{basic_istream\&} and value \tcode{in}. \end{itemdescr} \indexlibraryglobal{put_money}% @@ -7511,16 +7511,16 @@ \pnum \returns An object of unspecified type such that if -\tcode{out} is an object of type \tcode{basic_ostream} +\tcode{out} is an object of type \tcode{basic_ostream} then the expression \tcode{out << put_money(mon, intl)} behaves as a formatted output function\iref{ostream.formatted.reqmts} that calls \tcode{f(out, mon, intl)}, where the function \tcode{f} is defined as: \begin{codeblock} -template -void f(basic_ios& str, const moneyT& mon, bool intl) { - using Iter = ostreambuf_iterator; - using MoneyPut = money_put; +template +void f(basic_ios& str, const moneyT& mon, bool intl) { + using Iter = ostreambuf_iterator; + using MoneyPut = money_put; const MoneyPut& mp = use_facet(str.getloc()); const Iter end = mp.put(Iter(str.rdbuf()), intl, str, str.fill(), mon); @@ -7531,38 +7531,38 @@ \end{codeblock} The expression \tcode{out << put_money(mon, intl)} has type -\tcode{basic_ostream\&} and value \tcode{out}. +\tcode{basic_ostream\&} and value \tcode{out}. \end{itemdescr} \indexlibraryglobal{get_time}% \begin{itemdecl} -template @\unspec@ get_time(tm* tmb, const charT* fmt); +template @\unspec@ get_time(tm* tmb, const CharT* fmt); \end{itemdecl} \begin{itemdescr} \pnum \expects The argument \tcode{tmb} is a valid pointer to an object of type \tcode{tm}, -and \range{fmt}{fmt + char_traits::length(fmt)} is a valid range. +and \range{fmt}{fmt + char_traits::length(fmt)} is a valid range. \pnum \returns An object of unspecified type such that if \tcode{in} is an object of type -\tcode{basic_istream} then the expression \tcode{in >> get_time(tmb, +\tcode{basic_istream} then the expression \tcode{in >> get_time(tmb, fmt)} behaves as if it called \tcode{f(in, tmb, fmt)}, where the function \tcode{f} is defined as: \begin{codeblock} -template -void f(basic_ios& str, tm* tmb, const charT* fmt) { - using Iter = istreambuf_iterator; - using TimeGet = time_get; +template +void f(basic_ios& str, tm* tmb, const CharT* fmt) { + using Iter = istreambuf_iterator; + using TimeGet = time_get; ios_base::iostate err = ios_base::goodbit; const TimeGet& tg = use_facet(str.getloc()); tg.get(Iter(str.rdbuf()), Iter(), str, err, tmb, - fmt, fmt + traits::length(fmt)); + fmt, fmt + Traits::length(fmt)); if (err != ios_base::goodbit) str.setstate(err); @@ -7570,36 +7570,36 @@ \end{codeblock} The expression \tcode{in >> get_time(tmb, fmt)} has type -\tcode{basic_istream\&} and value \tcode{in}. +\tcode{basic_istream\&} and value \tcode{in}. \end{itemdescr} \indexlibraryglobal{put_time}% \begin{itemdecl} -template @\unspec@ put_time(const tm* tmb, const charT* fmt); +template @\unspec@ put_time(const tm* tmb, const CharT* fmt); \end{itemdecl} \begin{itemdescr} \pnum \expects The argument \tcode{tmb} is a valid pointer to an object of type \tcode{tm}, -and \range{fmt}{fmt + char_traits::length(fmt)} is a valid range. +and \range{fmt}{fmt + char_traits::length(fmt)} is a valid range. \pnum \returns An object of unspecified type such that if \tcode{out} is an object of -type \tcode{basic_ostream} then the expression +type \tcode{basic_ostream} then the expression \tcode{out << put_time(tmb, fmt)} behaves as if it called \tcode{f(out, tmb, fmt)}, where the function \tcode{f} is defined as: \begin{codeblock} -template -void f(basic_ios& str, const tm* tmb, const charT* fmt) { - using Iter = ostreambuf_iterator; - using TimePut = time_put; +template +void f(basic_ios& str, const tm* tmb, const CharT* fmt) { + using Iter = ostreambuf_iterator; + using TimePut = time_put; const TimePut& tp = use_facet(str.getloc()); const Iter end = tp.put(Iter(str.rdbuf()), str, str.fill(), tmb, - fmt, fmt + traits::length(fmt)); + fmt, fmt + Traits::length(fmt)); if (end.failed()) str.setstate(ios_base::badbit); @@ -7607,7 +7607,7 @@ \end{codeblock} The expression \tcode{out << put_time(tmb, fmt)} has type -\tcode{basic_ostream\&} and value \tcode{out}. +\tcode{basic_ostream\&} and value \tcode{out}. \end{itemdescr} \rSec2[quoted.manip]{Quoted manipulators} @@ -7619,14 +7619,14 @@ \indexlibraryglobal{quoted}% \begin{itemdecl} -template - @\unspec@ quoted(const charT* s, charT delim = charT('"'), charT escape = charT('\\')); -template - @\unspec@ quoted(const basic_string& s, - @\itcorr@ charT delim = charT('"'), charT escape = charT('\\')); -template - @\unspec@ quoted(basic_string_view s, - @\itcorr@ charT delim = charT('"'), charT escape = charT('\\')); +template + @\unspec@ quoted(const CharT* s, CharT delim = CharT('"'), CharT escape = CharT('\\')); +template + @\unspec@ quoted(const basic_string& s, + @\itcorr@ CharT delim = CharT('"'), CharT escape = CharT('\\')); +template + @\unspec@ quoted(basic_string_view s, + @\itcorr@ CharT delim = CharT('"'), CharT escape = CharT('\\')); \end{itemdecl} \begin{itemdescr} @@ -7634,8 +7634,8 @@ \returns An object of unspecified type such that if \tcode{out} is an instance of \tcode{basic_ostream} with member type \tcode{char_type} the same as -\tcode{charT} and with member type \tcode{traits_type}, which in the second and third -forms is the same as \tcode{traits}, then the expression +\tcode{CharT} and with member type \tcode{traits_type}, which in the second and third +forms is the same as \tcode{Traits}, then the expression \tcode{out << quoted(s, delim, escape)} behaves as a formatted output function\iref{ostream.formatted.reqmts} of \tcode{out}. This forms a character sequence \tcode{seq}, initially @@ -7653,14 +7653,14 @@ \tcode{out.rdbuf()->sputn(seq, n)}, where \tcode{n} is the larger of \tcode{out.width()} and \tcode{x}, and \tcode{out.width(0)} is called. The expression \tcode{out << quoted(s, delim, escape)} has type -\tcode{basic_ostream\&} and value \tcode{out}. +\tcode{basic_ostream\&} and value \tcode{out}. \end{itemdescr} \indexlibraryglobal{quoted}% \begin{itemdecl} -template - @\unspec@ quoted(basic_string& s, - @\itcorr@ charT delim = charT('"'), charT escape = charT('\\')); +template + @\unspec@ quoted(basic_string& s, + @\itcorr@ CharT delim = CharT('"'), CharT escape = CharT('\\')); \end{itemdecl} \begin{itemdescr} @@ -7669,11 +7669,11 @@ An object of unspecified type such that: \begin{itemize} \item If \tcode{in} is an instance of \tcode{basic_istream} with member types -\tcode{char_type} and \tcode{traits_type} the same as \tcode{charT} -and \tcode{traits}, respectively, then the expression +\tcode{char_type} and \tcode{traits_type} the same as \tcode{CharT} +and \tcode{Traits}, respectively, then the expression \tcode{in >> quoted(s, delim, escape)} behaves as if it extracts the following characters from \tcode{in} using -\tcode{operator>>(basic_istream\&, charT\&)}\iref{istream.extractors} +\tcode{operator>>(basic_istream\&, CharT\&)}\iref{istream.extractors} which may throw \tcode{ios_base::failure}\iref{ios.failure}: \begin{itemize} \item If the first character extracted is equal to \tcode{delim}, as @@ -7691,17 +7691,17 @@ \item Otherwise, \tcode{in >> s}. \end{itemize} \item If \tcode{out} is an instance of \tcode{basic_ostream} with member types -\tcode{char_type} and \tcode{traits_type} the same as \tcode{charT} and -\tcode{traits}, respectively, then the expression +\tcode{char_type} and \tcode{traits_type} the same as \tcode{CharT} and +\tcode{Traits}, respectively, then the expression \tcode{out << quoted(s, delim, escape)} behaves as specified for the -\tcode{const basic_string\&} overload of the +\tcode{const basic_string\&} overload of the \tcode{quoted} function. \item The expression \tcode{in >> quoted(s, delim, escape)} has type -\tcode{basic_istream\&} and value \tcode{in}. +\tcode{basic_istream\&} and value \tcode{in}. \item The expression \tcode{out << quoted(s, delim, escape)} has type -\tcode{basic_ostream\brk{}\&} and value \tcode{out}. +\tcode{basic_ostream\brk{}\&} and value \tcode{out}. \end{itemize} \end{itemdescr} @@ -7965,49 +7965,49 @@ \begin{codeblock} namespace std { // \ref{stringbuf}, class template \tcode{basic_stringbuf} - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_stringbuf; - template - void swap(basic_stringbuf& x, - basic_stringbuf& y) noexcept(noexcept(x.swap(y))); + template + void swap(basic_stringbuf& x, + basic_stringbuf& y) noexcept(noexcept(x.swap(y))); using stringbuf = basic_stringbuf; using wstringbuf = basic_stringbuf; // \ref{istringstream}, class template \tcode{basic_istringstream} - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_istringstream; - template - void swap(basic_istringstream& x, - basic_istringstream& y); + template + void swap(basic_istringstream& x, + basic_istringstream& y); using istringstream = basic_istringstream; using wistringstream = basic_istringstream; // \ref{ostringstream}, class template \tcode{basic_ostringstream} - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_ostringstream; - template - void swap(basic_ostringstream& x, - basic_ostringstream& y); + template + void swap(basic_ostringstream& x, + basic_ostringstream& y); using ostringstream = basic_ostringstream; using wostringstream = basic_ostringstream; // \ref{stringstream}, class template \tcode{basic_stringstream} - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_stringstream; - template - void swap(basic_stringstream& x, - basic_stringstream& y); + template + void swap(basic_stringstream& x, + basic_stringstream& y); using stringstream = basic_stringstream; using wstringstream = basic_stringstream; @@ -8027,40 +8027,40 @@ \indexlibraryglobal{basic_stringbuf}% \begin{codeblock} namespace std { - template, - class Allocator = allocator> - class basic_stringbuf : public basic_streambuf { + template, + class Allocator = allocator> + class basic_stringbuf : public basic_streambuf { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; using allocator_type = Allocator; // \ref{stringbuf.cons}, constructors basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} explicit basic_stringbuf(ios_base::openmode which); explicit basic_stringbuf( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in | ios_base::out); explicit basic_stringbuf(const Allocator& a) : basic_stringbuf(ios_base::in | ios_base::out, a) {} basic_stringbuf(ios_base::openmode which, const Allocator& a); explicit basic_stringbuf( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::in | ios_base::out); template basic_stringbuf( - const basic_string& s, const Allocator& a) + const basic_string& s, const Allocator& a) : basic_stringbuf(s, ios_base::in | ios_base::out, a) {} template basic_stringbuf( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); template explicit basic_stringbuf( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in | ios_base::out); template explicit basic_stringbuf(const T& t, @@ -8081,25 +8081,25 @@ // \ref{stringbuf.members}, getters and setters allocator_type get_allocator() const noexcept; - basic_string str() const &; + basic_string str() const &; template - basic_string str(const SAlloc& sa) const; - basic_string str() &&; - basic_string_view view() const noexcept; + basic_string str(const SAlloc& sa) const; + basic_string str() &&; + basic_string_view view() const noexcept; - void str(const basic_string& s); + void str(const basic_string& s); template - void str(const basic_string& s); - void str(basic_string&& s); + void str(const basic_string& s); + void str(basic_string&& s); template void str(const T& t); protected: // \ref{stringbuf.virtuals}, overridden virtual functions int_type underflow() override; - int_type pbackfail(int_type c = traits::eof()) override; - int_type overflow (int_type c = traits::eof()) override; - basic_streambuf* setbuf(charT*, streamsize) override; + int_type pbackfail(int_type c = Traits::eof()) override; + int_type overflow (int_type c = Traits::eof()) override; + basic_streambuf* setbuf(CharT*, streamsize) override; pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which @@ -8110,7 +8110,7 @@ private: ios_base::openmode @\exposid{mode}@; // \expos - basic_string @\exposid{buf}@; // \expos + basic_string @\exposid{buf}@; // \expos void @\exposid{init-buf-ptrs}@(); // \expos }; } @@ -8136,7 +8136,7 @@ \tcode{in} set if the input sequence can be read, and \tcode{out} set if the output sequence can be written. \item - \tcode{basic_string \exposid{buf}} + \tcode{basic_string \exposid{buf}} contains the underlying character sequence. \item \tcode{\exposid{init-buf-ptrs}()} sets the base class' @@ -8174,7 +8174,7 @@ \indexlibraryctor{basic_stringbuf}% \begin{itemdecl} explicit basic_stringbuf( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in | ios_base::out); \end{itemdecl} @@ -8210,7 +8210,7 @@ \indexlibraryctor{basic_stringbuf}% \begin{itemdecl} explicit basic_stringbuf( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::in | ios_base::out); \end{itemdecl} @@ -8227,7 +8227,7 @@ \begin{itemdecl} template basic_stringbuf( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); \end{itemdecl} @@ -8244,7 +8244,7 @@ \begin{itemdecl} template explicit basic_stringbuf( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in | ios_base::out); \end{itemdecl} @@ -8279,13 +8279,13 @@ \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum \effects Creates a variable \tcode{sv} as if by -\tcode{basic_string_view sv = t}, +\tcode{basic_string_view sv = t}, then value-initializes the base class, initializes \exposid{mode} with \tcode{which}, and direct-non-list-initializes \exposid{buf} with \tcode{sv, a}, @@ -8382,9 +8382,9 @@ \indexlibrarymember{swap}{basic_stringbuf}% \begin{itemdecl} -template - void swap(basic_stringbuf& x, - basic_stringbuf& y) noexcept(noexcept(x.swap(y))); +template + void swap(basic_stringbuf& x, + basic_stringbuf& y) noexcept(noexcept(x.swap(y))); \end{itemdecl} \begin{itemdescr} @@ -8461,7 +8461,7 @@ \indexlibrarymember{str}{basic_stringbuf}% \begin{itemdecl} -basic_string str() const &; +basic_string str() const &; \end{itemdecl} \begin{itemdescr} @@ -8469,14 +8469,14 @@ \effects Equivalent to: \begin{codeblock} -return basic_string(view(), get_allocator()); +return basic_string(view(), get_allocator()); \end{codeblock} \end{itemdescr} \indexlibrarymember{str}{basic_stringbuf}% \begin{itemdecl} template - basic_string str(const SAlloc& sa) const; + basic_string str(const SAlloc& sa) const; \end{itemdecl} \begin{itemdescr} @@ -8489,12 +8489,12 @@ \effects Equivalent to: \begin{codeblock} -return basic_string(view(), sa); +return basic_string(view(), sa); \end{codeblock} \end{itemdescr} \begin{itemdecl} -basic_string str() &&; +basic_string str() &&; \end{itemdecl} \begin{itemdescr} @@ -8508,7 +8508,7 @@ \pnum \returns -A \tcode{basic_string} object +A \tcode{basic_string} object move constructed from the \tcode{basic_stringbuf}'s underlying character sequence in \tcode{buf}. This can be achieved by first adjusting \tcode{buf} to have @@ -8517,12 +8517,12 @@ \indexlibrarymember{view}{basic_stringbuf}% \begin{itemdecl} -basic_string_view view() const noexcept; +basic_string_view view() const noexcept; \end{itemdecl} \begin{itemdescr} \pnum -Let \tcode{sv} be \tcode{basic_string_view}. +Let \tcode{sv} be \tcode{basic_string_view}. \pnum \returns @@ -8546,7 +8546,7 @@ \indexlibrarymember{str}{basic_stringbuf}% \begin{itemdecl} -void str(const basic_string& s); +void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -8562,7 +8562,7 @@ \indexlibrarymember{str}{basic_stringbuf}% \begin{itemdecl} template - void str(const basic_string& s); + void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -8581,7 +8581,7 @@ \indexlibrarymember{str}{basic_stringbuf}% \begin{itemdecl} -void str(basic_string&& s); +void str(basic_string&& s); \end{itemdecl} \begin{itemdescr} @@ -8603,14 +8603,14 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; @\exposid{buf}@ = sv; @\exposid{init-buf-ptrs}@(); \end{codeblock} @@ -8628,16 +8628,16 @@ \returns If the input sequence has a read position available, returns -\tcode{traits::to_int_type(*gptr())}. +\tcode{Traits::to_int_type(*gptr())}. Otherwise, returns -\tcode{traits::eof()}. +\tcode{Traits::eof()}. Any character in the underlying buffer which has been initialized is considered to be part of the input sequence. \end{itemdescr} \indexlibrarymember{pbackfail}{basic_stringbuf}% \begin{itemdecl} -int_type pbackfail(int_type c = traits::eof()) override; +int_type pbackfail(int_type c = Traits::eof()) override; \end{itemdecl} \begin{itemdescr} @@ -8648,13 +8648,13 @@ \begin{itemize} \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{false} and if the input sequence has a putback position available, and if -\tcode{traits::eq(to_char_type(c), gptr()[-1])} +\tcode{Traits::eq(to_char_type(c), gptr()[-1])} returns \tcode{true}, assigns @@ -8666,7 +8666,7 @@ \tcode{c}. \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{false} and if the input sequence @@ -8682,7 +8682,7 @@ \tcode{c}. \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{true} and if the input sequence has a putback position available, @@ -8692,13 +8692,13 @@ \tcode{gptr()}. Returns: -\tcode{traits::not_eof(c)}. +\tcode{Traits::not_eof(c)}. \end{itemize} \pnum \returns As specified above, or -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate failure. \pnum @@ -8710,7 +8710,7 @@ \indexlibrarymember{overflow}{basic_stringbuf}% \begin{itemdecl} -int_type overflow(int_type c = traits::eof()) override; +int_type overflow(int_type c = Traits::eof()) override; \end{itemdecl} \begin{itemdescr} @@ -8721,7 +8721,7 @@ \begin{itemize} \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{false} and if either @@ -8735,19 +8735,19 @@ \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{true}, there is no character to append. Signals success by returning a value other than -\tcode{traits::eof()}. +\tcode{Traits::eof()}. \end{itemize} \pnum \returns As specified above, or -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate failure. \pnum @@ -8865,7 +8865,7 @@ \indexlibrarymember{setbuf}{basic_streambuf}% \begin{itemdecl} -basic_streambuf* setbuf(charT* s, streamsize n) override; +basic_streambuf* setbuf(CharT* s, streamsize n) override; \end{itemdecl} \begin{itemdescr} @@ -8888,38 +8888,38 @@ \indexlibraryglobal{basic_istringstream}% \begin{codeblock} namespace std { - template, - class Allocator = allocator> - class basic_istringstream : public basic_istream { + template, + class Allocator = allocator> + class basic_istringstream : public basic_istream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; using allocator_type = Allocator; // \ref{istringstream.cons}, constructors basic_istringstream() : basic_istringstream(ios_base::in) {} explicit basic_istringstream(ios_base::openmode which); explicit basic_istringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in); basic_istringstream(ios_base::openmode which, const Allocator& a); explicit basic_istringstream( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::in); template basic_istringstream( - const basic_string& s, const Allocator& a) + const basic_string& s, const Allocator& a) : basic_istringstream(s, ios_base::in, a) {} template basic_istringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); template explicit basic_istringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in); template explicit basic_istringstream(const T& t, ios_base::openmode which = ios_base::in); @@ -8937,33 +8937,33 @@ void swap(basic_istringstream& rhs); // \ref{istringstream.members}, members - basic_stringbuf* rdbuf() const; - basic_string str() const &; + basic_stringbuf* rdbuf() const; + basic_string str() const &; template - basic_string str(const SAlloc& sa) const; - basic_string str() &&; - basic_string_view view() const noexcept; + basic_string str(const SAlloc& sa) const; + basic_string str() &&; + basic_string_view view() const noexcept; - void str(const basic_string& s); + void str(const basic_string& s); template - void str(const basic_string& s); - void str(basic_string&& s); + void str(const basic_string& s); + void str(basic_string&& s); template void str(const T& t); private: - basic_stringbuf @\exposid{sb}@; // \expos + basic_stringbuf @\exposid{sb}@; // \expos }; } \end{codeblock} \pnum The class -\tcode{basic_istringstream} +\tcode{basic_istringstream} supports reading objects of class -\tcode{basic_string<\brk{}charT, traits, Allocator>}. +\tcode{basic_string<\brk{}CharT, Traits, Allocator>}. It uses a -\tcode{basic_stringbuf} +\tcode{basic_stringbuf} object to control the associated storage. For the sake of exposition, the maintained data is presented here as: \begin{itemize} @@ -8982,15 +8982,15 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} and \exposid{sb} with -\tcode{basic_stringbuf(which | ios_base::in)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(which | ios_base::in)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_istringstream}% \begin{itemdecl} explicit basic_istringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in); \end{itemdecl} @@ -8998,9 +8998,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} and \exposid{sb} with -\tcode{basic_stringbuf(s, which | ios_base::in)}\linebreak\iref{stringbuf.cons}. % avoid Overfull +\tcode{basic_stringbuf(s, which | ios_base::in)}\linebreak\iref{stringbuf.cons}. % avoid Overfull \end{itemdescr} \indexlibraryctor{basic_istringstream}% @@ -9012,15 +9012,15 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} and \exposid{sb} with -\tcode{basic_stringbuf(which | ios_base::in, a)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(which | ios_base::in, a)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_istringstream}% \begin{itemdecl} explicit basic_istringstream( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::in); \end{itemdecl} @@ -9028,16 +9028,16 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} and \exposid{sb} with -\tcode{basic_stringbuf(std::move(s), which | ios_base::\brk{}in)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(std::move(s), which | ios_base::\brk{}in)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_istringstream}% \begin{itemdecl} template basic_istringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); \end{itemdecl} @@ -9045,16 +9045,16 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} and \exposid{sb} with -\tcode{basic_stringbuf(s, which | ios_base::in, a)}\linebreak\iref{stringbuf.cons}. % avoid Overfull +\tcode{basic_stringbuf(s, which | ios_base::in, a)}\linebreak\iref{stringbuf.cons}. % avoid Overfull \end{itemdescr} \indexlibraryctor{basic_istringstream}% \begin{itemdecl} template explicit basic_istringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::in); \end{itemdecl} @@ -9066,9 +9066,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream} and \exposid{sb} with -\tcode{basic_stringbuf(s, which | ios_base::in)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(s, which | ios_base::in)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_istringstream}% @@ -9089,7 +9089,7 @@ \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum @@ -9109,7 +9109,7 @@ Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_stringbuf}. -Then calls \tcode{basic_istream::set_rdbuf(addressof(\exposid{sb}))} +Then calls \tcode{basic_istream::set_rdbuf(addressof(\exposid{sb}))} to install the contained \tcode{basic_stringbuf}. \end{itemdescr} @@ -9125,7 +9125,7 @@ \effects Equivalent to: \begin{codeblock} -basic_istream::swap(rhs); +basic_istream::swap(rhs); @\exposid{sb}@.swap(rhs.@\exposid{sb}@); \end{codeblock} \end{itemdescr} @@ -9133,9 +9133,9 @@ \indexlibrarymember{swap}{basic_istringstream}% \begin{itemdecl} -template - void swap(basic_istringstream& x, - basic_istringstream& y); +template + void swap(basic_istringstream& x, + basic_istringstream& y); \end{itemdecl} \begin{itemdescr} @@ -9148,18 +9148,18 @@ \indexlibrarymember{rdbuf}{basic_istringstream}% \begin{itemdecl} -basic_stringbuf* rdbuf() const; +basic_stringbuf* rdbuf() const; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{const_cast*>(addressof(\exposid{sb}))}. +\tcode{const_cast*>(addressof(\exposid{sb}))}. \end{itemdescr} \indexlibrarymember{str}{basic_istringstream}% \begin{itemdecl} -basic_string str() const &; +basic_string str() const &; \end{itemdecl} \begin{itemdescr} @@ -9171,7 +9171,7 @@ \indexlibrarymember{str}{basic_istringstream}% \begin{itemdecl} template - basic_string str(const SAlloc& sa) const; + basic_string str(const SAlloc& sa) const; \end{itemdecl} \begin{itemdescr} @@ -9182,7 +9182,7 @@ \indexlibrarymember{str}{basic_istringstream}% \begin{itemdecl} -basic_string str() &&; +basic_string str() &&; \end{itemdecl} \begin{itemdescr} @@ -9193,7 +9193,7 @@ \indexlibrarymember{view}{basic_istringstream}% \begin{itemdecl} -basic_string_view view() const noexcept; +basic_string_view view() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -9204,7 +9204,7 @@ \indexlibrarymember{str}{basic_istringstream}% \begin{itemdecl} -void str(const basic_string& s); +void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -9216,7 +9216,7 @@ \indexlibrarymember{str}{basic_istringstream}% \begin{itemdecl} template - void str(const basic_string& s); + void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -9227,7 +9227,7 @@ \indexlibrarymember{str}{basic_istringstream}% \begin{itemdecl} -void str(basic_string&& s); +void str(basic_string&& s); \end{itemdecl} \begin{itemdescr} @@ -9245,7 +9245,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum @@ -9260,38 +9260,38 @@ \indexlibraryglobal{basic_ostringstream}% \begin{codeblock} namespace std { - template, - class Allocator = allocator> - class basic_ostringstream : public basic_ostream { + template, + class Allocator = allocator> + class basic_ostringstream : public basic_ostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; using allocator_type = Allocator; // \ref{ostringstream.cons}, constructors basic_ostringstream() : basic_ostringstream(ios_base::out) {} explicit basic_ostringstream(ios_base::openmode which); explicit basic_ostringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out); basic_ostringstream(ios_base::openmode which, const Allocator& a); explicit basic_ostringstream( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::out); template basic_ostringstream( - const basic_string& s, const Allocator& a) + const basic_string& s, const Allocator& a) : basic_ostringstream(s, ios_base::out, a) {} template basic_ostringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); template explicit basic_ostringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out); template explicit basic_ostringstream(const T& t, ios_base::openmode which = ios_base::out); @@ -9309,32 +9309,32 @@ void swap(basic_ostringstream& rhs); // \ref{ostringstream.members}, members - basic_stringbuf* rdbuf() const; + basic_stringbuf* rdbuf() const; - basic_string str() const &; + basic_string str() const &; template - basic_string str(const SAlloc& sa) const; - basic_string str() &&; - basic_string_view view() const noexcept; + basic_string str(const SAlloc& sa) const; + basic_string str() &&; + basic_string_view view() const noexcept; - void str(const basic_string& s); + void str(const basic_string& s); template - void str(const basic_string& s); - void str(basic_string&& s); + void str(const basic_string& s); + void str(basic_string&& s); template void str(const T& t); private: - basic_stringbuf @\exposid{sb}@; // \expos + basic_stringbuf @\exposid{sb}@; // \expos }; } \end{codeblock} \pnum The class -\tcode{basic_ostringstream} +\tcode{basic_ostringstream} supports writing objects of class -\tcode{basic_string<\brk{}charT, traits, Allocator>}. +\tcode{basic_string<\brk{}CharT, Traits, Allocator>}. It uses a \tcode{basic_stringbuf} object to control the associated storage. @@ -9355,15 +9355,15 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} and \exposid{sb} with -\tcode{basic_stringbuf(which | ios_base::out)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(which | ios_base::out)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_ostringstream}% \begin{itemdecl} explicit basic_ostringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out); \end{itemdecl} @@ -9371,9 +9371,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} and \exposid{sb} with -\tcode{basic_stringbuf(s, which | ios_base::out)}\linebreak\iref{stringbuf.cons}. % avoid Overfull +\tcode{basic_stringbuf(s, which | ios_base::out)}\linebreak\iref{stringbuf.cons}. % avoid Overfull \end{itemdescr} \indexlibraryctor{basic_ostringstream}% @@ -9385,15 +9385,15 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} and \exposid{sb} with -\tcode{basic_stringbuf(which | ios_base::out, a)}\linebreak\iref{stringbuf.cons}. % avoid Overfull +\tcode{basic_stringbuf(which | ios_base::out, a)}\linebreak\iref{stringbuf.cons}. % avoid Overfull \end{itemdescr} \indexlibraryctor{basic_ostringstream}% \begin{itemdecl} explicit basic_ostringstream( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::out); \end{itemdecl} @@ -9401,16 +9401,16 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} and \exposid{sb} with -\tcode{basic_stringbuf(std::move(s), which | ios_base::\brk{}out)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(std::move(s), which | ios_base::\brk{}out)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_ostringstream}% \begin{itemdecl} template basic_ostringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); \end{itemdecl} @@ -9418,16 +9418,16 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} and \exposid{sb} with -\tcode{basic_stringbuf(s, which | ios_base::out, a)}\linebreak\iref{stringbuf.cons}. % avoid Overfull +\tcode{basic_stringbuf(s, which | ios_base::out, a)}\linebreak\iref{stringbuf.cons}. % avoid Overfull \end{itemdescr} \indexlibraryctor{basic_ostringstream}% \begin{itemdecl} template explicit basic_ostringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out); \end{itemdecl} @@ -9439,9 +9439,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream} and \exposid{sb} with -\tcode{basic_stringbuf(s, which | ios_base::out)}\linebreak\iref{stringbuf.cons}. % avoid Overfull +\tcode{basic_stringbuf(s, which | ios_base::out)}\linebreak\iref{stringbuf.cons}. % avoid Overfull \end{itemdescr} \indexlibraryctor{basic_ostringstream}% @@ -9462,7 +9462,7 @@ \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum @@ -9482,7 +9482,7 @@ Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_stringbuf}. -Then calls \tcode{basic_ostream::set_rdbuf(addressof(\exposid{sb}))} +Then calls \tcode{basic_ostream::set_rdbuf(addressof(\exposid{sb}))} to install the contained \tcode{basic_stringbuf}. \end{itemdescr} @@ -9498,16 +9498,16 @@ \effects Equivalent to: \begin{codeblock} -basic_ostream::swap(rhs); +basic_ostream::swap(rhs); @\exposid{sb}@.swap(rhs.@\exposid{sb}@); \end{codeblock} \end{itemdescr} \indexlibrarymember{swap}{basic_ostringstream}% \begin{itemdecl} -template - void swap(basic_ostringstream& x, - basic_ostringstream& y); +template + void swap(basic_ostringstream& x, + basic_ostringstream& y); \end{itemdecl} \begin{itemdescr} @@ -9520,18 +9520,18 @@ \indexlibrarymember{rdbuf}{basic_ostringstream}% \begin{itemdecl} -basic_stringbuf* rdbuf() const; +basic_stringbuf* rdbuf() const; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{const_cast*>(addressof(\exposid{sb}))}. +\tcode{const_cast*>(addressof(\exposid{sb}))}. \end{itemdescr} \indexlibrarymember{str}{basic_ostringstream}% \begin{itemdecl} -basic_string str() const &; +basic_string str() const &; \end{itemdecl} \begin{itemdescr} @@ -9543,7 +9543,7 @@ \indexlibrarymember{str}{basic_ostringstream}% \begin{itemdecl} template - basic_string str(const SAlloc& sa) const; + basic_string str(const SAlloc& sa) const; \end{itemdecl} \begin{itemdescr} @@ -9554,7 +9554,7 @@ \indexlibrarymember{str}{basic_ostringstream}% \begin{itemdecl} -basic_string str() &&; +basic_string str() &&; \end{itemdecl} \begin{itemdescr} @@ -9565,7 +9565,7 @@ \indexlibrarymember{view}{basic_ostringstream}% \begin{itemdecl} -basic_string_view view() const noexcept; +basic_string_view view() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -9576,7 +9576,7 @@ \indexlibrarymember{str}{basic_ostringstream}% \begin{itemdecl} -void str(const basic_string& s); +void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -9588,7 +9588,7 @@ \indexlibrarymember{str}{basic_ostringstream}% \begin{itemdecl} template - void str(const basic_string& s); + void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -9599,7 +9599,7 @@ \indexlibrarymember{str}{basic_ostringstream}% \begin{itemdecl} -void str(basic_string&& s); +void str(basic_string&& s); \end{itemdecl} \begin{itemdescr} @@ -9617,7 +9617,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum @@ -9632,38 +9632,38 @@ \indexlibraryglobal{basic_stringstream}% \begin{codeblock} namespace std { - template, - class Allocator = allocator> - class basic_stringstream : public basic_iostream { + template, + class Allocator = allocator> + class basic_stringstream : public basic_iostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; using allocator_type = Allocator; // \ref{stringstream.cons}, constructors basic_stringstream() : basic_stringstream(ios_base::out | ios_base::in) {} explicit basic_stringstream(ios_base::openmode which); explicit basic_stringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out | ios_base::in); basic_stringstream(ios_base::openmode which, const Allocator& a); explicit basic_stringstream( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::out | ios_base::in); template basic_stringstream( - const basic_string& s, const Allocator& a) + const basic_string& s, const Allocator& a) : basic_stringstream(s, ios_base::out | ios_base::in, a) {} template basic_stringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); template explicit basic_stringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out | ios_base::in); template explicit basic_stringstream(const T& t, @@ -9682,23 +9682,23 @@ void swap(basic_stringstream& rhs); // \ref{stringstream.members}, members - basic_stringbuf* rdbuf() const; + basic_stringbuf* rdbuf() const; - basic_string str() const &; + basic_string str() const &; template - basic_string str(const SAlloc& sa) const; - basic_string str() &&; - basic_string_view view() const noexcept; + basic_string str(const SAlloc& sa) const; + basic_string str() &&; + basic_string_view view() const noexcept; - void str(const basic_string& s); + void str(const basic_string& s); template - void str(const basic_string& s); - void str(basic_string&& s); + void str(const basic_string& s); + void str(basic_string&& s); template void str(const T& t); private: - basic_stringbuf @\exposid{sb}@; // \expos + basic_stringbuf @\exposid{sb}@; // \expos }; } \end{codeblock} @@ -9706,11 +9706,11 @@ \pnum The class template -\tcode{basic_stringstream} +\tcode{basic_stringstream} supports reading and writing from objects of class -\tcode{basic_string}. +\tcode{basic_string}. It uses a -\tcode{basic_stringbuf} +\tcode{basic_stringbuf} object to control the associated sequence. For the sake of exposition, the maintained data is presented here as \begin{itemize} @@ -9729,17 +9729,17 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and \exposid{sb} with -\tcode{basic_string\-buf(which)}. +\tcode{basic_string\-buf(which)}. \end{itemdescr} \indexlibraryctor{basic_stringstream}% \begin{itemdecl} explicit basic_stringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out | ios_base::in); \end{itemdecl} @@ -9747,11 +9747,11 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and \exposid{sb} with -\tcode{basic_string\-buf(s, which)}. +\tcode{basic_string\-buf(s, which)}. \end{itemdescr} \indexlibraryctor{basic_stringstream}% @@ -9763,15 +9763,15 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and \exposid{sb} with -\tcode{basic_stringbuf(which, a)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(which, a)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_stringstream}% \begin{itemdecl} explicit basic_stringstream( - basic_string&& s, + basic_string&& s, ios_base::openmode which = ios_base::out | ios_base::in); \end{itemdecl} @@ -9779,16 +9779,16 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and \exposid{sb} with -\tcode{basic_stringbuf(std::move(s), which)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(std::move(s), which)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_stringstream}% \begin{itemdecl} template basic_stringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which, const Allocator& a); \end{itemdecl} @@ -9796,16 +9796,16 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and \exposid{sb} with -\tcode{basic_stringbuf(s, which, a)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(s, which, a)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_stringstream}% \begin{itemdecl} template explicit basic_stringstream( - const basic_string& s, + const basic_string& s, ios_base::openmode which = ios_base::out | ios_base::in); \end{itemdecl} @@ -9817,9 +9817,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and \exposid{sb} with -\tcode{basic_stringbuf(s, which)}\iref{stringbuf.cons}. +\tcode{basic_stringbuf(s, which)}\iref{stringbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_stringstream}% @@ -9840,7 +9840,7 @@ \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum @@ -9860,7 +9860,7 @@ Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_stringbuf}. -Then calls \tcode{basic_istream::set_rdbuf(addressof(\exposid{sb}))} +Then calls \tcode{basic_istream::set_rdbuf(addressof(\exposid{sb}))} to install the contained \tcode{basic_stringbuf}. \end{itemdescr} @@ -9876,16 +9876,16 @@ \effects Equivalent to: \begin{codeblock} -basic_iostream::swap(rhs); +basic_iostream::swap(rhs); @\exposid{sb}@.swap(rhs.@\exposid{sb}@); \end{codeblock} \end{itemdescr} \indexlibrarymember{swap}{basic_stringstream}% \begin{itemdecl} -template - void swap(basic_stringstream& x, - basic_stringstream& y); +template + void swap(basic_stringstream& x, + basic_stringstream& y); \end{itemdecl} \begin{itemdescr} @@ -9898,18 +9898,18 @@ \indexlibrarymember{rdbuf}{basic_stringstream}% \begin{itemdecl} -basic_stringbuf* rdbuf() const; +basic_stringbuf* rdbuf() const; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{const_cast*>(addressof(\exposid{sb}))}. +\tcode{const_cast*>(addressof(\exposid{sb}))}. \end{itemdescr} \indexlibrarymember{str}{basic_stringstream}% \begin{itemdecl} -basic_string str() const &; +basic_string str() const &; \end{itemdecl} \begin{itemdescr} @@ -9921,7 +9921,7 @@ \indexlibrarymember{str}{basic_stringstream}% \begin{itemdecl} template - basic_string str(const SAlloc& sa) const; + basic_string str(const SAlloc& sa) const; \end{itemdecl} \begin{itemdescr} @@ -9932,7 +9932,7 @@ \indexlibrarymember{str}{basic_stringstream}% \begin{itemdecl} -basic_string str() &&; +basic_string str() &&; \end{itemdecl} \begin{itemdescr} @@ -9943,7 +9943,7 @@ \indexlibrarymember{view}{basic_stringstream}% \begin{itemdecl} -basic_string_view view() const noexcept; +basic_string_view view() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -9954,7 +9954,7 @@ \indexlibrarymember{str}{basic_stringstream}% \begin{itemdecl} -void str(const basic_string& s); +void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -9966,7 +9966,7 @@ \indexlibrarymember{str}{basic_stringstream}% \begin{itemdecl} template - void str(const basic_string& s); + void str(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -9977,7 +9977,7 @@ \indexlibrarymember{str}{basic_stringstream}% \begin{itemdecl} -void str(basic_string&& s); +void str(basic_string&& s); \end{itemdecl} \begin{itemdescr} @@ -9995,7 +9995,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum @@ -10035,41 +10035,41 @@ \begin{codeblock} namespace std { // \ref{spanbuf}, class template \tcode{basic_spanbuf} - template> + template> class basic_spanbuf; - template - void swap(basic_spanbuf& x, basic_spanbuf& y); + template + void swap(basic_spanbuf& x, basic_spanbuf& y); using spanbuf = basic_spanbuf; using wspanbuf = basic_spanbuf; // \ref{ispanstream}, class template \tcode{basic_ispanstream} - template> + template> class basic_ispanstream; - template - void swap(basic_ispanstream& x, basic_ispanstream& y); + template + void swap(basic_ispanstream& x, basic_ispanstream& y); using ispanstream = basic_ispanstream; using wispanstream = basic_ispanstream; // \ref{ospanstream}, class template \tcode{basic_ospanstream} - template> + template> class basic_ospanstream; - template - void swap(basic_ospanstream& x, basic_ospanstream& y); + template + void swap(basic_ospanstream& x, basic_ospanstream& y); using ospanstream = basic_ospanstream; using wospanstream = basic_ospanstream; // \ref{spanstream}, class template \tcode{basic_spanstream} - template> + template> class basic_spanstream; - template - void swap(basic_spanstream& x, basic_spanstream& y); + template + void swap(basic_spanstream& x, basic_spanstream& y); using spanstream = basic_spanstream; using wspanstream = basic_spanstream; @@ -10083,21 +10083,21 @@ \indexlibraryglobal{basic_spanbuf}% \begin{codeblock} namespace std { - template> + template> class basic_spanbuf - : public basic_streambuf { + : public basic_streambuf { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{spanbuf.cons}, constructors basic_spanbuf() : basic_spanbuf(ios_base::in | ios_base::out) {} explicit basic_spanbuf(ios_base::openmode which) - : basic_spanbuf(std::span(), which) {} - explicit basic_spanbuf(std::span s, + : basic_spanbuf(std::span(), which) {} + explicit basic_spanbuf(std::span s, ios_base::openmode which = ios_base::in | ios_base::out); basic_spanbuf(const basic_spanbuf&) = delete; basic_spanbuf(basic_spanbuf&& rhs); @@ -10108,12 +10108,12 @@ void swap(basic_spanbuf& rhs); // \ref{spanbuf.members}, member functions - std::span span() const noexcept; - void span(std::span s) noexcept; + std::span span() const noexcept; + void span(std::span s) noexcept; protected: // \ref{spanbuf.virtuals}, overridden virtual functions - basic_streambuf* setbuf(charT*, streamsize) override; + basic_streambuf* setbuf(CharT*, streamsize) override; pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out) override; pos_type seekpos(pos_type sp, @@ -10121,7 +10121,7 @@ private: ios_base::openmode @\exposid{mode}@; // \expos - std::span @\exposid{buf}@; // \expos + std::span @\exposid{buf}@; // \expos }; } \end{codeblock} @@ -10130,7 +10130,7 @@ The class template \tcode{basic_spanbuf} is derived from \tcode{basic_streambuf} to associate possibly the input sequence and possibly the output sequence with a sequence of arbitrary characters. -The sequence is provided by an object of class \tcode{span}. +The sequence is provided by an object of class \tcode{span}. \pnum For the sake of exposition, the maintained data is presented here as: @@ -10140,7 +10140,7 @@ \tcode{in} set if the input sequence can be read, and \tcode{out} set if the output sequence can be written. \item -\tcode{std::span \exposid{buf}} is the view to +\tcode{std::span \exposid{buf}} is the view to the underlying character sequence. \end{itemize} @@ -10148,7 +10148,7 @@ \indexlibraryctor{basic_spanbuf}% \begin{itemdecl} -explicit basic_spanbuf(std::span s, +explicit basic_spanbuf(std::span s, ios_base::openmode which = ios_base::in | ios_base::out); \end{itemdecl} @@ -10224,7 +10224,7 @@ \effects Equivalent to: \begin{codeblock} -basic_streambuf::swap(rhs); +basic_streambuf::swap(rhs); std::swap(@\exposid{mode}@, rhs.@\exposid{mode}@); std::swap(@\exposid{buf}@, rhs.@\exposid{buf}@); \end{codeblock} @@ -10232,8 +10232,8 @@ \indexlibrarymember{swap}{basic_spanbuf}% \begin{itemdecl} -template - void swap(basic_spanbuf& x, basic_spanbuf& y); +template + void swap(basic_spanbuf& x, basic_spanbuf& y); \end{itemdecl} \begin{itemdescr} @@ -10246,27 +10246,27 @@ \indexlibrarymember{span}{basic_spanbuf}% \begin{itemdecl} -std::span span() const noexcept; +std::span span() const noexcept; \end{itemdecl} \begin{itemdescr} \pnum \returns If \tcode{ios_base::out} is set in \exposid{mode}, -returns \tcode{std::span(pbase(), pptr())}, +returns \tcode{std::span(pbase(), pptr())}, otherwise returns \exposid{buf}. \begin{note} In contrast to \tcode{basic_stringbuf}, the underlying sequence never grows and is not owned. An owning copy can be obtained -by converting the result to \tcode{basic_string}. +by converting the result to \tcode{basic_string}. \end{note} \end{itemdescr} \indexlibrarymember{span}{basic_spanbuf}% \begin{itemdecl} -void span(std::span s) noexcept; +void span(std::span s) noexcept; \end{itemdecl} \begin{itemdescr} @@ -10390,7 +10390,7 @@ \indexlibrarymember{setbuf}{basic_spanbuf}% \begin{itemdecl} -basic_streambuf* setbuf(charT* s, streamsize n) override; +basic_streambuf* setbuf(CharT* s, streamsize n) override; \end{itemdecl} \begin{itemdescr} @@ -10398,7 +10398,7 @@ \effects Equivalent to: \begin{codeblock} -this->span(std::span(s, n)); +this->span(std::span(s, n)); return this; \end{codeblock} \end{itemdescr} @@ -10410,18 +10410,18 @@ \indexlibraryglobal{basic_ispanstream}% \begin{codeblock} namespace std { - template> + template> class basic_ispanstream - : public basic_istream { + : public basic_istream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{ispanstream.cons}, constructors - explicit basic_ispanstream(std::span s, + explicit basic_ispanstream(std::span s, ios_base::openmode which = ios_base::in); basic_ispanstream(const basic_ispanstream&) = delete; basic_ispanstream(basic_ispanstream&& rhs); @@ -10434,14 +10434,14 @@ void swap(basic_ispanstream& rhs); // \ref{ispanstream.members}, member functions - basic_spanbuf* rdbuf() const noexcept; + basic_spanbuf* rdbuf() const noexcept; - std::span span() const noexcept; - void span(std::span s) noexcept; + std::span span() const noexcept; + void span(std::span s) noexcept; template void span(ROS&& s) noexcept; private: - basic_spanbuf @\exposid{sb}@; // \expos + basic_spanbuf @\exposid{sb}@; // \expos }; } \end{codeblock} @@ -10457,16 +10457,16 @@ \indexlibraryctor{basic_ispanstream}% \begin{itemdecl} -explicit basic_ispanstream(std::span s, ios_base::openmode which = ios_base::in); +explicit basic_ispanstream(std::span s, ios_base::openmode which = ios_base::in); \end{itemdecl} \begin{itemdescr} \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))} +\tcode{basic_istream(addressof(\exposid{sb}))} and \exposid{sb} with -\tcode{basic_spanbuf(s, which | ios_base::in)}\iref{spanbuf.cons}. +\tcode{basic_spanbuf(s, which | ios_base::in)}\iref{spanbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_ispanstream}% @@ -10479,7 +10479,7 @@ \effects Initializes the base class with \tcode{std::move(rhs)} and \exposid{sb} with \tcode{std::move(rhs.\exposid{sb})}. -Next, \tcode{basic_istream::set_rdbuf(addressof(\exposid{sb}))} is called +Next, \tcode{basic_istream::set_rdbuf(addressof(\exposid{sb}))} is called to install the contained \tcode{ba\-sic_\-span\-buf}. \end{itemdescr} @@ -10492,15 +10492,15 @@ \pnum \constraints \tcode{ROS} models \tcode{ranges::\libconcept{borrowed_range}}. -\tcode{!\libconcept{convertible_to}> \&\& \libconcept{convertible_to}>} +\tcode{!\libconcept{convertible_to}> \&\& \libconcept{convertible_to}>} is \tcode{true}. \pnum \effects -Let \tcode{sp} be \tcode{std::span(std::forward(s))}. +Let \tcode{sp} be \tcode{std::span(std::forward(s))}. Equivalent to: \begin{codeblock} -basic_ispanstream(std::span(const_cast(sp.data()), sp.size())) +basic_ispanstream(std::span(const_cast(sp.data()), sp.size())) \end{codeblock} \end{itemdescr} @@ -10516,15 +10516,15 @@ \effects Equivalent to: \begin{codeblock} -basic_istream::swap(rhs); +basic_istream::swap(rhs); @\exposid{sb}@.swap(rhs.@\exposid{sb}@); \end{codeblock} \end{itemdescr} \indexlibrarymember{swap}{basic_ispanstream}% \begin{itemdecl} -template - void swap(basic_ispanstream& x, basic_ispanstream& y); +template + void swap(basic_ispanstream& x, basic_ispanstream& y); \end{itemdecl} \begin{itemdescr} @@ -10537,7 +10537,7 @@ \indexlibrarymember{rdbuf}{basic_ispanstream}% \begin{itemdecl} -basic_spanbuf* rdbuf() const noexcept; +basic_spanbuf* rdbuf() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -10545,13 +10545,13 @@ \effects Equivalent to: \begin{codeblock} -return const_cast*>(addressof(@\exposid{sb}@)); +return const_cast*>(addressof(@\exposid{sb}@)); \end{codeblock} \end{itemdescr} \indexlibrarymember{span}{basic_ispanstream}% \begin{itemdecl} -std::span span() const noexcept; +std::span span() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -10562,7 +10562,7 @@ \indexlibrarymember{span}{basic_ispanstream}% \begin{itemdecl} -void span(std::span s) noexcept; +void span(std::span s) noexcept; \end{itemdecl} \begin{itemdescr} @@ -10579,15 +10579,15 @@ \pnum \constraints \tcode{ROS} models \tcode{ranges::\libconcept{borrowed_range}}. -\tcode{(!\libconcept{convertible_to}>) \&\& \libconcept{convertible_to}>} +\tcode{(!\libconcept{convertible_to}>) \&\& \libconcept{convertible_to}>} is \tcode{true}. \pnum \effects -Let \tcode{sp} be \tcode{std::span(std::forward(s))}. +Let \tcode{sp} be \tcode{std::span(std::forward(s))}. Equivalent to: \begin{codeblock} -this->span(std::span(const_cast(sp.data()), sp.size())); +this->span(std::span(const_cast(sp.data()), sp.size())); \end{codeblock} \end{itemdescr} @@ -10598,18 +10598,18 @@ \indexlibraryglobal{basic_ospanstream}% \begin{codeblock} namespace std { - template> + template> class basic_ospanstream - : public basic_ostream { + : public basic_ostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{ospanstream.cons}, constructors - explicit basic_ospanstream(std::span s, + explicit basic_ospanstream(std::span s, ios_base::openmode which = ios_base::out); basic_ospanstream(const basic_ospanstream&) = delete; basic_ospanstream(basic_ospanstream&& rhs); @@ -10621,13 +10621,13 @@ void swap(basic_ospanstream& rhs); // \ref{ospanstream.members}, member functions - basic_spanbuf* rdbuf() const noexcept; + basic_spanbuf* rdbuf() const noexcept; - std::span span() const noexcept; - void span(std::span s) noexcept; + std::span span() const noexcept; + void span(std::span s) noexcept; private: - basic_spanbuf @\exposid{sb}@; // \expos + basic_spanbuf @\exposid{sb}@; // \expos }; } \end{codeblock} @@ -10636,7 +10636,7 @@ \indexlibraryctor{basic_ospanstream}% \begin{itemdecl} -explicit basic_ospanstream(std::span s, +explicit basic_ospanstream(std::span s, ios_base::openmode which = ios_base::out); \end{itemdecl} @@ -10644,9 +10644,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))} +\tcode{basic_ostream(addressof(\exposid{sb}))} and \exposid{sb} with -\tcode{basic_spanbuf(s, which | ios_base::out)}\iref{spanbuf.cons}. +\tcode{basic_spanbuf(s, which | ios_base::out)}\iref{spanbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_ospanstream}% @@ -10659,7 +10659,7 @@ \effects Initializes the base class with \tcode{std::move(rhs)} and \exposid{sb} with \tcode{std::move(rhs.\exposid{sb})}. -Next, \tcode{basic_ostream::set_rdbuf(addressof(\exposid{sb}))} +Next, \tcode{basic_ostream::set_rdbuf(addressof(\exposid{sb}))} is called to install the contained \tcode{ba\-sic_\-span\-buf}. \end{itemdescr} @@ -10675,15 +10675,15 @@ \effects Equivalent to: \begin{codeblock} -basic_ostream::swap(rhs); +basic_ostream::swap(rhs); @\exposid{sb}@.swap(rhs.@\exposid{sb}@); \end{codeblock} \end{itemdescr} \indexlibrarymember{swap}{basic_ospanstream}% \begin{itemdecl} -template - void swap(basic_ospanstream& x, basic_ospanstream& y); +template + void swap(basic_ospanstream& x, basic_ospanstream& y); \end{itemdecl} \begin{itemdescr} @@ -10696,7 +10696,7 @@ \indexlibrarymember{rdbuf}{basic_ospanstream}% \begin{itemdecl} -basic_spanbuf* rdbuf() const noexcept; +basic_spanbuf* rdbuf() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -10704,13 +10704,13 @@ \effects Equivalent to: \begin{codeblock} -return const_cast*>(addressof(@\exposid{sb}@)); +return const_cast*>(addressof(@\exposid{sb}@)); \end{codeblock} \end{itemdescr} \indexlibrarymember{span}{basic_ospanstream}% \begin{itemdecl} -std::span span() const noexcept; +std::span span() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -10721,7 +10721,7 @@ \indexlibrarymember{span}{basic_ospanstream}% \begin{itemdecl} -void span(std::span s) noexcept; +void span(std::span s) noexcept; \end{itemdecl} \begin{itemdescr} @@ -10737,18 +10737,18 @@ \indexlibraryglobal{basic_spanstream}% \begin{codeblock} namespace std { - template> + template> class basic_spanstream - : public basic_iostream { + : public basic_iostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; // \ref{spanstream.cons}, constructors - explicit basic_spanstream(std::span s, + explicit basic_spanstream(std::span s, ios_base::openmode which = ios_base::out | ios_base::in); basic_spanstream(const basic_spanstream&) = delete; basic_spanstream(basic_spanstream&& rhs); @@ -10760,13 +10760,13 @@ void swap(basic_spanstream& rhs); // \ref{spanstream.members}, members - basic_spanbuf* rdbuf() const noexcept; + basic_spanbuf* rdbuf() const noexcept; - std::span span() const noexcept; - void span(std::span s) noexcept; + std::span span() const noexcept; + void span(std::span s) noexcept; private: - basic_spanbuf @\exposid{sb}@; // \expos + basic_spanbuf @\exposid{sb}@; // \expos }; } \end{codeblock} @@ -10775,7 +10775,7 @@ \indexlibraryctor{basic_spanstream}% \begin{itemdecl} -explicit basic_spanstream(std::span s, +explicit basic_spanstream(std::span s, ios_base::openmode which = ios_base::out | ios_bas::in); \end{itemdecl} @@ -10783,9 +10783,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))} +\tcode{basic_iostream(addressof(\exposid{sb}))} and \exposid{sb} with -\tcode{basic_spanbuf(s, which)}\iref{spanbuf.cons}. +\tcode{basic_spanbuf(s, which)}\iref{spanbuf.cons}. \end{itemdescr} \indexlibraryctor{basic_spanstream}% @@ -10798,7 +10798,7 @@ \effects Initializes the base class with \tcode{std::move(rhs)} and \exposid{sb} with \tcode{std::move(rhs.\exposid{sb})}. -Next, \tcode{basic_iostream::set_rdbuf(addressof(\exposid{sb}))} +Next, \tcode{basic_iostream::set_rdbuf(addressof(\exposid{sb}))} is called to install the contained \tcode{basic_spanbuf}. \end{itemdescr} @@ -10814,15 +10814,15 @@ \effects Equivalent to: \begin{codeblock} -basic_iostream::swap(rhs); +basic_iostream::swap(rhs); @\exposid{sb}@.swap(rhs.@\exposid{sb}@); \end{codeblock} \end{itemdescr} \indexlibrarymember{swap}{basic_spanstream}% \begin{itemdecl} -template - void swap(basic_spanstream& x, basic_spanstream& y); +template + void swap(basic_spanstream& x, basic_spanstream& y); \end{itemdecl} \begin{itemdescr} @@ -10835,7 +10835,7 @@ \indexlibrarymember{rdbuf}{basic_spanstream}% \begin{itemdecl} -basic_spanbuf* rdbuf() const noexcept; +basic_spanbuf* rdbuf() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -10843,13 +10843,13 @@ \effects Equivalent to: \begin{codeblock} -return const_cast*>(addressof(@\exposid{sb}@)); +return const_cast*>(addressof(@\exposid{sb}@)); \end{codeblock} \end{itemdescr} \indexlibrarymember{span}{basic_spanstream}% \begin{itemdecl} -std::span span() const noexcept; +std::span span() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -10860,7 +10860,7 @@ \indexlibrarymember{span}{basic_spanstream}% \begin{itemdecl} -void span(std::span s) noexcept; +void span(std::span s) noexcept; \end{itemdecl} \begin{itemdescr} @@ -10893,41 +10893,41 @@ \begin{codeblock} namespace std { // \ref{filebuf}, class template \tcode{basic_filebuf} - template> + template> class basic_filebuf; - template - void swap(basic_filebuf& x, basic_filebuf& y); + template + void swap(basic_filebuf& x, basic_filebuf& y); using filebuf = basic_filebuf; using wfilebuf = basic_filebuf; // \ref{ifstream}, class template \tcode{basic_ifstream} - template> + template> class basic_ifstream; - template - void swap(basic_ifstream& x, basic_ifstream& y); + template + void swap(basic_ifstream& x, basic_ifstream& y); using ifstream = basic_ifstream; using wifstream = basic_ifstream; // \ref{ofstream}, class template \tcode{basic_ofstream} - template> + template> class basic_ofstream; - template - void swap(basic_ofstream& x, basic_ofstream& y); + template + void swap(basic_ofstream& x, basic_ofstream& y); using ofstream = basic_ofstream; using wofstream = basic_ofstream; // \ref{fstream}, class template \tcode{basic_fstream} - template> + template> class basic_fstream; - template - void swap(basic_fstream& x, basic_fstream& y); + template + void swap(basic_fstream& x, basic_fstream& y); using fstream = basic_fstream; using wfstream = basic_fstream; @@ -10982,14 +10982,14 @@ \indexlibraryglobal{basic_filebuf}% \begin{codeblock} namespace std { - template> - class basic_filebuf : public basic_streambuf { + template> + class basic_filebuf : public basic_streambuf { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; using native_handle_type = @\impdefx{type of \tcode{native_handle_type}}@; // see \ref{file.native} // \ref{filebuf.cons}, constructors/destructor @@ -11018,10 +11018,10 @@ streamsize showmanyc() override; int_type underflow() override; int_type uflow() override; - int_type pbackfail(int_type c = traits::eof()) override; - int_type overflow (int_type c = traits::eof()) override; + int_type pbackfail(int_type c = Traits::eof()) override; + int_type overflow (int_type c = Traits::eof()) override; - basic_streambuf* setbuf(char_type* s, streamsize n) override; + basic_streambuf* setbuf(char_type* s, streamsize n) override; pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out) override; @@ -11036,14 +11036,14 @@ \pnum The class -\tcode{basic_filebuf} +\tcode{basic_filebuf} associates both the input sequence and the output sequence with a file. \pnum The restrictions on reading and writing a sequence controlled by an object of class -\tcode{basic_filebuf} +\tcode{basic_filebuf} are the same as for reading and writing with the C standard library \tcode{FILE}s. @@ -11065,9 +11065,9 @@ An instance of \tcode{basic_filebuf} behaves as described in~\ref{filebuf} provided -\tcode{traits::pos_type} +\tcode{Traits::pos_type} is -\tcode{fpos}. +\tcode{fpos}. Otherwise the behavior is undefined. \pnum @@ -11087,8 +11087,8 @@ conversions are performed using members of a facet, referred to as \tcode{a_codecvt} in following subclauses, obtained as if by \begin{codeblock} -const codecvt& a_codecvt = - use_facet>(getloc()); +const codecvt& a_codecvt = + use_facet>(getloc()); \end{codeblock} \rSec3[filebuf.cons]{Constructors} @@ -11102,7 +11102,7 @@ \pnum \effects Initializes the base class with -\tcode{basic_streambuf()}\iref{streambuf.cons}. +\tcode{basic_streambuf()}\iref{streambuf.cons}. \pnum \ensures @@ -11197,8 +11197,8 @@ \indexlibrarymember{swap}{basic_filebuf}% \begin{itemdecl} -template - void swap(basic_filebuf& x, basic_filebuf& y); +template + void swap(basic_filebuf& x, basic_filebuf& y); \end{itemdecl} \begin{itemdescr} @@ -11338,7 +11338,7 @@ \tcode{is_open() == false}, returns a null pointer. If a put area exists, calls -\tcode{overflow(traits::\brk{}eof())} +\tcode{overflow(Traits::\brk{}eof())} to flush characters. If the last virtual member function called on \tcode{*this} @@ -11354,7 +11354,7 @@ \tcode{a_codecvt.unshift} (possibly several times) to determine a termination sequence, inserts those characters and calls -\tcode{overflow(traits::\brk{}eof())} +\tcode{overflow(Traits::\brk{}eof())} again. Finally, regardless of whether any of the preceding calls fails or throws an exception, the function closes the file @@ -11421,7 +11421,7 @@ \pnum \effects Behaves according to the description of -\tcode{basic_streambuf::underflow()}, +\tcode{basic_streambuf::underflow()}, with the specialization that a sequence of characters is read from the input sequence as if by reading from the associated file into an internal buffer (\tcode{extern_buf}) @@ -11430,8 +11430,8 @@ \begin{codeblock} char extern_buf[XSIZE]; char* extern_end; -charT intern_buf[ISIZE]; -charT* intern_end; +CharT intern_buf[ISIZE]; +CharT* intern_end; codecvt_base::result r = a_codecvt.in(state, extern_buf, extern_buf+XSIZE, extern_end, intern_buf, intern_buf+ISIZE, intern_end); @@ -11463,7 +11463,7 @@ \pnum \effects Behaves according to the description of -\tcode{basic_streambuf::uflow()}, +\tcode{basic_streambuf::uflow()}, with the specialization that a sequence of characters is read from the input with the same method as used by \tcode{underflow}. @@ -11471,7 +11471,7 @@ \indexlibrarymember{pbackfail}{basic_filebuf}% \begin{itemdecl} -int_type pbackfail(int_type c = traits::eof()) override; +int_type pbackfail(int_type c = Traits::eof()) override; \end{itemdecl} \begin{itemdescr} @@ -11482,13 +11482,13 @@ \begin{itemize} \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{false} and if the function makes a putback position available and if -\tcode{traits::eq(to_char_type(c), gptr()[-1])} +\tcode{Traits::eq(to_char_type(c), gptr()[-1])} returns \tcode{true}, decrements the next pointer for the input sequence, @@ -11499,7 +11499,7 @@ \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{false} and @@ -11513,7 +11513,7 @@ \item If -\tcode{traits::eq_int_type(c, traits::eof())} +\tcode{Traits::eq_int_type(c, Traits::eof())} returns \tcode{true}, and if either the input sequence has a putback position available or @@ -11522,13 +11522,13 @@ \tcode{gptr()}. Returns: -\tcode{traits::not_eof(c)}. +\tcode{Traits::not_eof(c)}. \end{itemize} \pnum \returns As specified above, or -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate failure. \pnum @@ -11548,20 +11548,20 @@ \indexlibrarymember{overflow}{basic_filebuf}% \begin{itemdecl} -int_type overflow(int_type c = traits::eof()) override; +int_type overflow(int_type c = Traits::eof()) override; \end{itemdecl} \begin{itemdescr} \pnum \effects Behaves according to the description of -\tcode{basic_streambuf::overflow(c)}, +\tcode{basic_streambuf::overflow(c)}, except that the behavior of ``consuming characters'' is performed by first converting as if by: \begin{codeblock} -charT* b = pbase(); -charT* p = pptr(); -charT* end; +CharT* b = pbase(); +CharT* p = pptr(); +CharT* end; char xbuf[XSIZE]; char* xbuf_end; codecvt_base::result r = @@ -11583,9 +11583,9 @@ \pnum \returns -\tcode{traits::not_eof(c)} +\tcode{Traits::not_eof(c)} to indicate success, and -\tcode{traits::eof()} +\tcode{Traits::eof()} to indicate failure. If \tcode{is_open() == false}, @@ -11781,15 +11781,15 @@ \indexlibraryglobal{basic_ifstream}% \begin{codeblock} namespace std { - template> - class basic_ifstream : public basic_istream { + template> + class basic_ifstream : public basic_istream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; - using native_handle_type = typename basic_filebuf::native_handle_type; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; + using native_handle_type = typename basic_filebuf::native_handle_type; // \ref{ifstream.cons}, constructors basic_ifstream(); @@ -11811,7 +11811,7 @@ void swap(basic_ifstream& rhs); // \ref{ifstream.members}, members - basic_filebuf* rdbuf() const; + basic_filebuf* rdbuf() const; native_handle_type native_handle() const noexcept; bool is_open() const; @@ -11823,17 +11823,17 @@ void close(); private: - basic_filebuf @\exposid{sb}@; // \expos + basic_filebuf @\exposid{sb}@; // \expos }; } \end{codeblock} \pnum The class -\tcode{basic_ifstream} +\tcode{basic_ifstream} supports reading from named files. It uses a -\tcode{basic_filebuf<\brk{}charT, traits>} +\tcode{basic_filebuf<\brk{}CharT, Traits>} object to control the associated sequence. For the sake of exposition, the maintained data is presented here as: @@ -11853,9 +11853,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream.cons} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream.cons} and \exposid{sb} with -\tcode{basic_filebuf()}\iref{filebuf.cons}. +\tcode{basic_filebuf()}\iref{filebuf.cons}. \end{itemdescr} \indexlibraryctor{basic_ifstream}% @@ -11870,9 +11870,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream.cons} +\tcode{basic_istream(addressof(\exposid{sb}))}\iref{istream.cons} and \exposid{sb} with -\tcode{basic_filebuf()}\iref{filebuf.cons}, +\tcode{basic_filebuf()}\iref{filebuf.cons}, then calls \tcode{rdbuf()->open(s, mode | ios_base::in)}. If that function returns a null pointer, calls @@ -11916,7 +11916,7 @@ \pnum \effects Move constructs the base class, and the contained \tcode{basic_filebuf}. -Then calls \tcode{basic_istream::set_rdbuf(\brk{}addressof(\exposid{sb}))} +Then calls \tcode{basic_istream::set_rdbuf(\brk{}addressof(\exposid{sb}))} to install the contained \tcode{basic_filebuf}. \end{itemdescr} @@ -11932,14 +11932,14 @@ \effects Exchanges the state of \tcode{*this} and \tcode{rhs} by calling -\tcode{basic_istream::swap(rhs)} and +\tcode{basic_istream::swap(rhs)} and \tcode{\exposid{sb}.swap(rhs.\exposid{sb})}. \end{itemdescr} \indexlibrarymember{swap}{basic_ifstream}% \begin{itemdecl} -template - void swap(basic_ifstream& x, basic_ifstream& y); +template + void swap(basic_ifstream& x, basic_ifstream& y); \end{itemdecl} \begin{itemdescr} @@ -11952,13 +11952,13 @@ \indexlibrarymember{rdbuf}{basic_ifstream}% \begin{itemdecl} -basic_filebuf* rdbuf() const; +basic_filebuf* rdbuf() const; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{const_cast*>(addressof(\exposid{sb}))}. +\tcode{const_cast*>(addressof(\exposid{sb}))}. \end{itemdescr} \indexlibrarymember{native_handle}{basic_ifstream}% @@ -12040,15 +12040,15 @@ \indexlibraryglobal{basic_ofstream}% \begin{codeblock} namespace std { - template> - class basic_ofstream : public basic_ostream { + template> + class basic_ofstream : public basic_ostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; - using native_handle_type = typename basic_filebuf::native_handle_type; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; + using native_handle_type = typename basic_filebuf::native_handle_type; // \ref{ofstream.cons}, constructors basic_ofstream(); @@ -12070,7 +12070,7 @@ void swap(basic_ofstream& rhs); // \ref{ofstream.members}, members - basic_filebuf* rdbuf() const; + basic_filebuf* rdbuf() const; native_handle_type native_handle() const noexcept; bool is_open() const; @@ -12082,17 +12082,17 @@ void close(); private: - basic_filebuf @\exposid{sb}@; // \expos + basic_filebuf @\exposid{sb}@; // \expos }; } \end{codeblock} \pnum The class -\tcode{basic_ofstream} +\tcode{basic_ofstream} supports writing to named files. It uses a -\tcode{basic_filebuf<\brk{}charT, traits>} +\tcode{basic_filebuf<\brk{}CharT, Traits>} object to control the associated sequence. For the sake of exposition, the maintained data is presented here as: @@ -12112,9 +12112,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream.cons} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream.cons} and \exposid{sb} with -\tcode{basic_filebuf()}\iref{filebuf.cons}. +\tcode{basic_filebuf()}\iref{filebuf.cons}. \end{itemdescr} \indexlibraryctor{basic_ofstream}% @@ -12129,9 +12129,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream.cons} +\tcode{basic_ostream(addressof(\exposid{sb}))}\iref{ostream.cons} and \exposid{sb} with -\tcode{basic_filebuf()}\iref{filebuf.cons}, +\tcode{basic_filebuf()}\iref{filebuf.cons}, then calls \tcode{rdbuf()->open(s, mode | ios_base::out)}. If that function returns a null pointer, calls @@ -12175,7 +12175,7 @@ \pnum \effects Move constructs the base class, and the contained \tcode{basic_filebuf}. -Then calls \tcode{basic_ostream::set_rdbuf(\brk{}addressof(\exposid{sb}))} +Then calls \tcode{basic_ostream::set_rdbuf(\brk{}addressof(\exposid{sb}))} to install the contained \tcode{basic_filebuf}. \end{itemdescr} @@ -12191,14 +12191,14 @@ \effects Exchanges the state of \tcode{*this} and \tcode{rhs} by calling -\tcode{basic_ostream::swap(rhs)} and +\tcode{basic_ostream::swap(rhs)} and \tcode{\exposid{sb}.swap(rhs.\exposid{sb})}. \end{itemdescr} \indexlibrarymember{swap}{basic_ofstream}% \begin{itemdecl} -template - void swap(basic_ofstream& x, basic_ofstream& y); +template + void swap(basic_ofstream& x, basic_ofstream& y); \end{itemdecl} \begin{itemdescr} @@ -12211,13 +12211,13 @@ \indexlibrarymember{rdbuf}{basic_ofstream}% \begin{itemdecl} -basic_filebuf* rdbuf() const; +basic_filebuf* rdbuf() const; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{const_cast*>(addressof(\exposid{sb}))}. +\tcode{const_cast*>(addressof(\exposid{sb}))}. \end{itemdescr} \indexlibrarymember{native_handle}{basic_ofstream}% @@ -12297,15 +12297,15 @@ \indexlibraryglobal{basic_fstream}% \begin{codeblock} namespace std { - template> - class basic_fstream : public basic_iostream { + template> + class basic_fstream : public basic_iostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; - using native_handle_type = typename basic_filebuf::native_handle_type; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; + using native_handle_type = typename basic_filebuf::native_handle_type; // \ref{fstream.cons}, constructors basic_fstream(); @@ -12330,7 +12330,7 @@ void swap(basic_fstream& rhs); // \ref{fstream.members}, members - basic_filebuf* rdbuf() const; + basic_filebuf* rdbuf() const; native_handle_type native_handle() const noexcept; bool is_open() const; @@ -12349,7 +12349,7 @@ void close(); private: - basic_filebuf @\exposid{sb}@; // \expos + basic_filebuf @\exposid{sb}@; // \expos }; } \end{codeblock} @@ -12357,10 +12357,10 @@ \pnum The class template -\tcode{basic_fstream} +\tcode{basic_fstream} supports reading and writing from named files. It uses a -\tcode{basic_filebuf} +\tcode{basic_filebuf} object to control the associated sequences. For the sake of exposition, the maintained data is presented here as: \begin{itemize} @@ -12379,9 +12379,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and -\exposid{sb} with \tcode{basic_filebuf()}. +\exposid{sb} with \tcode{basic_filebuf()}. \end{itemdescr} \indexlibraryctor{basic_fstream}% @@ -12398,9 +12398,9 @@ \pnum \effects Initializes the base class with -\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} +\tcode{basic_iostream(addressof(\exposid{sb}))}\iref{iostream.cons} and -\exposid{sb} with \tcode{basic_filebuf()}. +\exposid{sb} with \tcode{basic_filebuf()}. Then calls \tcode{rdbuf()->open(s, mode)}. If that function returns a null pointer, calls @@ -12445,7 +12445,7 @@ \pnum \effects Move constructs the base class, and the contained \tcode{basic_filebuf}. -Then calls \tcode{basic_istream::set_rdbuf(\brk{}addressof(\exposid{sb}))} +Then calls \tcode{basic_istream::set_rdbuf(\brk{}addressof(\exposid{sb}))} to install the contained \tcode{basic_filebuf}. \end{itemdescr} @@ -12461,15 +12461,15 @@ \effects Exchanges the state of \tcode{*this} and \tcode{rhs} by calling -\tcode{basic_iostream::swap(rhs)} and +\tcode{basic_iostream::swap(rhs)} and \tcode{\exposid{sb}.swap(rhs.\exposid{sb})}. \end{itemdescr} \indexlibrarymember{swap}{basic_fstream}% \begin{itemdecl} -template - void swap(basic_fstream& x, - basic_fstream& y); +template + void swap(basic_fstream& x, + basic_fstream& y); \end{itemdecl} \begin{itemdescr} @@ -12482,13 +12482,13 @@ \indexlibrarymember{rdbuf}{basic_fstream}% \begin{itemdecl} -basic_filebuf* rdbuf() const; +basic_filebuf* rdbuf() const; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{const_cast*>(addressof(\exposid{sb}))}. +\tcode{const_cast*>(addressof(\exposid{sb}))}. \end{itemdescr} \indexlibrarymember{native_handle}{basic_fstream}% @@ -12583,19 +12583,19 @@ namespace std { // \ref{syncstream.syncbuf}, class template \tcode{basic_syncbuf} - template, class Allocator = allocator> + template, class Allocator = allocator> class basic_syncbuf; // \ref{syncstream.syncbuf.special}, specialized algorithms - template - void swap(basic_syncbuf&, - basic_syncbuf&); + template + void swap(basic_syncbuf&, + basic_syncbuf&); using syncbuf = basic_syncbuf; using wsyncbuf = basic_syncbuf; // \ref{syncstream.osyncstream}, class template \tcode{basic_osyncstream} - template, class Allocator = allocator> + template, class Allocator = allocator> class basic_osyncstream; using osyncstream = basic_osyncstream; @@ -12614,17 +12614,17 @@ \indexlibraryglobal{basic_syncbuf}% \begin{codeblock} namespace std { - template, class Allocator = allocator> - class basic_syncbuf : public basic_streambuf { + template, class Allocator = allocator> + class basic_syncbuf : public basic_streambuf { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; using allocator_type = Allocator; - using streambuf_type = basic_streambuf; + using streambuf_type = basic_streambuf; // \ref{syncstream.syncbuf.cons}, construction and destruction basic_syncbuf() @@ -12909,9 +12909,9 @@ \indexlibrarymember{swap}{basic_syncbuf}% \begin{itemdecl} -template - void swap(basic_syncbuf& a, - basic_syncbuf& b); +template + void swap(basic_syncbuf& a, + basic_syncbuf& b); \end{itemdecl} \begin{itemdescr} @@ -12927,26 +12927,26 @@ \indexlibraryglobal{basic_osyncstream}% \begin{codeblock} namespace std { - template, class Allocator = allocator> - class basic_osyncstream : public basic_ostream { + template, class Allocator = allocator> + class basic_osyncstream : public basic_ostream { public: - using char_type = charT; - using int_type = typename traits::int_type; - using pos_type = typename traits::pos_type; - using off_type = typename traits::off_type; - using traits_type = traits; + using char_type = CharT; + using int_type = typename Traits::int_type; + using pos_type = typename Traits::pos_type; + using off_type = typename Traits::off_type; + using traits_type = Traits; using allocator_type = Allocator; - using streambuf_type = basic_streambuf; - using syncbuf_type = basic_syncbuf; + using streambuf_type = basic_streambuf; + using syncbuf_type = basic_syncbuf; // \ref{syncstream.osyncstream.cons}, construction and destruction basic_osyncstream(streambuf_type*, const Allocator&); explicit basic_osyncstream(streambuf_type* obuf) : basic_osyncstream(obuf, Allocator()) {} - basic_osyncstream(basic_ostream& os, const Allocator& allocator) + basic_osyncstream(basic_ostream& os, const Allocator& allocator) : basic_osyncstream(os.rdbuf(), allocator) {} - explicit basic_osyncstream(basic_ostream& os) + explicit basic_osyncstream(basic_ostream& os) : basic_osyncstream(os, Allocator()) {} basic_osyncstream(basic_osyncstream&&) noexcept; ~basic_osyncstream(); @@ -13003,7 +13003,7 @@ \pnum \effects Initializes \exposid{sb} from \tcode{buf} and \tcode{allocator}. -Initializes the base class with \tcode{basic_ostream(addressof(\exposid{sb}))}. +Initializes the base class with \tcode{basic_ostream(addressof(\exposid{sb}))}. \pnum \begin{note} @@ -13027,7 +13027,7 @@ \effects Move constructs the base class and \exposid{sb} from the corresponding subobjects of \tcode{other}, -and calls \tcode{basic_ostream::set_rdbuf(addressof(\exposid{sb}))}. +and calls \tcode{basic_ostream::set_rdbuf(addressof(\exposid{sb}))}. \pnum \ensures @@ -13481,7 +13481,7 @@ namespace std { // \ref{fs.path.fmtr}, formatting support - template struct formatter; + template struct formatter; // \ref{fs.path.hash}, hash support template struct hash; @@ -13703,9 +13703,9 @@ const value_type* c_str() const noexcept; operator string_type() const; - template, + template, class Allocator = allocator> - basic_string + basic_string string(const Allocator& a = Allocator()) const; std::string string() const; std::wstring wstring() const; @@ -13714,9 +13714,9 @@ std::u32string u32string() const; // \ref{fs.path.generic.obs}, generic format observers - template, + template, class Allocator = allocator> - basic_string + basic_string generic_string(const Allocator& a = Allocator()) const; std::string generic_string() const; std::wstring generic_wstring() const; @@ -13766,12 +13766,12 @@ iterator end() const; // \ref{fs.path.io}, \tcode{path} inserter and extractor - template - friend basic_ostream& - operator<<(basic_ostream& os, const path& p); - template - friend basic_istream& - operator>>(basic_istream& is, path& p); + template + friend basic_ostream& + operator<<(basic_ostream& os, const path& p); + template + friend basic_istream& + operator>>(basic_istream& is, path& p); }; } \end{codeblock} @@ -14082,10 +14082,10 @@ function template parameters named \tcode{Source} shall be one of: \begin{itemize} -\item \tcode{basic_string}. A function +\item \tcode{basic_string}. A function argument \tcode{const Source\&} \tcode{source} shall have an effective range \range{source.begin()}{source.end()}. -\item \tcode{basic_string_view}. A function +\item \tcode{basic_string_view}. A function argument \tcode{const Source\&} \tcode{source} shall have an effective range \range{source.begin()}{source.end()}. \item A type meeting the \oldconcept{InputIterator} requirements that iterates over an NTCTS\@. @@ -14671,9 +14671,9 @@ \indexlibrarymember{string}{path}% \begin{itemdecl} -template, +template, class Allocator = allocator> - basic_string + basic_string string(const Allocator& a = Allocator()) const; \end{itemdecl} @@ -14734,9 +14734,9 @@ \indexlibrarymember{generic_string}{path}% \begin{itemdecl} -template, +template, class Allocator = allocator> - basic_string + basic_string generic_string(const Allocator& a = Allocator()) const; \end{itemdecl} @@ -15323,15 +15323,15 @@ \indexlibrarymember{operator<<}{path}% \begin{itemdecl} -template - friend basic_ostream& - operator<<(basic_ostream& os, const path& p); +template + friend basic_ostream& + operator<<(basic_ostream& os, const path& p); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to \tcode{os << quoted(p.string())}. +Equivalent to \tcode{os << quoted(p.string())}. \begin{note} The \tcode{quoted} function is described in~\ref{quoted.manip}. \end{note} @@ -15343,9 +15343,9 @@ \indexlibrarymember{operator>>}{path}% \begin{itemdecl} -template - friend basic_istream& - operator>>(basic_istream& is, path& p); +template + friend basic_istream& + operator>>(basic_istream& is, path& p); \end{itemdecl} \begin{itemdescr} @@ -15353,7 +15353,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string tmp; +basic_string tmp; is >> quoted(tmp); p = tmp; \end{codeblock} @@ -15446,11 +15446,11 @@ \indexlibraryglobal{formatter}% \begin{codeblock} namespace std { - template struct formatter { + template struct formatter { constexpr void set_debug_format(); - constexpr typename basic_format_parse_context::iterator - parse(basic_format_parse_context& ctx); + constexpr typename basic_format_parse_context::iterator + parse(basic_format_parse_context& ctx); template typename FormatContext::iterator @@ -15487,8 +15487,8 @@ \indexlibrarymember{formatter}{basic_format_parse_context}% \begin{itemdecl} -constexpr typename basic_format_parse_context::iterator - parse(basic_format_parse_context& ctx); +constexpr typename basic_format_parse_context::iterator + parse(basic_format_parse_context& ctx); \end{itemdecl} \begin{itemdescr} @@ -15517,7 +15517,7 @@ otherwise \tcode{p.native()}. Writes \tcode{s} into \tcode{ctx.out()}, adjusted according to the \fmtgrammarterm{path-format-spec}. -If \tcode{charT} is \keyword{char}, +If \tcode{CharT} is \keyword{char}, \tcode{path::value_type} is \keyword{wchar_t}, and the literal encoding is UTF-8, then the escaped path is transcoded from the native encoding for @@ -15525,10 +15525,10 @@ maximal subparts of ill-formed subsequences substituted with \ucode{fffd} \uname{replacement character} per the Unicode Standard, Chapter 3.9 \ucode{fffd} Substitution in Conversion. -If \tcode{charT} and \tcode{path::value_type} are the same +If \tcode{CharT} and \tcode{path::value_type} are the same then no transcoding is performed. Otherwise, transcoding is -\impldef{transcoding of a formatted path when \tcode{charT} and \tcode{path::value_type} differ}. +\impldef{transcoding of a formatted path when \tcode{CharT} and \tcode{path::value_type} differ}. \pnum \returns @@ -16079,9 +16079,9 @@ strong_ordering operator<=>(const directory_entry& rhs) const noexcept; // \ref{fs.dir.entry.io}, inserter - template - friend basic_ostream& - operator<<(basic_ostream& os, const directory_entry& d); + template + friend basic_ostream& + operator<<(basic_ostream& os, const directory_entry& d); private: filesystem::path @\exposid{path-object}@; // \expos @@ -16502,9 +16502,9 @@ \indexlibrarymember{operator<<}{directory_entry}% \begin{itemdecl} -template - friend basic_ostream& - operator<<(basic_ostream& os, const directory_entry& d); +template + friend basic_ostream& + operator<<(basic_ostream& os, const directory_entry& d); \end{itemdecl} \begin{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index 4cf779c363..3731c5b410 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -447,23 +447,23 @@ inline constexpr unreachable_sentinel_t @\libglobal{unreachable_sentinel}@{}; // freestanding // \ref{stream.iterators}, stream iterators - template, + template, class Distance = ptrdiff_t> class istream_iterator; - template - bool operator==(const istream_iterator& x, - const istream_iterator& y); + template + bool operator==(const istream_iterator& x, + const istream_iterator& y); - template> + template> class ostream_iterator; - template> + template> class istreambuf_iterator; - template - bool operator==(const istreambuf_iterator& a, - const istreambuf_iterator& b); + template + bool operator==(const istreambuf_iterator& a, + const istreambuf_iterator& b); - template> + template> class ostreambuf_iterator; // \ref{iterator.range}, range access @@ -6517,7 +6517,7 @@ \begin{codeblock} namespace std { - template, + template, class Distance = ptrdiff_t> class istream_iterator { public: @@ -6526,9 +6526,9 @@ using difference_type = Distance; using pointer = const T*; using reference = const T&; - using char_type = charT; - using traits_type = traits; - using istream_type = basic_istream; + using char_type = CharT; + using traits_type = Traits; + using istream_type = basic_istream; constexpr istream_iterator(); constexpr istream_iterator(default_sentinel_t); @@ -6545,7 +6545,7 @@ friend bool operator==(const istream_iterator& i, default_sentinel_t); private: - basic_istream* in_stream; // \expos + basic_istream* in_stream; // \expos T value; // \expos }; } @@ -6703,9 +6703,9 @@ \indexlibrarymember{operator==}{istream_iterator}% \begin{itemdecl} -template - bool operator==(const istream_iterator& x, - const istream_iterator& y); +template + bool operator==(const istream_iterator& x, + const istream_iterator& y); \end{itemdecl} \begin{itemdescr} @@ -6736,7 +6736,7 @@ \tcode{operator<<}) successive elements onto the output stream from which it was constructed. If it was constructed with -\tcode{charT*} +\tcode{CharT*} as a constructor argument, this string, called a \term{delimiter string}, is written to the stream after every @@ -6745,7 +6745,7 @@ \begin{codeblock} namespace std { - template> + template> class ostream_iterator { public: using iterator_category = output_iterator_tag; @@ -6753,12 +6753,12 @@ using difference_type = ptrdiff_t; using pointer = void; using reference = void; - using char_type = charT; - using traits_type = traits; - using ostream_type = basic_ostream; + using char_type = CharT; + using traits_type = Traits; + using ostream_type = basic_ostream; ostream_iterator(ostream_type& s); - ostream_iterator(ostream_type& s, const charT* delimiter); + ostream_iterator(ostream_type& s, const CharT* delimiter); ostream_iterator(const ostream_iterator& x); ~ostream_iterator(); ostream_iterator& operator=(const ostream_iterator&) = default; @@ -6769,8 +6769,8 @@ ostream_iterator& operator++(int); private: - basic_ostream* out_stream; // \expos - const charT* delim; // \expos + basic_ostream* out_stream; // \expos + const CharT* delim; // \expos }; } \end{codeblock} @@ -6792,7 +6792,7 @@ \indexlibraryctor{ostream_iterator}% \begin{itemdecl} -ostream_iterator(ostream_type& s, const charT* delimiter); +ostream_iterator(ostream_type& s, const CharT* delimiter); \end{itemdecl} \begin{itemdescr} @@ -6862,7 +6862,7 @@ \tcode{operator++} is evaluated, the iterator advances to the next input character. If the end of stream is reached (\tcode{streambuf_type::sgetc()} returns -\tcode{traits::eof()}), +\tcode{Traits::eof()}), the iterator becomes equal to the \term{end-of-stream} iterator value. @@ -6888,19 +6888,19 @@ \indexlibraryglobal{istreambuf_iterator}% \begin{codeblock} namespace std { - template> + template> class istreambuf_iterator { public: using iterator_category = input_iterator_tag; - using value_type = charT; - using difference_type = typename traits::off_type; + using value_type = CharT; + using difference_type = typename Traits::off_type; using pointer = @\unspec@; - using reference = charT; - using char_type = charT; - using traits_type = traits; - using int_type = typename traits::int_type; - using streambuf_type = basic_streambuf; - using istream_type = basic_istream; + using reference = CharT; + using char_type = CharT; + using traits_type = Traits; + using int_type = typename Traits::int_type; + using streambuf_type = basic_streambuf; + using istream_type = basic_istream; // \ref{istreambuf.iterator.proxy}, class \tcode{istreambuf_iterator::\exposid{proxy}} class @\placeholder{proxy}@; // \expos @@ -6913,7 +6913,7 @@ istreambuf_iterator(streambuf_type* s) noexcept; istreambuf_iterator(const @\placeholder{proxy}@& p) noexcept; istreambuf_iterator& operator=(const istreambuf_iterator&) noexcept = default; - charT operator*() const; + CharT operator*() const; istreambuf_iterator& operator++(); @\placeholder{proxy}@ operator++(int); bool equal(const istreambuf_iterator& b) const; @@ -6930,12 +6930,12 @@ \pnum Class -\tcode{istreambuf_iterator::\placeholder{proxy}} +\tcode{istreambuf_iterator::\placeholder{proxy}} is for exposition only. An implementation is permitted to provide equivalent functionality without providing a class with this name. Class -\tcode{istreambuf_iterator::\placeholder{proxy}} +\tcode{istreambuf_iterator::\placeholder{proxy}} provides a temporary placeholder as the return value of the post-increment operator (\tcode{operator++}). @@ -6945,14 +6945,14 @@ \indexlibrarymember{proxy}{istreambuf_iterator}% \begin{codeblock} namespace std { - template - class istreambuf_iterator::@\placeholder{proxy}@ { // \expos - charT keep_; - basic_streambuf* sbuf_; - @\placeholder{proxy}@(charT c, basic_streambuf* sbuf) + template + class istreambuf_iterator::@\placeholder{proxy}@ { // \expos + CharT keep_; + basic_streambuf* sbuf_; + @\placeholder{proxy}@(CharT c, basic_streambuf* sbuf) : keep_(c), sbuf_(sbuf) { } public: - charT operator*() { return keep_; } + CharT operator*() { return keep_; } }; } \end{codeblock} @@ -7017,7 +7017,7 @@ \indexlibrarymember{operator*}{istreambuf_iterator}% \begin{itemdecl} -charT operator*() const; +CharT operator*() const; \end{itemdecl} \begin{itemdescr} @@ -7072,9 +7072,9 @@ \indexlibrarymember{operator==}{istreambuf_iterator}% \begin{itemdecl} -template - bool operator==(const istreambuf_iterator& a, - const istreambuf_iterator& b); +template + bool operator==(const istreambuf_iterator& a, + const istreambuf_iterator& b); \end{itemdecl} \begin{itemdescr} @@ -7106,7 +7106,7 @@ \indexlibraryglobal{ostreambuf_iterator}% \begin{codeblock} namespace std { - template> + template> class ostreambuf_iterator { public: using iterator_category = output_iterator_tag; @@ -7114,14 +7114,14 @@ using difference_type = ptrdiff_t; using pointer = void; using reference = void; - using char_type = charT; - using traits_type = traits; - using streambuf_type = basic_streambuf; - using ostream_type = basic_ostream; + using char_type = CharT; + using traits_type = Traits; + using streambuf_type = basic_streambuf; + using ostream_type = basic_ostream; ostreambuf_iterator(ostream_type& s) noexcept; ostreambuf_iterator(streambuf_type* s) noexcept; - ostreambuf_iterator& operator=(charT c); + ostreambuf_iterator& operator=(CharT c); ostreambuf_iterator& operator*(); ostreambuf_iterator& operator++(); @@ -7173,7 +7173,7 @@ \indexlibrarymember{operator=}{ostreambuf_iterator}% \begin{itemdecl} -ostreambuf_iterator& operator=(charT c); +ostreambuf_iterator& operator=(CharT c); \end{itemdecl} \begin{itemdescr} @@ -7229,7 +7229,7 @@ the call to \tcode{sbuf_->sputc()} returned -\tcode{traits::eof()}; +\tcode{Traits::eof()}; or \tcode{false} otherwise. diff --git a/source/numerics.tex b/source/numerics.tex index 983a2d1bb6..d9104f1480 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -237,11 +237,11 @@ template constexpr bool operator==(const complex&, const complex&); template constexpr bool operator==(const complex&, const T&); - template - basic_istream& operator>>(basic_istream&, complex&); + template + basic_istream& operator>>(basic_istream&, complex&); - template - basic_ostream& operator<<(basic_ostream&, const complex&); + template + basic_ostream& operator<<(basic_ostream&, const complex&); // \ref{complex.value.ops}, values template constexpr T real(const complex&); @@ -692,8 +692,8 @@ \indexlibrarymember{operator>>}{complex}% \begin{itemdecl} -template - basic_istream& operator>>(basic_istream& is, complex& x); +template + basic_istream& operator>>(basic_istream& is, complex& x); \end{itemdecl} \begin{itemdescr} @@ -735,8 +735,8 @@ \indexlibrarymember{operator<<}{complex}% \begin{itemdecl} -template - basic_ostream& operator<<(basic_ostream& o, const complex& x); +template + basic_ostream& operator<<(basic_ostream& o, const complex& x); \end{itemdecl} \begin{itemdescr} @@ -746,7 +746,7 @@ onto the stream \tcode{o} as if it were implemented as follows: \begin{codeblock} -basic_ostringstream s; +basic_ostringstream s; s.flags(o.flags()); s.imbue(o.getloc()); s.precision(o.precision()); @@ -1895,13 +1895,13 @@ of type \tcode{unsigned long long}; \item \tcode{os} is an lvalue of the type of some class template specialization - \tcode{basic_ostream}; + \tcode{basic_ostream}; and \item \tcode{is} is an lvalue of the type of some class template specialization - \tcode{basic_istream}; + \tcode{basic_istream}; \end{itemize} -where \tcode{charT} and \tcode{traits} are constrained +where \tcode{CharT} and \tcode{Traits} are constrained according to \ref{strings} and \ref{input.output}. \begin{libreqtab4d} @@ -2082,7 +2082,7 @@ whose imbued locale was the same as that of \tcode{is}, and whose type's template specialization arguments -\tcode{charT} and \tcode{traits} +\tcode{CharT} and \tcode{Traits} were respectively the same as those of \tcode{is}. \pnum @@ -2326,13 +2326,13 @@ of a uniform random bit generator\iref{rand.req.urng}; \item \tcode{os} is an lvalue of the type of some class template specialization - \tcode{basic_ostream}; + \tcode{basic_ostream}; and \item \tcode{is} is an lvalue of the type of some class template specialization - \tcode{basic_istream}; + \tcode{basic_istream}; \end{itemize} -where \tcode{charT} and \tcode{traits} are constrained +where \tcode{CharT} and \tcode{Traits} are constrained according to \ref{strings} and \ref{input.output}. \begin{libreqtab4d} @@ -2548,7 +2548,7 @@ that was previously written using an \tcode{os} whose imbued locale and whose type's template specialization arguments -\tcode{charT} and \tcode{traits} +\tcode{CharT} and \tcode{Traits} were the same as those of \tcode{is}. \pnum @@ -2715,13 +2715,13 @@ void discard(unsigned long long z); // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, // hosted + template + friend basic_ostream& + operator<<(basic_ostream& os, // hosted const linear_congruential_engine& x); - template - friend basic_istream& - operator>>(basic_istream& is, // hosted + template + friend basic_istream& + operator>>(basic_istream& is, // hosted linear_congruential_engine& x); }; } @@ -2897,13 +2897,13 @@ void discard(unsigned long long z); // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, // hosted + template + friend basic_ostream& + operator<<(basic_ostream& os, // hosted const mersenne_twister_engine& x); - template - friend basic_istream& - operator>>(basic_istream& is, // hosted + template + friend basic_istream& + operator>>(basic_istream& is, // hosted mersenne_twister_engine& x); }; } @@ -3065,13 +3065,13 @@ void discard(unsigned long long z); // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, // hosted + template + friend basic_ostream& + operator<<(basic_ostream& os, // hosted const subtract_with_carry_engine& x); - template - friend basic_istream& - operator>>(basic_istream& is, // hosted + template + friend basic_istream& + operator>>(basic_istream& is, // hosted subtract_with_carry_engine& x); }; } @@ -3301,12 +3301,12 @@ void discard(unsigned long long z); // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const philox_engine& x); - template - friend basic_istream& - operator>>(basic_istream& is, philox_engine& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const philox_engine& x); + template + friend basic_istream& + operator>>(basic_istream& is, philox_engine& x); }; } \end{codeblock} @@ -3507,12 +3507,12 @@ const Engine& base() const noexcept { return e; } // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const discard_block_engine& x); // hosted - template - friend basic_istream& - operator>>(basic_istream& is, discard_block_engine& x); // hosted + template + friend basic_ostream& + operator<<(basic_ostream& os, const discard_block_engine& x); // hosted + template + friend basic_istream& + operator>>(basic_istream& is, discard_block_engine& x); // hosted private: Engine e; // \expos @@ -3656,12 +3656,12 @@ const Engine& base() const noexcept { return e; } // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const independent_bits_engine& x); // hosted - template - friend basic_istream& - operator>>(basic_istream& is, independent_bits_engine& x); // hosted + template + friend basic_ostream& + operator<<(basic_ostream& os, const independent_bits_engine& x); // hosted + template + friend basic_istream& + operator>>(basic_istream& is, independent_bits_engine& x); // hosted private: Engine e; // \expos @@ -3759,12 +3759,12 @@ const Engine& base() const noexcept { return e; } // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const shuffle_order_engine& x); - template - friend basic_istream& - operator>>(basic_istream& is, shuffle_order_engine& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const shuffle_order_engine& x); + template + friend basic_istream& + operator>>(basic_istream& is, shuffle_order_engine& x); private: Engine e; // \expos @@ -4577,13 +4577,13 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, // hosted + template + friend basic_ostream& + operator<<(basic_ostream& os, // hosted const uniform_int_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, // hosted + template + friend basic_istream& + operator>>(basic_istream& is, // hosted uniform_int_distribution& x); }; } @@ -4685,12 +4685,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const uniform_real_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, uniform_real_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const uniform_real_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, uniform_real_distribution& x); }; } \end{codeblock} @@ -4802,12 +4802,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const bernoulli_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, bernoulli_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const bernoulli_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, bernoulli_distribution& x); }; } \end{codeblock} @@ -4892,12 +4892,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const binomial_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, binomial_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const binomial_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, binomial_distribution& x); }; } \end{codeblock} @@ -4991,12 +4991,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const geometric_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, geometric_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const geometric_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, geometric_distribution& x); }; } \end{codeblock} @@ -5085,12 +5085,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const negative_binomial_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, negative_binomial_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const negative_binomial_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, negative_binomial_distribution& x); }; } \end{codeblock} @@ -5201,12 +5201,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const poisson_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, poisson_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const poisson_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, poisson_distribution& x); }; } \end{codeblock} @@ -5287,12 +5287,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const exponential_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, exponential_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const exponential_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, exponential_distribution& x); }; } \end{codeblock} @@ -5376,12 +5376,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const gamma_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, gamma_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const gamma_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, gamma_distribution& x); }; } \end{codeblock} @@ -5480,12 +5480,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const weibull_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, weibull_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const weibull_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, weibull_distribution& x); }; } \end{codeblock} @@ -5593,12 +5593,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const extreme_value_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, extreme_value_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const extreme_value_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, extreme_value_distribution& x); }; } \end{codeblock} @@ -5717,12 +5717,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const normal_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, normal_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const normal_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, normal_distribution& x); }; } \end{codeblock} @@ -5820,12 +5820,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const lognormal_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, lognormal_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const lognormal_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, lognormal_distribution& x); }; } \end{codeblock} @@ -5921,12 +5921,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const chi_squared_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, chi_squared_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const chi_squared_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, chi_squared_distribution& x); }; } \end{codeblock} @@ -6010,12 +6010,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const cauchy_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, cauchy_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const cauchy_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, cauchy_distribution& x); }; } \end{codeblock} @@ -6115,12 +6115,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const fisher_f_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, fisher_f_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const fisher_f_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, fisher_f_distribution& x); }; } \end{codeblock} @@ -6218,12 +6218,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const student_t_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, student_t_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const student_t_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, student_t_distribution& x); }; } \end{codeblock} @@ -6334,12 +6334,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const discrete_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, discrete_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const discrete_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, discrete_distribution& x); }; } \end{codeblock} @@ -6525,12 +6525,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const piecewise_constant_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, piecewise_constant_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const piecewise_constant_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, piecewise_constant_distribution& x); }; } \end{codeblock} @@ -6762,12 +6762,12 @@ result_type max() const; // inserters and extractors - template - friend basic_ostream& - operator<<(basic_ostream& os, const piecewise_linear_distribution& x); - template - friend basic_istream& - operator>>(basic_istream& is, piecewise_linear_distribution& x); + template + friend basic_ostream& + operator<<(basic_ostream& os, const piecewise_linear_distribution& x); + template + friend basic_istream& + operator>>(basic_istream& is, piecewise_linear_distribution& x); }; } \end{codeblock} diff --git a/source/strings.tex b/source/strings.tex index a9615c7d91..d321426dd5 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -33,7 +33,7 @@ Subclause \ref{char.traits} defines requirements on classes representing \term{character traits}, and defines a class template -\tcode{char_traits}, +\tcode{char_traits}, along with five specializations, \tcode{char_traits}, \tcode{char_traits}, @@ -48,7 +48,7 @@ and \ref{input.output} need a set of related types and functions to complete the definition of their semantics. These types and functions are provided as a set of member \grammarterm{typedef-name}{s} and functions in the template -parameter \tcode{traits} used by each such template. +parameter \tcode{Traits} used by each such template. Subclause \ref{char.traits} defines the semantics of these members. \pnum @@ -59,9 +59,9 @@ \tcode{X} are passed as a pair of parameters to the string, string view, or iostream template as parameters -\tcode{charT} +\tcode{CharT} and -\tcode{traits}. +\tcode{Traits}. If \tcode{X::char_type} is not the same type as @@ -146,7 +146,7 @@ \tcode{X::eq(p[i],q[i])} is \tcode{true}; else a positive value. & linear \\ \rowsep \tcode{X::length(p)} & \tcode{size_t} & \returns -the smallest \tcode{i} such that \tcode{X::eq(p[i],charT())} is \tcode{true}. & linear \\ \rowsep +the smallest \tcode{i} such that \tcode{X::eq(p[i],CharT())} is \tcode{true}. & linear \\ \rowsep \tcode{X::find(p,n,c)} & \tcode{const X::char_type*} & \returns the smallest \tcode{q} in \range{p}{p+n} such that @@ -198,7 +198,7 @@ The class template \indexlibraryglobal{char_traits}% \begin{codeblock} -template struct char_traits; +template struct char_traits; \end{codeblock} is provided in the header \libheaderref{string} as a basis for explicit specializations. @@ -520,12 +520,12 @@ \pnum The class template \tcode{basic_string_view} describes an object that can refer to a constant contiguous sequence of char-like\iref{strings.general} objects with the first element of the sequence at position zero. -In the rest of \ref{string.view}, the type of the char-like objects held in a \tcode{basic_string_view} object is designated by \tcode{charT}. +In the rest of \ref{string.view}, the type of the char-like objects held in a \tcode{basic_string_view} object is designated by \tcode{CharT}. \pnum \begin{note} -The library provides implicit conversions from \tcode{const charT*} and \tcode{std::basic_string} to \tcode{std::basic_string_view} so that user code can accept just \tcode{std::basic_string_view} as a non-templated parameter wherever a sequence of characters is expected. -User-defined types can define their own implicit conversions to \tcode{std::basic_string_view} in order to interoperate with these functions. +The library provides implicit conversions from \tcode{const CharT*} and \tcode{std::basic_string} to \tcode{std::basic_string_view} so that user code can accept just \tcode{std::basic_string_view} as a non-templated parameter wherever a sequence of characters is expected. +User-defined types can define their own implicit conversions to \tcode{std::basic_string_view} in order to interoperate with these functions. \end{note} \rSec2[string.view.synop]{Header \tcode{} synopsis} @@ -537,28 +537,28 @@ namespace std { // \ref{string.view.template}, class template \tcode{basic_string_view} - template> + template> class basic_string_view; // partially freestanding - template - constexpr bool ranges::@\libspec{enable_view}{basic_string_view}@> = true; - template - constexpr bool ranges::@\libspec{enable_borrowed_range}{basic_string_view}@> = true; + template + constexpr bool ranges::@\libspec{enable_view}{basic_string_view}@> = true; + template + constexpr bool ranges::@\libspec{enable_borrowed_range}{basic_string_view}@> = true; // \ref{string.view.comparison}, non-member comparison functions - template - constexpr bool operator==(basic_string_view x, - type_identity_t> y) noexcept; - template - constexpr @\seebelow@ operator<=>(basic_string_view x, - @\itcorr@ type_identity_t> y) noexcept; + template + constexpr bool operator==(basic_string_view x, + type_identity_t> y) noexcept; + template + constexpr @\seebelow@ operator<=>(basic_string_view x, + @\itcorr@ type_identity_t> y) noexcept; // \ref{string.view.io}, inserters and extractors - template - basic_ostream& - operator<<(basic_ostream& os, - basic_string_view str); // hosted + template + basic_ostream& + operator<<(basic_ostream& os, + basic_string_view str); // hosted // \tcode{basic_string_view} \grammarterm{typedef-name}s using string_view = basic_string_view; @@ -611,12 +611,12 @@ \indexlibrarymember{difference_type}{basic_string_view}% \begin{codeblock} namespace std { - template> + template> class basic_string_view { public: // types - using traits_type = traits; - using value_type = charT; + using traits_type = Traits; + using value_type = CharT; using pointer = value_type*; using const_pointer = const value_type*; using reference = value_type&; @@ -636,9 +636,9 @@ constexpr basic_string_view() noexcept; constexpr basic_string_view(const basic_string_view&) noexcept = default; constexpr basic_string_view& operator=(const basic_string_view&) noexcept = default; - constexpr basic_string_view(const charT* str); + constexpr basic_string_view(const CharT* str); basic_string_view(nullptr_t) = delete; - constexpr basic_string_view(const charT* str, size_type len); + constexpr basic_string_view(const CharT* str, size_type len); template constexpr basic_string_view(It begin, End end); template @@ -673,7 +673,7 @@ constexpr void swap(basic_string_view& s) noexcept; // \ref{string.view.ops}, string operations - constexpr size_type copy(charT* s, size_type n, + constexpr size_type copy(CharT* s, size_type n, size_type pos = 0) const; // freestanding-deleted constexpr basic_string_view substr(size_type pos = 0, @@ -684,52 +684,52 @@ basic_string_view s) const; // freestanding-deleted constexpr int compare(size_type pos1, size_type n1, basic_string_view s, size_type pos2, size_type n2) const; // freestanding-deleted - constexpr int compare(const charT* s) const; + constexpr int compare(const CharT* s) const; constexpr int compare(size_type pos1, size_type n1, - const charT* s) const; // freestanding-deleted - constexpr int compare(size_type pos1, size_type n1, const charT* s, + const CharT* s) const; // freestanding-deleted + constexpr int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const; // freestanding-deleted constexpr bool starts_with(basic_string_view x) const noexcept; - constexpr bool starts_with(charT x) const noexcept; - constexpr bool starts_with(const charT* x) const; + constexpr bool starts_with(CharT x) const noexcept; + constexpr bool starts_with(const CharT* x) const; constexpr bool ends_with(basic_string_view x) const noexcept; - constexpr bool ends_with(charT x) const noexcept; - constexpr bool ends_with(const charT* x) const; + constexpr bool ends_with(CharT x) const noexcept; + constexpr bool ends_with(const CharT* x) const; constexpr bool contains(basic_string_view x) const noexcept; - constexpr bool contains(charT x) const noexcept; - constexpr bool contains(const charT* x) const; + constexpr bool contains(CharT x) const noexcept; + constexpr bool contains(const CharT* x) const; // \ref{string.view.find}, searching constexpr size_type find(basic_string_view s, size_type pos = 0) const noexcept; - constexpr size_type find(charT c, size_type pos = 0) const noexcept; - constexpr size_type find(const charT* s, size_type pos, size_type n) const; - constexpr size_type find(const charT* s, size_type pos = 0) const; + constexpr size_type find(CharT c, size_type pos = 0) const noexcept; + constexpr size_type find(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find(const CharT* s, size_type pos = 0) const; constexpr size_type rfind(basic_string_view s, size_type pos = npos) const noexcept; - constexpr size_type rfind(charT c, size_type pos = npos) const noexcept; - constexpr size_type rfind(const charT* s, size_type pos, size_type n) const; - constexpr size_type rfind(const charT* s, size_type pos = npos) const; + constexpr size_type rfind(CharT c, size_type pos = npos) const noexcept; + constexpr size_type rfind(const CharT* s, size_type pos, size_type n) const; + constexpr size_type rfind(const CharT* s, size_type pos = npos) const; constexpr size_type find_first_of(basic_string_view s, size_type pos = 0) const noexcept; - constexpr size_type find_first_of(charT c, size_type pos = 0) const noexcept; - constexpr size_type find_first_of(const charT* s, size_type pos, size_type n) const; - constexpr size_type find_first_of(const charT* s, size_type pos = 0) const; + constexpr size_type find_first_of(CharT c, size_type pos = 0) const noexcept; + constexpr size_type find_first_of(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find_first_of(const CharT* s, size_type pos = 0) const; constexpr size_type find_last_of(basic_string_view s, size_type pos = npos) const noexcept; - constexpr size_type find_last_of(charT c, size_type pos = npos) const noexcept; - constexpr size_type find_last_of(const charT* s, size_type pos, size_type n) const; - constexpr size_type find_last_of(const charT* s, size_type pos = npos) const; + constexpr size_type find_last_of(CharT c, size_type pos = npos) const noexcept; + constexpr size_type find_last_of(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find_last_of(const CharT* s, size_type pos = npos) const; constexpr size_type find_first_not_of(basic_string_view s, size_type pos = 0) const noexcept; - constexpr size_type find_first_not_of(charT c, size_type pos = 0) const noexcept; - constexpr size_type find_first_not_of(const charT* s, size_type pos, + constexpr size_type find_first_not_of(CharT c, size_type pos = 0) const noexcept; + constexpr size_type find_first_not_of(const CharT* s, size_type pos, size_type n) const; - constexpr size_type find_first_not_of(const charT* s, size_type pos = 0) const; + constexpr size_type find_first_not_of(const CharT* s, size_type pos = 0) const; constexpr size_type find_last_not_of(basic_string_view s, size_type pos = npos) const noexcept; - constexpr size_type find_last_not_of(charT c, size_type pos = npos) const noexcept; - constexpr size_type find_last_not_of(const charT* s, size_type pos, + constexpr size_type find_last_not_of(CharT c, size_type pos = npos) const noexcept; + constexpr size_type find_last_not_of(const CharT* s, size_type pos, size_type n) const; - constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const; + constexpr size_type find_last_not_of(const CharT* s, size_type pos = npos) const; private: const_pointer data_; // \expos @@ -745,9 +745,9 @@ \end{codeblock} \pnum -In every specialization \tcode{basic_string_view}, the type \tcode{traits} shall meet the character traits requirements\iref{char.traits}. +In every specialization \tcode{basic_string_view}, the type \tcode{Traits} shall meet the character traits requirements\iref{char.traits}. \begin{note} -The program is ill-formed if \tcode{traits::char_type} is not the same type as \tcode{charT}. +The program is ill-formed if \tcode{Traits::char_type} is not the same type as \tcode{CharT}. \end{note} \pnum @@ -765,7 +765,7 @@ unless otherwise specified. \pnum -\tcode{basic_string_view} is +\tcode{basic_string_view} is a trivially copyable type\iref{term.trivially.copyable.type}. \rSec3[string.view.cons]{Construction and assignment} @@ -783,27 +783,27 @@ \indexlibraryctor{basic_string_view}% \begin{itemdecl} -constexpr basic_string_view(const charT* str); +constexpr basic_string_view(const CharT* str); \end{itemdecl} \begin{itemdescr} \pnum \expects -\range{str}{str + traits::length(str)} is a valid range. +\range{str}{str + Traits::length(str)} is a valid range. \pnum \effects Constructs a \tcode{basic_string_view}, initializing \tcode{data_} with \tcode{str} -and initializing \tcode{size_} with \tcode{traits::length(str)}. +and initializing \tcode{size_} with \tcode{Traits::length(str)}. \pnum \complexity -\bigoh{\tcode{traits::length(str)}}. +\bigoh{\tcode{Traits::length(str)}}. \end{itemdescr} \indexlibraryctor{basic_string_view}% \begin{itemdecl} -constexpr basic_string_view(const charT* str, size_type len); +constexpr basic_string_view(const CharT* str, size_type len); \end{itemdecl} \begin{itemdescr} @@ -829,7 +829,7 @@ \begin{itemize} \item \tcode{It} satisfies \libconcept{contiguous_iterator}. \item \tcode{End} satisfies \tcode{\libconcept{sized_sentinel_for}}. -\item \tcode{is_same_v, charT>} is \tcode{true}. +\item \tcode{is_same_v, CharT>} is \tcode{true}. \item \tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -870,11 +870,11 @@ \tcode{R} models \tcode{ranges::\libconcept{contiguous_range}} and \tcode{ranges::\libconcept{sized_range}}, \item -\tcode{is_same_v, charT>} is \tcode{true}, +\tcode{is_same_v, CharT>} is \tcode{true}, \item -\tcode{is_convertible_v} is \tcode{false}, and +\tcode{is_convertible_v} is \tcode{false}, and \item -\tcode{d.operator ::std::basic_string_view()} +\tcode{d.operator ::std::basic_string_view()} is not a valid expression. \end{itemize} @@ -929,7 +929,7 @@ \oldconcept{RandomAccessIterator}\iref{random.access.iterators}, models \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, and meets the constexpr iterator requirements\iref{iterator.requirements.general}, -whose \tcode{value_type} is the template parameter \tcode{charT}. +whose \tcode{value_type} is the template parameter \tcode{CharT}. \pnum All requirements on container iterators\iref{container.requirements} apply to \tcode{basic_string_view::const_iterator} as well. @@ -1120,7 +1120,7 @@ \begin{note} Unlike \tcode{basic_string::data()} and \grammarterm{string-literal}s, \tcode{data()} can return a pointer to a buffer that is not null-terminated. -Therefore it is typically a mistake to pass \tcode{data()} to a function that takes just a \tcode{const charT*} and expects a null-terminated string. +Therefore it is typically a mistake to pass \tcode{data()} to a function that takes just a \tcode{const CharT*} and expects a null-terminated string. \end{note} \end{itemdescr} @@ -1171,7 +1171,7 @@ \indexlibrarymember{copy}{basic_string_view}% \begin{itemdecl} -constexpr size_type copy(charT* s, size_type n, size_type pos = 0) const; +constexpr size_type copy(CharT* s, size_type n, size_type pos = 0) const; \end{itemdecl} \begin{itemdescr} @@ -1184,7 +1184,7 @@ \pnum \effects -Equivalent to \tcode{traits::copy(s, data() + pos, rlen)}. +Equivalent to \tcode{Traits::copy(s, data() + pos, rlen)}. \pnum \returns @@ -1233,7 +1233,7 @@ \pnum \effects Determines \tcode{rlen}, the effective length of the strings to compare. -The function then compares the two strings by calling \tcode{traits::compare(data(), str.data(), rlen)}. +The function then compares the two strings by calling \tcode{Traits::compare(data(), str.data(), rlen)}. \pnum \returns @@ -1275,7 +1275,7 @@ \indexlibrarymember{compare}{basic_string_view}% \begin{itemdecl} -constexpr int compare(const charT* s) const; +constexpr int compare(const CharT* s) const; \end{itemdecl} \begin{itemdescr} @@ -1286,7 +1286,7 @@ \indexlibrarymember{compare}{basic_string_view}% \begin{itemdecl} -constexpr int compare(size_type pos1, size_type n1, const charT* s) const; +constexpr int compare(size_type pos1, size_type n1, const CharT* s) const; \end{itemdecl} \begin{itemdescr} @@ -1297,7 +1297,7 @@ \indexlibrarymember{compare}{basic_string_view}% \begin{itemdecl} -constexpr int compare(size_type pos1, size_type n1, const charT* s, size_type n2) const; +constexpr int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const; \end{itemdecl} \begin{itemdescr} @@ -1322,18 +1322,18 @@ \indexlibrarymember{starts_with}{basic_string_view}% \begin{itemdecl} -constexpr bool starts_with(charT x) const noexcept; +constexpr bool starts_with(CharT x) const noexcept; \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return !empty() \&\& traits::eq(front(), x);} +Equivalent to: \tcode{return !empty() \&\& Traits::eq(front(), x);} \end{itemdescr} \indexlibrarymember{starts_with}{basic_string_view}% \begin{itemdecl} -constexpr bool starts_with(const charT* x) const; +constexpr bool starts_with(const CharT* x) const; \end{itemdecl} \begin{itemdescr} @@ -1361,18 +1361,18 @@ \indexlibrarymember{ends_with}{basic_string_view}% \begin{itemdecl} -constexpr bool ends_with(charT x) const noexcept; +constexpr bool ends_with(CharT x) const noexcept; \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return !empty() \&\& traits::eq(back(), x);} +Equivalent to: \tcode{return !empty() \&\& Traits::eq(back(), x);} \end{itemdescr} \indexlibrarymember{ends_with}{basic_string_view}% \begin{itemdecl} -constexpr bool ends_with(const charT* x) const; +constexpr bool ends_with(const CharT* x) const; \end{itemdecl} \begin{itemdescr} @@ -1384,8 +1384,8 @@ \indexlibrarymember{contains}{basic_string_view}% \begin{itemdecl} constexpr bool contains(basic_string_view x) const noexcept; -constexpr bool contains(charT x) const noexcept; -constexpr bool contains(const charT* x) const; +constexpr bool contains(CharT x) const noexcept; +constexpr bool contains(const CharT* x) const; \end{itemdecl} \begin{itemdescr} @@ -1413,21 +1413,21 @@ \item Each member function of the form \begin{codeblock} -constexpr @\placeholder{return-type}@ @\placeholder{F}@(const charT* s, size_type pos) const; +constexpr @\placeholder{return-type}@ @\placeholder{F}@(const CharT* s, size_type pos) const; \end{codeblock} has effects equivalent to: \tcode{return \placeholder{F}(basic_string_view(s), pos);} \item Each member function of the form \begin{codeblock} -constexpr @\placeholder{return-type}@ @\placeholder{F}@(const charT* s, size_type pos, size_type n) const; +constexpr @\placeholder{return-type}@ @\placeholder{F}@(const CharT* s, size_type pos, size_type n) const; \end{codeblock} has effects equivalent to: \tcode{return \placeholder{F}(basic_string_view(s, n), pos);} \item Each member function of the form \begin{codeblock} -constexpr @\placeholder{return-type}@ @\placeholder{F}@(charT c, size_type pos) const noexcept; +constexpr @\placeholder{return-type}@ @\placeholder{F}@(CharT c, size_type pos) const noexcept; \end{codeblock} has effects equivalent to: \tcode{return \placeholder{F}(basic_string_view(addressof(c), 1), pos);} \end{itemize} @@ -1446,7 +1446,7 @@ \item \tcode{xpos + str.size() <= size()} \item -\tcode{traits::eq(data_[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}. +\tcode{Traits::eq(data_[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}. \end{itemize} \pnum @@ -1473,7 +1473,7 @@ \item \tcode{xpos + str.size() <= size()} \item -\tcode{traits::eq(data_[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}. +\tcode{Traits::eq(data_[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}. \end{itemize} \pnum @@ -1500,7 +1500,7 @@ \item \tcode{xpos < size()} \item -\tcode{traits::eq(data_[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}. +\tcode{Traits::eq(data_[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}. \end{itemize} \pnum @@ -1527,7 +1527,7 @@ \item \tcode{xpos < size()} \item -\tcode{traits::eq(data_[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}. +\tcode{Traits::eq(data_[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}. \end{itemize} \pnum @@ -1554,7 +1554,7 @@ \item \tcode{xpos < size()} \item -\tcode{traits::eq(data_[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}. +\tcode{Traits::eq(data_[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}. \end{itemize} \pnum @@ -1580,7 +1580,7 @@ \item \tcode{xpos < size()} \item -\tcode{traits::eq(data_[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}. +\tcode{Traits::eq(data_[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}. \end{itemize} \pnum @@ -1597,9 +1597,9 @@ \indexlibrarymember{operator==}{basic_string_view}% \begin{itemdecl} -template - constexpr bool operator==(basic_string_view lhs, - type_identity_t> rhs) noexcept; +template + constexpr bool operator==(basic_string_view lhs, + type_identity_t> rhs) noexcept; \end{itemdecl} \begin{itemdescr} @@ -1610,14 +1610,14 @@ \indexlibrarymember{operator<=>}{basic_string_view}% \begin{itemdecl} -template - constexpr @\seebelow@ operator<=>(basic_string_view lhs, - @\itcorr@ type_identity_t> rhs) noexcept; +template + constexpr @\seebelow@ operator<=>(basic_string_view lhs, + @\itcorr@ type_identity_t> rhs) noexcept; \end{itemdecl} \begin{itemdescr} \pnum -Let \tcode{R} denote the type \tcode{traits::comparison_category} if +Let \tcode{R} denote the type \tcode{Traits::comparison_category} if that \grammarterm{qualified-id} is valid and denotes a type\iref{temp.deduct}, otherwise \tcode{R} is \tcode{weak_ordering}. @@ -1632,9 +1632,9 @@ \pnum \begin{note} The usage of \tcode{type_identity_t} as parameter -ensures that an object of type \tcode{basic_string_view} +ensures that an object of type \tcode{basic_string_view} can always be compared with an object of a type \tcode{T} with -an implicit conversion to \tcode{basic_string_view}, and +an implicit conversion to \tcode{basic_string_view}, and vice versa, as per \ref{over.match.oper}. \end{note} \end{itemdescr} @@ -1643,9 +1643,9 @@ \indexlibrarymember{operator<<}{basic_string_view}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, basic_string_view str); +template + basic_ostream& + operator<<(basic_ostream& os, basic_string_view str); \end{itemdecl} \begin{itemdescr} @@ -1773,7 +1773,7 @@ namespace std { // \ref{char.traits}, character traits - template struct char_traits; // freestanding + template struct char_traits; // freestanding template<> struct char_traits; // freestanding template<> struct char_traits; // freestanding template<> struct char_traits; // freestanding @@ -1781,131 +1781,131 @@ template<> struct char_traits; // freestanding // \ref{basic.string}, \tcode{basic_string} - template, class Allocator = allocator> + template, class Allocator = allocator> class basic_string; - template - constexpr basic_string - operator+(const basic_string& lhs, - const basic_string& rhs); - template - constexpr basic_string - operator+(basic_string&& lhs, - const basic_string& rhs); - template - constexpr basic_string - operator+(const basic_string& lhs, - basic_string&& rhs); - template - constexpr basic_string - operator+(basic_string&& lhs, - basic_string&& rhs); - template - constexpr basic_string - operator+(const charT* lhs, - const basic_string& rhs); - template - constexpr basic_string - operator+(const charT* lhs, - basic_string&& rhs); - template - constexpr basic_string - operator+(charT lhs, - const basic_string& rhs); - template - constexpr basic_string - operator+(charT lhs, - basic_string&& rhs); - template - constexpr basic_string - operator+(const basic_string& lhs, - const charT* rhs); - template - constexpr basic_string - operator+(basic_string&& lhs, - const charT* rhs); - template - constexpr basic_string - operator+(const basic_string& lhs, - charT rhs); - template - constexpr basic_string - operator+(basic_string&& lhs, - charT rhs); - template - constexpr basic_string - operator+(const basic_string& lhs, - type_identity_t> rhs); - template - constexpr basic_string - operator+(basic_string&& lhs, - type_identity_t> rhs); - template - constexpr basic_string - operator+(type_identity_t> lhs, - const basic_string& rhs); - template - constexpr basic_string - operator+(type_identity_t> lhs, - basic_string&& rhs); - - template + template + constexpr basic_string + operator+(const basic_string& lhs, + const basic_string& rhs); + template + constexpr basic_string + operator+(basic_string&& lhs, + const basic_string& rhs); + template + constexpr basic_string + operator+(const basic_string& lhs, + basic_string&& rhs); + template + constexpr basic_string + operator+(basic_string&& lhs, + basic_string&& rhs); + template + constexpr basic_string + operator+(const CharT* lhs, + const basic_string& rhs); + template + constexpr basic_string + operator+(const CharT* lhs, + basic_string&& rhs); + template + constexpr basic_string + operator+(CharT lhs, + const basic_string& rhs); + template + constexpr basic_string + operator+(CharT lhs, + basic_string&& rhs); + template + constexpr basic_string + operator+(const basic_string& lhs, + const CharT* rhs); + template + constexpr basic_string + operator+(basic_string&& lhs, + const CharT* rhs); + template + constexpr basic_string + operator+(const basic_string& lhs, + CharT rhs); + template + constexpr basic_string + operator+(basic_string&& lhs, + CharT rhs); + template + constexpr basic_string + operator+(const basic_string& lhs, + type_identity_t> rhs); + template + constexpr basic_string + operator+(basic_string&& lhs, + type_identity_t> rhs); + template + constexpr basic_string + operator+(type_identity_t> lhs, + const basic_string& rhs); + template + constexpr basic_string + operator+(type_identity_t> lhs, + basic_string&& rhs); + + template constexpr bool - operator==(const basic_string& lhs, - const basic_string& rhs) noexcept; - template - constexpr bool operator==(const basic_string& lhs, - const charT* rhs); - - template - constexpr @\seebelow@ operator<=>(const basic_string& lhs, - @\itcorr@ const basic_string& rhs) noexcept; - template - constexpr @\seebelow@ operator<=>(const basic_string& lhs, - @\itcorr@ const charT* rhs); + operator==(const basic_string& lhs, + const basic_string& rhs) noexcept; + template + constexpr bool operator==(const basic_string& lhs, + const CharT* rhs); + + template + constexpr @\seebelow@ operator<=>(const basic_string& lhs, + @\itcorr@ const basic_string& rhs) noexcept; + template + constexpr @\seebelow@ operator<=>(const basic_string& lhs, + @\itcorr@ const CharT* rhs); // \ref{string.special}, swap - template + template constexpr void - swap(basic_string& lhs, - basic_string& rhs) + swap(basic_string& lhs, + basic_string& rhs) noexcept(noexcept(lhs.swap(rhs))); // \ref{string.io}, inserters and extractors - template - basic_istream& - operator>>(basic_istream& is, - basic_string& str); - template - basic_ostream& - operator<<(basic_ostream& os, - const basic_string& str); - template - basic_istream& - getline(basic_istream& is, - basic_string& str, - charT delim); - template - basic_istream& - getline(basic_istream&& is, - basic_string& str, - charT delim); - template - basic_istream& - getline(basic_istream& is, - basic_string& str); - template - basic_istream& - getline(basic_istream&& is, - basic_string& str); + template + basic_istream& + operator>>(basic_istream& is, + basic_string& str); + template + basic_ostream& + operator<<(basic_ostream& os, + const basic_string& str); + template + basic_istream& + getline(basic_istream& is, + basic_string& str, + CharT delim); + template + basic_istream& + getline(basic_istream&& is, + basic_string& str, + CharT delim); + template + basic_istream& + getline(basic_istream& is, + basic_string& str); + template + basic_istream& + getline(basic_istream&& is, + basic_string& str); // \ref{string.erasure}, erasure - template - constexpr typename basic_string::size_type - erase(basic_string& c, const U& value); - template - constexpr typename basic_string::size_type - erase_if(basic_string& c, Predicate pred); + template + constexpr typename basic_string::size_type + erase(basic_string& c, const U& value); + template + constexpr typename basic_string::size_type + erase_if(basic_string& c, Predicate pred); // \tcode{basic_string} \grammarterm{typedef-name}s using @\libglobal{string}@ = basic_string; @@ -1952,8 +1952,8 @@ wstring to_wstring(long double val); namespace pmr { - template> - using basic_string = std::basic_string>; + template> + using basic_string = std::basic_string>; using string = basic_string; using u8string = basic_string; @@ -1999,7 +1999,7 @@ is clear from context. In the rest of \ref{basic.string}, the type of the char-like objects held in a \tcode{basic_string} object -is designated by \tcode{charT}. +is designated by \tcode{CharT}. \pnum A specialization of \tcode{basic_string} is a contiguous container\iref{container.reqmts}. @@ -2007,7 +2007,7 @@ \pnum In all cases, \crange{data()}{data() + size()} is a valid range, -\tcode{data() + size()} points at an object with value \tcode{charT()} +\tcode{data() + size()} points at an object with value \tcode{CharT()} (a ``null terminator''\indextext{string!null terminator}), and \tcode{size() <= capacity()} is \tcode{true}. @@ -2028,13 +2028,13 @@ \indexlibrarymember{const_reverse_iterator}{basic_string}% \begin{codeblock} namespace std { - template, - class Allocator = allocator> + template, + class Allocator = allocator> class basic_string { public: // types - using traits_type = traits; - using value_type = charT; + using traits_type = Traits; + using value_type = CharT; using allocator_type = Allocator; using size_type = typename allocator_traits::size_type; using difference_type = typename allocator_traits::difference_type; @@ -2067,16 +2067,16 @@ const Allocator& a = Allocator()); template constexpr explicit basic_string(const T& t, const Allocator& a = Allocator()); - constexpr basic_string(const charT* s, size_type n, const Allocator& a = Allocator()); - constexpr basic_string(const charT* s, const Allocator& a = Allocator()); + constexpr basic_string(const CharT* s, size_type n, const Allocator& a = Allocator()); + constexpr basic_string(const CharT* s, const Allocator& a = Allocator()); basic_string(nullptr_t) = delete; - constexpr basic_string(size_type n, charT c, const Allocator& a = Allocator()); + constexpr basic_string(size_type n, CharT c, const Allocator& a = Allocator()); template constexpr basic_string(InputIterator begin, InputIterator end, const Allocator& a = Allocator()); - template<@\exposconcept{container-compatible-range}@ R> + template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string(from_range_t, R&& rg, const Allocator& a = Allocator()); - constexpr basic_string(initializer_list, const Allocator& = Allocator()); + constexpr basic_string(initializer_list, const Allocator& = Allocator()); constexpr basic_string(const basic_string&, const Allocator&); constexpr basic_string(basic_string&&, const Allocator&); constexpr ~basic_string(); @@ -2087,10 +2087,10 @@ allocator_traits::is_always_equal::value); template constexpr basic_string& operator=(const T& t); - constexpr basic_string& operator=(const charT* s); + constexpr basic_string& operator=(const CharT* s); basic_string& operator=(nullptr_t) = delete; - constexpr basic_string& operator=(charT c); - constexpr basic_string& operator=(initializer_list); + constexpr basic_string& operator=(CharT c); + constexpr basic_string& operator=(initializer_list); // \ref{string.iterators}, iterators constexpr iterator begin() noexcept; @@ -2112,7 +2112,7 @@ constexpr size_type size() const noexcept; constexpr size_type length() const noexcept; constexpr size_type max_size() const noexcept; - constexpr void resize(size_type n, charT c); + constexpr void resize(size_type n, CharT c); constexpr void resize(size_type n); template constexpr void resize_and_overwrite(size_type n, Operation op); constexpr size_type capacity() const noexcept; @@ -2127,34 +2127,34 @@ constexpr const_reference at(size_type n) const; constexpr reference at(size_type n); - constexpr const charT& front() const; - constexpr charT& front(); - constexpr const charT& back() const; - constexpr charT& back(); + constexpr const CharT& front() const; + constexpr CharT& front(); + constexpr const CharT& back() const; + constexpr CharT& back(); // \ref{string.modifiers}, modifiers constexpr basic_string& operator+=(const basic_string& str); template constexpr basic_string& operator+=(const T& t); - constexpr basic_string& operator+=(const charT* s); - constexpr basic_string& operator+=(charT c); - constexpr basic_string& operator+=(initializer_list); + constexpr basic_string& operator+=(const CharT* s); + constexpr basic_string& operator+=(CharT c); + constexpr basic_string& operator+=(initializer_list); constexpr basic_string& append(const basic_string& str); constexpr basic_string& append(const basic_string& str, size_type pos, size_type n = npos); template constexpr basic_string& append(const T& t); template constexpr basic_string& append(const T& t, size_type pos, size_type n = npos); - constexpr basic_string& append(const charT* s, size_type n); - constexpr basic_string& append(const charT* s); - constexpr basic_string& append(size_type n, charT c); + constexpr basic_string& append(const CharT* s, size_type n); + constexpr basic_string& append(const CharT* s); + constexpr basic_string& append(size_type n, CharT c); template constexpr basic_string& append(InputIterator first, InputIterator last); - template<@\exposconcept{container-compatible-range}@ R> + template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string& append_range(R&& rg); - constexpr basic_string& append(initializer_list); + constexpr basic_string& append(initializer_list); - constexpr void push_back(charT c); + constexpr void push_back(CharT c); constexpr basic_string& assign(const basic_string& str); constexpr basic_string& assign(basic_string&& str) @@ -2165,14 +2165,14 @@ constexpr basic_string& assign(const T& t); template constexpr basic_string& assign(const T& t, size_type pos, size_type n = npos); - constexpr basic_string& assign(const charT* s, size_type n); - constexpr basic_string& assign(const charT* s); - constexpr basic_string& assign(size_type n, charT c); + constexpr basic_string& assign(const CharT* s, size_type n); + constexpr basic_string& assign(const CharT* s); + constexpr basic_string& assign(size_type n, CharT c); template constexpr basic_string& assign(InputIterator first, InputIterator last); - template<@\exposconcept{container-compatible-range}@ R> + template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string& assign_range(R&& rg); - constexpr basic_string& assign(initializer_list); + constexpr basic_string& assign(initializer_list); constexpr basic_string& insert(size_type pos, const basic_string& str); constexpr basic_string& insert(size_type pos1, const basic_string& str, @@ -2182,16 +2182,16 @@ template constexpr basic_string& insert(size_type pos1, const T& t, size_type pos2, size_type n = npos); - constexpr basic_string& insert(size_type pos, const charT* s, size_type n); - constexpr basic_string& insert(size_type pos, const charT* s); - constexpr basic_string& insert(size_type pos, size_type n, charT c); - constexpr iterator insert(const_iterator p, charT c); - constexpr iterator insert(const_iterator p, size_type n, charT c); + constexpr basic_string& insert(size_type pos, const CharT* s, size_type n); + constexpr basic_string& insert(size_type pos, const CharT* s); + constexpr basic_string& insert(size_type pos, size_type n, CharT c); + constexpr iterator insert(const_iterator p, CharT c); + constexpr iterator insert(const_iterator p, size_type n, CharT c); template constexpr iterator insert(const_iterator p, InputIterator first, InputIterator last); - template<@\exposconcept{container-compatible-range}@ R> + template<@\exposconcept{container-compatible-range}@ R> constexpr iterator insert_range(const_iterator p, R&& rg); - constexpr iterator insert(const_iterator p, initializer_list); + constexpr iterator insert(const_iterator p, initializer_list); constexpr basic_string& erase(size_type pos = 0, size_type n = npos); constexpr iterator erase(const_iterator p); @@ -2207,81 +2207,81 @@ template constexpr basic_string& replace(size_type pos1, size_type n1, const T& t, size_type pos2, size_type n2 = npos); - constexpr basic_string& replace(size_type pos, size_type n1, const charT* s, size_type n2); - constexpr basic_string& replace(size_type pos, size_type n1, const charT* s); - constexpr basic_string& replace(size_type pos, size_type n1, size_type n2, charT c); + constexpr basic_string& replace(size_type pos, size_type n1, const CharT* s, size_type n2); + constexpr basic_string& replace(size_type pos, size_type n1, const CharT* s); + constexpr basic_string& replace(size_type pos, size_type n1, size_type n2, CharT c); constexpr basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str); template constexpr basic_string& replace(const_iterator i1, const_iterator i2, const T& t); - constexpr basic_string& replace(const_iterator i1, const_iterator i2, const charT* s, + constexpr basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s, size_type n); - constexpr basic_string& replace(const_iterator i1, const_iterator i2, const charT* s); - constexpr basic_string& replace(const_iterator i1, const_iterator i2, size_type n, charT c); + constexpr basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s); + constexpr basic_string& replace(const_iterator i1, const_iterator i2, size_type n, CharT c); template constexpr basic_string& replace(const_iterator i1, const_iterator i2, InputIterator j1, InputIterator j2); - template<@\exposconcept{container-compatible-range}@ R> + template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string& replace_with_range(const_iterator i1, const_iterator i2, R&& rg); - constexpr basic_string& replace(const_iterator, const_iterator, initializer_list); + constexpr basic_string& replace(const_iterator, const_iterator, initializer_list); - constexpr size_type copy(charT* s, size_type n, size_type pos = 0) const; + constexpr size_type copy(CharT* s, size_type n, size_type pos = 0) const; constexpr void swap(basic_string& str) noexcept(allocator_traits::propagate_on_container_swap::value || allocator_traits::is_always_equal::value); // \ref{string.ops}, string operations - constexpr const charT* c_str() const noexcept; - constexpr const charT* data() const noexcept; - constexpr charT* data() noexcept; - constexpr operator basic_string_view() const noexcept; + constexpr const CharT* c_str() const noexcept; + constexpr const CharT* data() const noexcept; + constexpr CharT* data() noexcept; + constexpr operator basic_string_view() const noexcept; constexpr allocator_type get_allocator() const noexcept; template constexpr size_type find(const T& t, size_type pos = 0) const noexcept(@\seebelow@); constexpr size_type find(const basic_string& str, size_type pos = 0) const noexcept; - constexpr size_type find(const charT* s, size_type pos, size_type n) const; - constexpr size_type find(const charT* s, size_type pos = 0) const; - constexpr size_type find(charT c, size_type pos = 0) const noexcept; + constexpr size_type find(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find(const CharT* s, size_type pos = 0) const; + constexpr size_type find(CharT c, size_type pos = 0) const noexcept; template constexpr size_type rfind(const T& t, size_type pos = npos) const noexcept(@\seebelow@); constexpr size_type rfind(const basic_string& str, size_type pos = npos) const noexcept; - constexpr size_type rfind(const charT* s, size_type pos, size_type n) const; - constexpr size_type rfind(const charT* s, size_type pos = npos) const; - constexpr size_type rfind(charT c, size_type pos = npos) const noexcept; + constexpr size_type rfind(const CharT* s, size_type pos, size_type n) const; + constexpr size_type rfind(const CharT* s, size_type pos = npos) const; + constexpr size_type rfind(CharT c, size_type pos = npos) const noexcept; template constexpr size_type find_first_of(const T& t, size_type pos = 0) const noexcept(@\seebelow@); constexpr size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept; - constexpr size_type find_first_of(const charT* s, size_type pos, size_type n) const; - constexpr size_type find_first_of(const charT* s, size_type pos = 0) const; - constexpr size_type find_first_of(charT c, size_type pos = 0) const noexcept; + constexpr size_type find_first_of(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find_first_of(const CharT* s, size_type pos = 0) const; + constexpr size_type find_first_of(CharT c, size_type pos = 0) const noexcept; template constexpr size_type find_last_of(const T& t, size_type pos = npos) const noexcept(@\seebelow@); constexpr size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept; - constexpr size_type find_last_of(const charT* s, size_type pos, size_type n) const; - constexpr size_type find_last_of(const charT* s, size_type pos = npos) const; - constexpr size_type find_last_of(charT c, size_type pos = npos) const noexcept; + constexpr size_type find_last_of(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find_last_of(const CharT* s, size_type pos = npos) const; + constexpr size_type find_last_of(CharT c, size_type pos = npos) const noexcept; template constexpr size_type find_first_not_of(const T& t, size_type pos = 0) const noexcept(@\seebelow@); constexpr size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept; - constexpr size_type find_first_not_of(const charT* s, size_type pos, size_type n) const; - constexpr size_type find_first_not_of(const charT* s, size_type pos = 0) const; - constexpr size_type find_first_not_of(charT c, size_type pos = 0) const noexcept; + constexpr size_type find_first_not_of(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find_first_not_of(const CharT* s, size_type pos = 0) const; + constexpr size_type find_first_not_of(CharT c, size_type pos = 0) const noexcept; template constexpr size_type find_last_not_of(const T& t, size_type pos = npos) const noexcept(@\seebelow@); constexpr size_type find_last_not_of(const basic_string& str, size_type pos = npos) const noexcept; - constexpr size_type find_last_not_of(const charT* s, size_type pos, size_type n) const; - constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const; - constexpr size_type find_last_not_of(charT c, size_type pos = npos) const noexcept; + constexpr size_type find_last_not_of(const CharT* s, size_type pos, size_type n) const; + constexpr size_type find_last_not_of(const CharT* s, size_type pos = npos) const; + constexpr size_type find_last_not_of(CharT c, size_type pos = npos) const noexcept; constexpr basic_string substr(size_type pos = 0, size_type n = npos) const &; constexpr basic_string substr(size_type pos = 0, size_type n = npos) &&; @@ -2297,20 +2297,20 @@ constexpr int compare(size_type pos1, size_type n1, const basic_string& str) const; constexpr int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const; - constexpr int compare(const charT* s) const; - constexpr int compare(size_type pos1, size_type n1, const charT* s) const; - constexpr int compare(size_type pos1, size_type n1, const charT* s, size_type n2) const; - - constexpr bool starts_with(basic_string_view x) const noexcept; - constexpr bool starts_with(charT x) const noexcept; - constexpr bool starts_with(const charT* x) const; - constexpr bool ends_with(basic_string_view x) const noexcept; - constexpr bool ends_with(charT x) const noexcept; - constexpr bool ends_with(const charT* x) const; - - constexpr bool contains(basic_string_view x) const noexcept; - constexpr bool contains(charT x) const noexcept; - constexpr bool contains(const charT* x) const; + constexpr int compare(const CharT* s) const; + constexpr int compare(size_type pos1, size_type n1, const CharT* s) const; + constexpr int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const; + + constexpr bool starts_with(basic_string_view x) const noexcept; + constexpr bool starts_with(CharT x) const noexcept; + constexpr bool starts_with(const CharT* x) const; + constexpr bool ends_with(basic_string_view x) const noexcept; + constexpr bool ends_with(CharT x) const noexcept; + constexpr bool ends_with(const CharT* x) const; + + constexpr bool contains(basic_string_view x) const noexcept; + constexpr bool contains(CharT x) const noexcept; + constexpr bool contains(const CharT* x) const; }; template basic_string, char_traits>, Allocator>; - template> - explicit basic_string(basic_string_view, const Allocator& = Allocator()) - -> basic_string; + template> + explicit basic_string(basic_string_view, const Allocator& = Allocator()) + -> basic_string; - template> - basic_string(basic_string_view, + template> + basic_string(basic_string_view, typename @\seebelow@::size_type, typename @\seebelow@::size_type, const Allocator& = Allocator()) - -> basic_string; + -> basic_string; } \end{codeblock} @@ -2365,24 +2365,24 @@ \pnum Every object of type -\tcode{basic_string} uses an object of type -\tcode{Allocator} to allocate and free storage for the contained \tcode{charT} +\tcode{basic_string} uses an object of type +\tcode{Allocator} to allocate and free storage for the contained \tcode{CharT} objects as needed. The \tcode{Allocator} object used is obtained as described in \ref{container.reqmts}. -In every specialization \tcode{basic_string}, -the type \tcode{traits} shall meet +In every specialization \tcode{basic_string}, +the type \tcode{Traits} shall meet the character traits requirements\iref{char.traits}. \begin{note} -Every specialization \tcode{basic_string} is +Every specialization \tcode{basic_string} is an allocator-aware container\iref{container.alloc.reqmts}, but does not use the allocator's \tcode{construct} and \tcode{destroy} member functions\iref{container.requirements.pre}. The program is ill-formed if -\tcode{Allocator::value_type} is not the same type as \tcode{charT}. +\tcode{Allocator::value_type} is not the same type as \tcode{CharT}. \end{note} \begin{note} -The program is ill-formed if \tcode{traits::char_type} -is not the same type as \tcode{charT}. +The program is ill-formed if \tcode{Traits::char_type} +is not the same type as \tcode{CharT}. \end{note} \pnum @@ -2498,13 +2498,13 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_convertible_v>} +\tcode{is_convertible_v>} is \tcode{true}. \pnum \effects Creates a variable, \tcode{sv}, -as if by \tcode{basic_string_view sv = t;} +as if by \tcode{basic_string_view sv = t;} and then behaves the same as: \begin{codeblock} basic_string(sv.substr(pos, n), a); @@ -2522,23 +2522,23 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} \pnum \effects Creates a variable, \tcode{sv}, as if by -\tcode{basic_string_view sv = t;} and +\tcode{basic_string_view sv = t;} and then behaves the same as \tcode{basic_string(sv.data(), sv.size(), a)}. \end{itemdescr} \indexlibraryctor{basic_string}% \begin{itemdecl} -constexpr basic_string(const charT* s, size_type n, const Allocator& a = Allocator()); +constexpr basic_string(const CharT* s, size_type n, const Allocator& a = Allocator()); \end{itemdecl} \begin{itemdescr} @@ -2553,12 +2553,12 @@ \pnum \ensures \tcode{size()} is equal to \tcode{n}, and -\tcode{traits::compare(data(), s, n)} is equal to \tcode{0}. +\tcode{Traits::compare(data(), s, n)} is equal to \tcode{0}. \end{itemdescr} \indexlibraryctor{basic_string}% \begin{itemdecl} -constexpr basic_string(const charT* s, const Allocator& a = Allocator()); +constexpr basic_string(const CharT* s, const Allocator& a = Allocator()); \end{itemdecl} \begin{itemdescr} @@ -2572,12 +2572,12 @@ \pnum \effects -Equivalent to: \tcode{basic_string(s, traits::length(s), a)}. +Equivalent to: \tcode{basic_string(s, Traits::length(s), a)}. \end{itemdescr} \indexlibraryctor{basic_string}% \begin{itemdecl} -constexpr basic_string(size_type n, charT c, const Allocator& a = Allocator()); +constexpr basic_string(size_type n, CharT c, const Allocator& a = Allocator()); \end{itemdecl} \begin{itemdescr} @@ -2614,7 +2614,7 @@ \indexlibraryctor{basic_string}% \begin{itemdecl} -template<@\exposconcept{container-compatible-range}@ R> +template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string(from_range_t, R&& rg, const Allocator& = Allocator()); \end{itemdecl} @@ -2627,7 +2627,7 @@ \indexlibraryctor{basic_string}% \begin{itemdecl} -constexpr basic_string(initializer_list il, const Allocator& a = Allocator()); +constexpr basic_string(initializer_list il, const Allocator& a = Allocator()); \end{itemdecl} \begin{itemdescr} @@ -2672,19 +2672,19 @@ \end{itemdescr} \begin{itemdecl} -template> - explicit basic_string(basic_string_view, const Allocator& = Allocator()) - -> basic_string; +template> + explicit basic_string(basic_string_view, const Allocator& = Allocator()) + -> basic_string; -template> - basic_string(basic_string_view, +template> + basic_string(basic_string_view, typename @\seebelow@::size_type, typename @\seebelow@::size_type, const Allocator& = Allocator()) - -> basic_string; + -> basic_string; \end{itemdecl} \begin{itemdescr} @@ -2738,9 +2738,9 @@ \pnum \constraints \begin{itemize} -\item \tcode{is_convertible_v>} +\item \tcode{is_convertible_v>} is \tcode{true} and -\item \tcode{is_convertible_v} +\item \tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -2748,26 +2748,26 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return assign(sv); \end{codeblock} \end{itemdescr} \indexlibrarymember{operator=}{basic_string}% \begin{itemdecl} -constexpr basic_string& operator=(const charT* s); +constexpr basic_string& operator=(const CharT* s); \end{itemdecl} \begin{itemdescr} \pnum \effects Equivalent to: -\tcode{return *this = basic_string_view(s);} +\tcode{return *this = basic_string_view(s);} \end{itemdescr} \indexlibrarymember{operator=}{basic_string}% \begin{itemdecl} -constexpr basic_string& operator=(charT c); +constexpr basic_string& operator=(CharT c); \end{itemdecl} \begin{itemdescr} @@ -2775,13 +2775,13 @@ \effects Equivalent to: \begin{codeblock} -return *this = basic_string_view(addressof(c), 1); +return *this = basic_string_view(addressof(c), 1); \end{codeblock} \end{itemdescr} \indexlibrarymember{operator=}{basic_string}% \begin{itemdecl} -constexpr basic_string& operator=(initializer_list il); +constexpr basic_string& operator=(initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -2789,7 +2789,7 @@ \effects Equivalent to: \begin{codeblock} -return *this = basic_string_view(il.begin(), il.size()); +return *this = basic_string_view(il.begin(), il.size()); \end{codeblock} \end{itemdescr} @@ -2890,7 +2890,7 @@ \indexlibrarymember{resize}{basic_string}% \begin{itemdecl} -constexpr void resize(size_type n, charT c); +constexpr void resize(size_type n, CharT c); \end{itemdecl} \begin{itemdescr} @@ -2919,7 +2919,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to \tcode{resize(n, charT())}. +Equivalent to \tcode{resize(n, CharT())}. \end{itemdescr} \indexlibrarymember{resize_and_overwrite}{basic_string}% @@ -2936,7 +2936,7 @@ \item \tcode{k} be \tcode{min(o, n)}. \item -\tcode{p} be a value of type \tcode{charT*} or \tcode{charT* const}, +\tcode{p} be a value of type \tcode{CharT*} or \tcode{CharT* const}, such that the range \crange{p}{p + n} is valid and \tcode{this->compare(0, k, p, k) == 0} is \tcode{true} before the call. The values in the range \crange{p + k}{p + n} may be indeterminate\iref{basic.indet}. @@ -2977,7 +2977,7 @@ \recommended Implementations should avoid unnecessary copies and allocations by, for example, making \tcode{p} a pointer into internal storage and -by restoring \tcode{*(p + r)} to \tcode{charT()} after evaluating \tcode{\placeholder{OP}}. +by restoring \tcode{*(p + r)} to \tcode{CharT()} after evaluating \tcode{\placeholder{OP}}. \end{itemdescr} \indexlibrarymember{capacity}{basic_string}% @@ -3096,9 +3096,9 @@ \pnum \returns \tcode{*(begin() + pos)} if \tcode{pos < size()}. Otherwise, -returns a reference to an object of type \tcode{charT} with value -\tcode{charT()}, where modifying the object to any value other than -\tcode{charT()} leads to undefined behavior. +returns a reference to an object of type \tcode{CharT} with value +\tcode{CharT()}, where modifying the object to any value other than +\tcode{CharT()} leads to undefined behavior. \pnum \throws @@ -3129,8 +3129,8 @@ \indexlibrarymember{front}{basic_string}% \begin{itemdecl} -constexpr const charT& front() const; -constexpr charT& front(); +constexpr const CharT& front() const; +constexpr CharT& front(); \end{itemdecl} \begin{itemdescr} @@ -3145,8 +3145,8 @@ \indexlibrarymember{back}{basic_string}% \begin{itemdecl} -constexpr const charT& back() const; -constexpr charT& back(); +constexpr const CharT& back() const; +constexpr CharT& back(); \end{itemdecl} \begin{itemdescr} @@ -3187,10 +3187,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3198,14 +3198,14 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return append(sv); \end{codeblock} \end{itemdescr} \indexlibrarymember{operator+=}{basic_string}% \begin{itemdecl} -constexpr basic_string& operator+=(const charT* s); +constexpr basic_string& operator+=(const CharT* s); \end{itemdecl} \begin{itemdescr} @@ -3216,7 +3216,7 @@ \indexlibrarymember{operator+=}{basic_string}% \begin{itemdecl} -constexpr basic_string& operator+=(charT c); +constexpr basic_string& operator+=(CharT c); \end{itemdecl} \begin{itemdescr} @@ -3227,7 +3227,7 @@ \indexlibrarymember{operator+=}{basic_string}% \begin{itemdecl} -constexpr basic_string& operator+=(initializer_list il); +constexpr basic_string& operator+=(initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -3260,7 +3260,7 @@ \effects Equivalent to: \begin{codeblock} -return append(basic_string_view(str).substr(pos, n)); +return append(basic_string_view(str).substr(pos, n)); \end{codeblock} \end{itemdescr} @@ -3275,10 +3275,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3286,7 +3286,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return append(sv.data(), sv.size()); \end{codeblock} \end{itemdescr} @@ -3302,10 +3302,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3313,14 +3313,14 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return append(sv.substr(pos, n)); \end{codeblock} \end{itemdescr} \indexlibrarymember{append}{basic_string}% \begin{itemdecl} -constexpr basic_string& append(const charT* s, size_type n); +constexpr basic_string& append(const CharT* s, size_type n); \end{itemdecl} \begin{itemdescr} @@ -3339,18 +3339,18 @@ \indexlibrarymember{append}{basic_string}% \begin{itemdecl} -constexpr basic_string& append(const charT* s); +constexpr basic_string& append(const CharT* s); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return append(s, traits::length(s));} +Equivalent to: \tcode{return append(s, Traits::length(s));} \end{itemdescr} \indexlibrarymember{append}{basic_string}% \begin{itemdecl} -constexpr basic_string& append(size_type n, charT c); +constexpr basic_string& append(size_type n, CharT c); \end{itemdecl} \begin{itemdescr} @@ -3382,7 +3382,7 @@ \indexlibrarymember{append_range}{basic_string}% \begin{itemdecl} -template<@\exposconcept{container-compatible-range}@ R> +template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string& append_range(R&& rg); \end{itemdecl} @@ -3394,7 +3394,7 @@ \indexlibrarymember{append}{basic_string}% \begin{itemdecl} -constexpr basic_string& append(initializer_list il); +constexpr basic_string& append(initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -3405,7 +3405,7 @@ \indexlibrarymember{push_back}{basic_string}% \begin{itemdecl} -constexpr void push_back(charT c); +constexpr void push_back(CharT c); \end{itemdecl} \begin{itemdescr} @@ -3452,7 +3452,7 @@ \effects Equivalent to: \begin{codeblock} -return assign(basic_string_view(str).substr(pos, n)); +return assign(basic_string_view(str).substr(pos, n)); \end{codeblock} \end{itemdescr} @@ -3467,10 +3467,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3478,7 +3478,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return assign(sv.data(), sv.size()); \end{codeblock} \end{itemdescr} @@ -3494,10 +3494,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3505,14 +3505,14 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return assign(sv.substr(pos, n)); \end{codeblock} \end{itemdescr} \indexlibrarymember{assign}{basic_string}% \begin{itemdecl} -constexpr basic_string& assign(const charT* s, size_type n); +constexpr basic_string& assign(const CharT* s, size_type n); \end{itemdecl} \begin{itemdescr} @@ -3532,18 +3532,18 @@ \indexlibrarymember{assign}{basic_string}% \begin{itemdecl} -constexpr basic_string& assign(const charT* s); +constexpr basic_string& assign(const CharT* s); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return assign(s, traits::length(s));} +Equivalent to: \tcode{return assign(s, Traits::length(s));} \end{itemdescr} \indexlibrarymember{assign}{basic_string}% \begin{itemdecl} -constexpr basic_string& assign(initializer_list il); +constexpr basic_string& assign(initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -3554,7 +3554,7 @@ \indexlibrarymember{assign}{basic_string}% \begin{itemdecl} -constexpr basic_string& assign(size_type n, charT c); +constexpr basic_string& assign(size_type n, CharT c); \end{itemdecl} \begin{itemdescr} @@ -3587,7 +3587,7 @@ \indexlibrarymember{assign_range}{basic_string}% \begin{itemdecl} -template<@\exposconcept{container-compatible-range}@ R> +template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string& assign_range(R&& rg); \end{itemdecl} @@ -3621,7 +3621,7 @@ \effects Equivalent to: \begin{codeblock} -return insert(pos1, basic_string_view(str), pos2, n); +return insert(pos1, basic_string_view(str), pos2, n); \end{codeblock} \end{itemdescr} @@ -3636,10 +3636,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3647,7 +3647,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return insert(pos, sv.data(), sv.size()); \end{codeblock} \end{itemdescr} @@ -3664,10 +3664,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3675,14 +3675,14 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return insert(pos1, sv.substr(pos2, n)); \end{codeblock} \end{itemdescr} \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -constexpr basic_string& insert(size_type pos, const charT* s, size_type n); +constexpr basic_string& insert(size_type pos, const CharT* s, size_type n); \end{itemdecl} \begin{itemdescr} @@ -3711,18 +3711,18 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -constexpr basic_string& insert(size_type pos, const charT* s); +constexpr basic_string& insert(size_type pos, const CharT* s); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return insert(pos, s, traits::length(s));} +Equivalent to: \tcode{return insert(pos, s, Traits::length(s));} \end{itemdescr} \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -constexpr basic_string& insert(size_type pos, size_type n, charT c); +constexpr basic_string& insert(size_type pos, size_type n, CharT c); \end{itemdecl} \begin{itemdescr} @@ -3747,7 +3747,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -constexpr iterator insert(const_iterator p, charT c); +constexpr iterator insert(const_iterator p, CharT c); \end{itemdecl} \begin{itemdescr} @@ -3767,7 +3767,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -constexpr iterator insert(const_iterator p, size_type n, charT c); +constexpr iterator insert(const_iterator p, size_type n, CharT c); \end{itemdecl} \begin{itemdescr} @@ -3816,7 +3816,7 @@ \indexlibrarymember{insert_range}{basic_string}% \begin{itemdecl} -template<@\exposconcept{container-compatible-range}@ R> +template<@\exposconcept{container-compatible-range}@ R> constexpr iterator insert_range(const_iterator p, R&& rg); \end{itemdecl} @@ -3838,7 +3838,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -constexpr iterator insert(const_iterator p, initializer_list il); +constexpr iterator insert(const_iterator p, initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -3972,7 +3972,7 @@ \effects Equivalent to: \begin{codeblock} -return replace(pos1, n1, basic_string_view(str).substr(pos2, n2)); +return replace(pos1, n1, basic_string_view(str).substr(pos2, n2)); \end{codeblock} \end{itemdescr} @@ -3987,10 +3987,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -3998,7 +3998,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return replace(pos1, n1, sv.data(), sv.size()); \end{codeblock} \end{itemdescr} @@ -4015,10 +4015,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -4026,14 +4026,14 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return replace(pos1, n1, sv.substr(pos2, n2)); \end{codeblock} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -constexpr basic_string& replace(size_type pos1, size_type n1, const charT* s, size_type n2); +constexpr basic_string& replace(size_type pos1, size_type n1, const CharT* s, size_type n2); \end{itemdecl} \begin{itemdescr} @@ -4066,18 +4066,18 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -constexpr basic_string& replace(size_type pos, size_type n, const charT* s); +constexpr basic_string& replace(size_type pos, size_type n, const CharT* s); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return replace(pos, n, s, traits::length(s));} +Equivalent to: \tcode{return replace(pos, n, s, Traits::length(s));} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -constexpr basic_string& replace(size_type pos1, size_type n1, size_type n2, charT c); +constexpr basic_string& replace(size_type pos1, size_type n1, size_type n2, CharT c); \end{itemdecl} \begin{itemdescr} @@ -4112,7 +4112,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return replace(i1, i2, basic_string_view(str));} +Equivalent to: \tcode{return replace(i1, i2, basic_string_view(str));} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% @@ -4126,10 +4126,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -4141,36 +4141,36 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view sv = t; +basic_string_view sv = t; return replace(i1 - begin(), i2 - i1, sv.data(), sv.size()); \end{codeblock} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -constexpr basic_string& replace(const_iterator i1, const_iterator i2, const charT* s, size_type n); +constexpr basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s, size_type n); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return replace(i1, i2, basic_string_view(s, n));} +Equivalent to: \tcode{return replace(i1, i2, basic_string_view(s, n));} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -constexpr basic_string& replace(const_iterator i1, const_iterator i2, const charT* s); +constexpr basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return replace(i1, i2, basic_string_view(s));} +Equivalent to: \tcode{return replace(i1, i2, basic_string_view(s));} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -constexpr basic_string& replace(const_iterator i1, const_iterator i2, size_type n, charT c); +constexpr basic_string& replace(const_iterator i1, const_iterator i2, size_type n, CharT c); \end{itemdecl} \begin{itemdescr} @@ -4203,7 +4203,7 @@ \indexlibrarymember{replace_with_range}{basic_string}% \begin{itemdecl} -template<@\exposconcept{container-compatible-range}@ R> +template<@\exposconcept{container-compatible-range}@ R> constexpr basic_string& replace_with_range(const_iterator i1, const_iterator i2, R&& rg); \end{itemdecl} @@ -4218,7 +4218,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -constexpr basic_string& replace(const_iterator i1, const_iterator i2, initializer_list il); +constexpr basic_string& replace(const_iterator i1, const_iterator i2, initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -4231,14 +4231,14 @@ \indexlibrarymember{copy}{basic_string}% \begin{itemdecl} -constexpr size_type copy(charT* s, size_type n, size_type pos = 0) const; +constexpr size_type copy(CharT* s, size_type n, size_type pos = 0) const; \end{itemdecl} \begin{itemdescr} \pnum \effects Equivalent to: -\tcode{return basic_string_view(*this).copy(s, n, pos);} +\tcode{return basic_string_view(*this).copy(s, n, pos);} \begin{note} This does not terminate \tcode{s} with a null object. \end{note} @@ -4283,8 +4283,8 @@ \indexlibrarymember{c_str}{basic_string}% \indexlibrarymember{data}{basic_string}% \begin{itemdecl} -constexpr const charT* c_str() const noexcept; -constexpr const charT* data() const noexcept; +constexpr const CharT* c_str() const noexcept; +constexpr const CharT* data() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -4304,7 +4304,7 @@ \indexlibrarymember{data}{basic_string}% \begin{itemdecl} -constexpr charT* data() noexcept; +constexpr CharT* data() noexcept; \end{itemdecl} \begin{itemdescr} @@ -4320,19 +4320,19 @@ \pnum \remarks The program shall not modify the value stored at \tcode{p + size()} -to any value other than \tcode{charT()}; otherwise, the behavior is undefined. +to any value other than \tcode{CharT()}; otherwise, the behavior is undefined. \end{itemdescr} \indexlibrarymember{operator basic_string_view}{basic_string}% \begin{itemdecl} -constexpr operator basic_string_view() const noexcept; +constexpr operator basic_string_view() const noexcept; \end{itemdecl} \begin{itemdescr} \pnum \effects Equivalent to: -\tcode{return basic_string_view(data(), size());} +\tcode{return basic_string_view(data(), size());} \end{itemdescr} \indexlibrarymember{get_allocator}{basic_string}% @@ -4369,32 +4369,32 @@ constexpr size_type @\placeholder{F}@(const basic_string& str, size_type pos) const noexcept; \end{codeblock} has effects equivalent to: -\tcode{return \placeholder{F}(basic_string_view(str), pos);} +\tcode{return \placeholder{F}(basic_string_view(str), pos);} \item Each member function of the form \begin{codeblock} -constexpr size_type @\placeholder{F}@(const charT* s, size_type pos) const; +constexpr size_type @\placeholder{F}@(const CharT* s, size_type pos) const; \end{codeblock} has effects equivalent to: -\tcode{return \placeholder{F}(basic_string_view(s), pos);} +\tcode{return \placeholder{F}(basic_string_view(s), pos);} \item Each member function of the form \begin{codeblock} -constexpr size_type @\placeholder{F}@(const charT* s, size_type pos, size_type n) const; +constexpr size_type @\placeholder{F}@(const CharT* s, size_type pos, size_type n) const; \end{codeblock} has effects equivalent to: -\tcode{return \placeholder{F}(basic_string_view(s, n), pos);} +\tcode{return \placeholder{F}(basic_string_view(s, n), pos);} \item Each member function of the form \begin{codeblock} -constexpr size_type @\placeholder{F}@(charT c, size_type pos) const noexcept; +constexpr size_type @\placeholder{F}@(CharT c, size_type pos) const noexcept; \end{codeblock} has effects equivalent to: \begin{codeblock} -return @\placeholder{F}@(basic_string_view(addressof(c), 1), pos); +return @\placeholder{F}@(basic_string_view(addressof(c), 1), pos); \end{codeblock} \end{itemize} @@ -4424,10 +4424,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -4436,14 +4436,14 @@ Let \placeholder{G} be the name of the function. Equivalent to: \begin{codeblock} -basic_string_view s = *this, sv = t; +basic_string_view s = *this, sv = t; return s.@\placeholder{G}@(sv, pos); \end{codeblock} \pnum \remarks The exception specification is equivalent to -\tcode{is_nothrow_convertible_v>}. +\tcode{is_nothrow_convertible_v>}. \end{itemdescr} \rSec4[string.substr]{\tcode{basic_string::substr}} @@ -4483,21 +4483,21 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} \pnum \effects -Equivalent to: \tcode{return basic_string_view(*this).compare(t);} +Equivalent to: \tcode{return basic_string_view(*this).compare(t);} \pnum \remarks The exception specification is equivalent to -\tcode{is_nothrow_convertible_v>}. +\tcode{is_nothrow_convertible_v>}. \end{itemdescr} \indexlibrarymember{compare}{basic_string}% @@ -4511,10 +4511,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -4522,7 +4522,7 @@ \effects Equivalent to: \begin{codeblock} -return basic_string_view(*this).substr(pos1, n1).compare(t); +return basic_string_view(*this).substr(pos1, n1).compare(t); \end{codeblock} \end{itemdescr} @@ -4538,10 +4538,10 @@ \constraints \begin{itemize} \item -\tcode{is_convertible_v>} is +\tcode{is_convertible_v>} is \tcode{true} and \item -\tcode{is_convertible_v} is +\tcode{is_convertible_v} is \tcode{false}. \end{itemize} @@ -4549,7 +4549,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string_view s = *this, sv = t; +basic_string_view s = *this, sv = t; return s.substr(pos1, n1).compare(sv.substr(pos2, n2)); \end{codeblock} \end{itemdescr} @@ -4563,7 +4563,7 @@ \pnum \effects Equivalent to: -\tcode{return compare(basic_string_view(str));} +\tcode{return compare(basic_string_view(str));} \end{itemdescr} \indexlibrarymember{compare}{basic_string}% @@ -4575,7 +4575,7 @@ \pnum \effects Equivalent to: -\tcode{return compare(pos1, n1, basic_string_view(str));} +\tcode{return compare(pos1, n1, basic_string_view(str));} \end{itemdescr} \indexlibrarymember{compare}{basic_string}% @@ -4589,51 +4589,51 @@ \effects Equivalent to: \begin{codeblock} -return compare(pos1, n1, basic_string_view(str), pos2, n2); +return compare(pos1, n1, basic_string_view(str), pos2, n2); \end{codeblock} \end{itemdescr} \indexlibrarymember{compare}{basic_string}% \begin{itemdecl} -constexpr int compare(const charT* s) const; +constexpr int compare(const CharT* s) const; \end{itemdecl} \begin{itemdescr} \pnum \effects Equivalent to: -\tcode{return compare(basic_string_view(s));} +\tcode{return compare(basic_string_view(s));} \end{itemdescr} \indexlibrarymember{compare}{basic_string}% \begin{itemdecl} -constexpr int compare(size_type pos, size_type n1, const charT* s) const; +constexpr int compare(size_type pos, size_type n1, const CharT* s) const; \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return compare(pos, n1, basic_string_view(s));} +Equivalent to: \tcode{return compare(pos, n1, basic_string_view(s));} \end{itemdescr} \indexlibrarymember{compare}{basic_string}% \begin{itemdecl} -constexpr int compare(size_type pos, size_type n1, const charT* s, size_type n2) const; +constexpr int compare(size_type pos, size_type n1, const CharT* s, size_type n2) const; \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return compare(pos, n1, basic_string_view(s, n2));} +Equivalent to: \tcode{return compare(pos, n1, basic_string_view(s, n2));} \end{itemdescr} \rSec4[string.starts.with]{\tcode{basic_string::starts_with}} \indexlibrarymember{starts_with}{basic_string}% \begin{itemdecl} -constexpr bool starts_with(basic_string_view x) const noexcept; -constexpr bool starts_with(charT x) const noexcept; -constexpr bool starts_with(const charT* x) const; +constexpr bool starts_with(basic_string_view x) const noexcept; +constexpr bool starts_with(CharT x) const noexcept; +constexpr bool starts_with(const CharT* x) const; \end{itemdecl} \begin{itemdescr} @@ -4641,7 +4641,7 @@ \effects Equivalent to: \begin{codeblock} -return basic_string_view(data(), size()).starts_with(x); +return basic_string_view(data(), size()).starts_with(x); \end{codeblock} \end{itemdescr} @@ -4649,9 +4649,9 @@ \indexlibrarymember{ends_with}{basic_string}% \begin{itemdecl} -constexpr bool ends_with(basic_string_view x) const noexcept; -constexpr bool ends_with(charT x) const noexcept; -constexpr bool ends_with(const charT* x) const; +constexpr bool ends_with(basic_string_view x) const noexcept; +constexpr bool ends_with(CharT x) const noexcept; +constexpr bool ends_with(const CharT* x) const; \end{itemdecl} \begin{itemdescr} @@ -4659,7 +4659,7 @@ \effects Equivalent to: \begin{codeblock} -return basic_string_view(data(), size()).ends_with(x); +return basic_string_view(data(), size()).ends_with(x); \end{codeblock} \end{itemdescr} @@ -4667,9 +4667,9 @@ \indexlibrarymember{contains}{basic_string}% \begin{itemdecl} -constexpr bool contains(basic_string_view x) const noexcept; -constexpr bool contains(charT x) const noexcept; -constexpr bool contains(const charT* x) const; +constexpr bool contains(basic_string_view x) const noexcept; +constexpr bool contains(CharT x) const noexcept; +constexpr bool contains(const CharT* x) const; \end{itemdecl} \begin{itemdescr} @@ -4677,7 +4677,7 @@ \effects Equivalent to: \begin{codeblock} -return basic_string_view(data(), size()).contains(x); +return basic_string_view(data(), size()).contains(x); \end{codeblock} \end{itemdescr} @@ -4689,13 +4689,13 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(const basic_string& lhs, - const basic_string& rhs); -template - constexpr basic_string - operator+(const basic_string& lhs, const charT* rhs); +template + constexpr basic_string + operator+(const basic_string& lhs, + const basic_string& rhs); +template + constexpr basic_string + operator+(const basic_string& lhs, const CharT* rhs); \end{itemdecl} \begin{itemdescr} @@ -4703,7 +4703,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string r = lhs; +basic_string r = lhs; r.append(rhs); return r; \end{codeblock} @@ -4711,13 +4711,13 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(basic_string&& lhs, - const basic_string& rhs); -template - constexpr basic_string - operator+(basic_string&& lhs, const charT* rhs); +template + constexpr basic_string + operator+(basic_string&& lhs, + const basic_string& rhs); +template + constexpr basic_string + operator+(basic_string&& lhs, const CharT* rhs); \end{itemdecl} \begin{itemdescr} @@ -4732,10 +4732,10 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(basic_string&& lhs, - basic_string&& rhs); +template + constexpr basic_string + operator+(basic_string&& lhs, + basic_string&& rhs); \end{itemdecl} \begin{itemdescr} @@ -4756,13 +4756,13 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(const basic_string& lhs, - basic_string&& rhs); -template - constexpr basic_string - operator+(const charT* lhs, basic_string&& rhs); +template + constexpr basic_string + operator+(const basic_string& lhs, + basic_string&& rhs); +template + constexpr basic_string + operator+(const CharT* lhs, basic_string&& rhs); \end{itemdecl} \begin{itemdescr} @@ -4777,9 +4777,9 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(const charT* lhs, const basic_string& rhs); +template + constexpr basic_string + operator+(const CharT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -4787,7 +4787,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string r = rhs; +basic_string r = rhs; r.insert(0, lhs); return r; \end{codeblock} @@ -4795,9 +4795,9 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(charT lhs, const basic_string& rhs); +template + constexpr basic_string + operator+(CharT lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -4805,7 +4805,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string r = rhs; +basic_string r = rhs; r.insert(r.begin(), lhs); return r; \end{codeblock} @@ -4813,9 +4813,9 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(charT lhs, basic_string&& rhs); +template + constexpr basic_string + operator+(CharT lhs, basic_string&& rhs); \end{itemdecl} \begin{itemdescr} @@ -4830,9 +4830,9 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(const basic_string& lhs, charT rhs); +template + constexpr basic_string + operator+(const basic_string& lhs, CharT rhs); \end{itemdecl} \begin{itemdescr} @@ -4840,7 +4840,7 @@ \effects Equivalent to: \begin{codeblock} -basic_string r = lhs; +basic_string r = lhs; r.push_back(rhs); return r; \end{codeblock} @@ -4848,9 +4848,9 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(basic_string&& lhs, charT rhs); +template + constexpr basic_string + operator+(basic_string&& lhs, CharT rhs); \end{itemdecl} \begin{itemdescr} @@ -4865,17 +4865,17 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(const basic_string& lhs, - type_identity_t> rhs); +template + constexpr basic_string + operator+(const basic_string& lhs, + type_identity_t> rhs); \end{itemdecl} \begin{itemdescr} \pnum Equivalent to: \begin{codeblock} -basic_string r = lhs; +basic_string r = lhs; r.append(rhs); return r; \end{codeblock} @@ -4883,10 +4883,10 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(basic_string&& lhs, - type_identity_t> rhs); +template + constexpr basic_string + operator+(basic_string&& lhs, + type_identity_t> rhs); \end{itemdecl} \begin{itemdescr} @@ -4900,17 +4900,17 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(type_identity_t> lhs, - const basic_string& rhs); +template + constexpr basic_string + operator+(type_identity_t> lhs, + const basic_string& rhs); \end{itemdecl} \begin{itemdescr} \pnum Equivalent to: \begin{codeblock} -basic_string r = rhs; +basic_string r = rhs; r.insert(0, lhs); return r; \end{codeblock} @@ -4918,10 +4918,10 @@ \indexlibrarymember{operator+}{basic_string}% \begin{itemdecl} -template - constexpr basic_string - operator+(type_identity_t> lhs, - basic_string&& rhs); +template + constexpr basic_string + operator+(type_identity_t> lhs, + basic_string&& rhs); \end{itemdecl} \begin{itemdescr} @@ -4936,28 +4936,28 @@ \pnum \begin{note} Using a specialization of \tcode{type_identity_t} as a parameter type ensures -that an object of type \tcode{basic_string} +that an object of type \tcode{basic_string} can be concatenated with an object of a type \tcode{T} having an implicit conversion to -\tcode{basic_string_view}\iref{over.match.oper}. +\tcode{basic_string_view}\iref{over.match.oper}. \end{note} \rSec3[string.cmp]{Non-member comparison operator functions} \begin{itemdecl} -template +template constexpr bool - operator==(const basic_string& lhs, - const basic_string& rhs) noexcept; -template - constexpr bool operator==(const basic_string& lhs, - const charT* rhs); + operator==(const basic_string& lhs, + const basic_string& rhs) noexcept; +template + constexpr bool operator==(const basic_string& lhs, + const CharT* rhs); -template - constexpr @\seebelow@ operator<=>(const basic_string& lhs, - @\itcorr@ const basic_string& rhs) noexcept; -template - constexpr @\seebelow@ operator<=>(const basic_string& lhs, - @\itcorr@ const charT* rhs); +template + constexpr @\seebelow@ operator<=>(const basic_string& lhs, + @\itcorr@ const basic_string& rhs) noexcept; +template + constexpr @\seebelow@ operator<=>(const basic_string& lhs, + @\itcorr@ const CharT* rhs); \end{itemdecl} \begin{itemdescr} \pnum @@ -4965,7 +4965,7 @@ Let \tcode{\placeholder{op}} be the operator. Equivalent to: \begin{codeblock} -return basic_string_view(lhs) @\placeholder{op}@ basic_string_view(rhs); +return basic_string_view(lhs) @\placeholder{op}@ basic_string_view(rhs); \end{codeblock} \end{itemdescr} @@ -4973,10 +4973,10 @@ \indexlibrarymember{swap}{basic_string}% \begin{itemdecl} -template +template constexpr void - swap(basic_string& lhs, - basic_string& rhs) + swap(basic_string& lhs, + basic_string& rhs) noexcept(noexcept(lhs.swap(rhs))); \end{itemdecl} @@ -4990,9 +4990,9 @@ \indexlibrarymember{operator>>}{basic_string}% \begin{itemdecl} -template - basic_istream& - operator>>(basic_istream& is, basic_string& str); +template + basic_istream& + operator>>(basic_istream& is, basic_string& str); \end{itemdecl} \begin{itemdescr} @@ -5046,30 +5046,30 @@ \indexlibrarymember{operator<<}{basic_string}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, - const basic_string& str); +template + basic_ostream& + operator<<(basic_ostream& os, + const basic_string& str); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return os << basic_string_view(str);} +Equivalent to: \tcode{return os << basic_string_view(str);} \end{itemdescr} \indexlibrarymember{getline}{basic_string}% \begin{itemdecl} -template - basic_istream& - getline(basic_istream& is, - basic_string& str, - charT delim); -template - basic_istream& - getline(basic_istream&& is, - basic_string& str, - charT delim); +template + basic_istream& + getline(basic_istream& is, + basic_string& str, + CharT delim); +template + basic_istream& + getline(basic_istream&& is, + basic_string& str, + CharT delim); \end{itemdecl} \begin{itemdescr} @@ -5090,7 +5090,7 @@ \item end-of-file occurs on the input sequence; \item -\tcode{traits::eq(c, delim)} +\tcode{Traits::eq(c, delim)} for the next available input character \textit{c} (in which case, @@ -5122,14 +5122,14 @@ \indexlibrarymember{getline}{basic_string}% \begin{itemdecl} -template - basic_istream& - getline(basic_istream& is, - basic_string& str); -template - basic_istream& - getline(basic_istream&& is, - basic_string& str); +template + basic_istream& + getline(basic_istream& is, + basic_string& str); +template + basic_istream& + getline(basic_istream&& is, + basic_string& str); \end{itemdecl} \begin{itemdescr} @@ -5142,9 +5142,9 @@ \indexlibrarymember{erase}{basic_string}% \begin{itemdecl} -template - constexpr typename basic_string::size_type - erase(basic_string& c, const U& value); +template + constexpr typename basic_string::size_type + erase(basic_string& c, const U& value); \end{itemdecl} \begin{itemdescr} @@ -5161,9 +5161,9 @@ \indexlibrarymember{erase_if}{basic_string}% \begin{itemdecl} -template - constexpr typename basic_string::size_type - erase_if(basic_string& c, Predicate pred); +template + constexpr typename basic_string::size_type + erase_if(basic_string& c, Predicate pred); \end{itemdecl} \begin{itemdescr} diff --git a/source/text.tex b/source/text.tex index c8849531a3..1c69e03b59 100644 --- a/source/text.tex +++ b/source/text.tex @@ -387,70 +387,70 @@ template bool has_facet(const locale&) noexcept; // \ref{locale.convenience}, convenience interfaces - template bool isspace (charT c, const locale& loc); - template bool isprint (charT c, const locale& loc); - template bool iscntrl (charT c, const locale& loc); - template bool isupper (charT c, const locale& loc); - template bool islower (charT c, const locale& loc); - template bool isalpha (charT c, const locale& loc); - template bool isdigit (charT c, const locale& loc); - template bool ispunct (charT c, const locale& loc); - template bool isxdigit(charT c, const locale& loc); - template bool isalnum (charT c, const locale& loc); - template bool isgraph (charT c, const locale& loc); - template bool isblank (charT c, const locale& loc); - template charT toupper(charT c, const locale& loc); - template charT tolower(charT c, const locale& loc); + template bool isspace (CharT c, const locale& loc); + template bool isprint (CharT c, const locale& loc); + template bool iscntrl (CharT c, const locale& loc); + template bool isupper (CharT c, const locale& loc); + template bool islower (CharT c, const locale& loc); + template bool isalpha (CharT c, const locale& loc); + template bool isdigit (CharT c, const locale& loc); + template bool ispunct (CharT c, const locale& loc); + template bool isxdigit(CharT c, const locale& loc); + template bool isalnum (CharT c, const locale& loc); + template bool isgraph (CharT c, const locale& loc); + template bool isblank (CharT c, const locale& loc); + template CharT toupper(CharT c, const locale& loc); + template CharT tolower(CharT c, const locale& loc); // \ref{category.ctype}, ctype class ctype_base; - template class ctype; + template class ctype; template<> class ctype; // specialization - template class ctype_byname; + template class ctype_byname; class codecvt_base; template class codecvt; template class codecvt_byname; // \ref{category.numeric}, numeric - template> + template> class num_get; - template> + template> class num_put; - template + template class numpunct; - template + template class numpunct_byname; // \ref{category.collate}, collation - template class collate; - template class collate_byname; + template class collate; + template class collate_byname; // \ref{category.time}, date and time class time_base; - template> + template> class time_get; - template> + template> class time_get_byname; - template> + template> class time_put; - template> + template> class time_put_byname; // \ref{category.monetary}, money class money_base; - template> + template> class money_get; - template> + template> class money_put; - template + template class moneypunct; - template + template class moneypunct_byname; // \ref{category.messages}, message retrieval class messages_base; - template class messages; - template class messages_byname; + template class messages; + template class messages_byname; } \end{codeblock} @@ -506,9 +506,9 @@ bool operator==(const locale& other) const; - template - bool operator()(const basic_string& s1, - const basic_string& s2) const; + template + bool operator()(const basic_string& s1, + const basic_string& s2) const; // \ref{locale.statics}, global locale objects static locale global(const locale&); @@ -534,18 +534,18 @@ \begin{footnote} Note that in the call to \tcode{put}, the stream is implicitly converted -to an \tcode{ostreambuf_iterator}. +to an \tcode{ostreambuf_iterator}. \end{footnote} \begin{codeblock} -template -basic_ostream& -operator<< (basic_ostream& s, Date d) { - typename basic_ostream::sentry cerberos(s); +template +basic_ostream& +operator<< (basic_ostream& s, Date d) { + typename basic_ostream::sentry cerberos(s); if (cerberos) { tm tmbuf; d.extract(tmbuf); bool failed = - use_facet>>( + use_facet>>( s.getloc()).put(s, s, s.fill(), &tmbuf, 'x').failed(); if (failed) s.setstate(s.badbit); // can throw @@ -725,9 +725,9 @@ \pnum The provided implementation of members of -facets \tcode{num_get} and \tcode{num_put} +facets \tcode{num_get} and \tcode{num_put} calls \tcode{use_fac\-et(l)} only for facet \tcode{F} of -types \tcode{numpunct} and \tcode{ctype}, +types \tcode{numpunct} and \tcode{ctype}, and for locale \tcode{l} the value obtained by calling member \tcode{getloc()} on the \tcode{ios_base\&} argument to these functions. @@ -1078,20 +1078,20 @@ \indexlibrarymember{locale}{operator()}% \begin{itemdecl} -template - bool operator()(const basic_string& s1, - const basic_string& s2) const; +template + bool operator()(const basic_string& s1, + const basic_string& s2) const; \end{itemdecl} \begin{itemdescr} \pnum \effects -Compares two strings according to the \tcode{collate} facet. +Compares two strings according to the \tcode{collate} facet. \pnum \returns \begin{codeblock} -use_facet>(*this).compare(s1.data(), s1.data() + s1.size(), +use_facet>(*this).compare(s1.data(), s1.data() + s1.size(), s2.data(), s2.data() + s2.size()) < 0 \end{codeblock} @@ -1223,25 +1223,25 @@ \indexlibraryglobal{isgraph}% \indexlibraryglobal{isblank}% \begin{itemdecl} -template bool isspace (charT c, const locale& loc); -template bool isprint (charT c, const locale& loc); -template bool iscntrl (charT c, const locale& loc); -template bool isupper (charT c, const locale& loc); -template bool islower (charT c, const locale& loc); -template bool isalpha (charT c, const locale& loc); -template bool isdigit (charT c, const locale& loc); -template bool ispunct (charT c, const locale& loc); -template bool isxdigit(charT c, const locale& loc); -template bool isalnum (charT c, const locale& loc); -template bool isgraph (charT c, const locale& loc); -template bool isblank (charT c, const locale& loc); +template bool isspace (CharT c, const locale& loc); +template bool isprint (CharT c, const locale& loc); +template bool iscntrl (CharT c, const locale& loc); +template bool isupper (CharT c, const locale& loc); +template bool islower (CharT c, const locale& loc); +template bool isalpha (CharT c, const locale& loc); +template bool isdigit (CharT c, const locale& loc); +template bool ispunct (CharT c, const locale& loc); +template bool isxdigit(CharT c, const locale& loc); +template bool isalnum (CharT c, const locale& loc); +template bool isgraph (CharT c, const locale& loc); +template bool isblank (CharT c, const locale& loc); \end{itemdecl} \pnum Each of these functions \tcode{is\placeholder{F}} returns the result of the expression: \begin{codeblock} -use_facet>(loc).is(ctype_base::@\placeholder{F}@, c) +use_facet>(loc).is(ctype_base::@\placeholder{F}@, c) \end{codeblock} where \tcode{\placeholder{F}} is the \tcode{ctype_base::mask} value corresponding to that function\iref{category.ctype}. @@ -1255,24 +1255,24 @@ \indexlibraryglobal{toupper}% \begin{itemdecl} -template charT toupper(charT c, const locale& loc); +template CharT toupper(CharT c, const locale& loc); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{use_facet>(loc).toupper(c)}. +\tcode{use_facet>(loc).toupper(c)}. \end{itemdescr} \indexlibraryglobal{tolower}% \begin{itemdecl} -template charT tolower(charT c, const locale& loc); +template CharT tolower(CharT c, const locale& loc); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{use_facet>(loc).tolower(c)}. +\tcode{use_facet>(loc).tolower(c)}. \end{itemdescr} \rSec2[locale.categories]{Standard \tcode{locale} categories} @@ -1350,43 +1350,43 @@ \indexlibraryglobal{ctype}% \begin{codeblock} namespace std { - template + template class ctype : public locale::facet, public ctype_base { public: - using char_type = charT; + using char_type = CharT; explicit ctype(size_t refs = 0); - bool is(mask m, charT c) const; - const charT* is(const charT* low, const charT* high, mask* vec) const; - const charT* scan_is(mask m, const charT* low, const charT* high) const; - const charT* scan_not(mask m, const charT* low, const charT* high) const; - charT toupper(charT c) const; - const charT* toupper(charT* low, const charT* high) const; - charT tolower(charT c) const; - const charT* tolower(charT* low, const charT* high) const; + bool is(mask m, CharT c) const; + const CharT* is(const CharT* low, const CharT* high, mask* vec) const; + const CharT* scan_is(mask m, const CharT* low, const CharT* high) const; + const CharT* scan_not(mask m, const CharT* low, const CharT* high) const; + CharT toupper(CharT c) const; + const CharT* toupper(CharT* low, const CharT* high) const; + CharT tolower(CharT c) const; + const CharT* tolower(CharT* low, const CharT* high) const; - charT widen(char c) const; - const char* widen(const char* low, const char* high, charT* to) const; - char narrow(charT c, char dfault) const; - const charT* narrow(const charT* low, const charT* high, char dfault, char* to) const; + CharT widen(char c) const; + const char* widen(const char* low, const char* high, CharT* to) const; + char narrow(CharT c, char dfault) const; + const CharT* narrow(const CharT* low, const CharT* high, char dfault, char* to) const; static locale::id id; protected: ~ctype(); - virtual bool do_is(mask m, charT c) const; - virtual const charT* do_is(const charT* low, const charT* high, mask* vec) const; - virtual const charT* do_scan_is(mask m, const charT* low, const charT* high) const; - virtual const charT* do_scan_not(mask m, const charT* low, const charT* high) const; - virtual charT do_toupper(charT) const; - virtual const charT* do_toupper(charT* low, const charT* high) const; - virtual charT do_tolower(charT) const; - virtual const charT* do_tolower(charT* low, const charT* high) const; - virtual charT do_widen(char) const; - virtual const char* do_widen(const char* low, const char* high, charT* dest) const; - virtual char do_narrow(charT, char dfault) const; - virtual const charT* do_narrow(const charT* low, const charT* high, + virtual bool do_is(mask m, CharT c) const; + virtual const CharT* do_is(const CharT* low, const CharT* high, mask* vec) const; + virtual const CharT* do_scan_is(mask m, const CharT* low, const CharT* high) const; + virtual const CharT* do_scan_not(mask m, const CharT* low, const CharT* high) const; + virtual CharT do_toupper(CharT) const; + virtual const CharT* do_toupper(CharT* low, const CharT* high) const; + virtual CharT do_tolower(CharT) const; + virtual const CharT* do_tolower(CharT* low, const CharT* high) const; + virtual CharT do_widen(char) const; + virtual const char* do_widen(const char* low, const char* high, CharT* dest) const; + virtual char do_narrow(CharT, char dfault) const; + virtual const CharT* do_narrow(const CharT* low, const CharT* high, char dfault, char* dest) const; }; } @@ -1408,8 +1408,8 @@ \indexlibrarymember{ctype}{is}% \begin{itemdecl} -bool is(mask m, charT c) const; -const charT* is(const charT* low, const charT* high, mask* vec) const; +bool is(mask m, CharT c) const; +const CharT* is(const CharT* low, const CharT* high, mask* vec) const; \end{itemdecl} \begin{itemdescr} @@ -1420,7 +1420,7 @@ \indexlibrarymember{ctype}{scan_is}% \begin{itemdecl} -const charT* scan_is(mask m, const charT* low, const charT* high) const; +const CharT* scan_is(mask m, const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1431,7 +1431,7 @@ \indexlibrarymember{ctype}{scan_not}% \begin{itemdecl} -const charT* scan_not(mask m, const charT* low, const charT* high) const; +const CharT* scan_not(mask m, const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1442,8 +1442,8 @@ \indexlibrarymember{ctype}{toupper}% \begin{itemdecl} -charT toupper(charT c) const; -const charT* toupper(charT* low, const charT* high) const; +CharT toupper(CharT c) const; +const CharT* toupper(CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1454,8 +1454,8 @@ \indexlibrarymember{ctype}{tolower}% \begin{itemdecl} -charT tolower(charT c) const; -const charT* tolower(charT* low, const charT* high) const; +CharT tolower(CharT c) const; +const CharT* tolower(CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1466,8 +1466,8 @@ \indexlibrarymember{ctype}{widen}% \begin{itemdecl} -charT widen(char c) const; -const char* widen(const char* low, const char* high, charT* to) const; +CharT widen(char c) const; +const char* widen(const char* low, const char* high, CharT* to) const; \end{itemdecl} \begin{itemdescr} @@ -1478,8 +1478,8 @@ \indexlibrarymember{ctype}{narrow}% \begin{itemdecl} -char narrow(charT c, char dfault) const; -const charT* narrow(const charT* low, const charT* high, char dfault, char* to) const; +char narrow(CharT c, char dfault) const; +const CharT* narrow(const CharT* low, const CharT* high, char dfault, char* to) const; \end{itemdecl} \begin{itemdescr} @@ -1492,8 +1492,8 @@ \indexlibrarymember{ctype}{do_is}% \begin{itemdecl} -bool do_is(mask m, charT c) const; -const charT* do_is(const charT* low, const charT* high, mask* vec) const; +bool do_is(mask m, CharT c) const; +const CharT* do_is(const CharT* low, const CharT* high, mask* vec) const; \end{itemdecl} \begin{itemdescr} @@ -1515,7 +1515,7 @@ \indexlibrarymember{ctype_base}{do_scan_is}% \begin{itemdecl} -const charT* do_scan_is(mask m, const charT* low, const charT* high) const; +const CharT* do_scan_is(mask m, const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1532,7 +1532,7 @@ \indexlibrarymember{ctype}{do_scan_not}% \begin{itemdecl} -const charT* do_scan_not(mask m, const charT* low, const charT* high) const; +const CharT* do_scan_not(mask m, const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1550,8 +1550,8 @@ \indexlibrarymember{ctype}{do_toupper}% \begin{itemdecl} -charT do_toupper(charT c) const; -const charT* do_toupper(charT* low, const charT* high) const; +CharT do_toupper(CharT c) const; +const CharT* do_toupper(CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1573,8 +1573,8 @@ \indexlibrarymember{ctype}{do_tolower}% \begin{itemdecl} -charT do_tolower(charT c) const; -const charT* do_tolower(charT* low, const charT* high) const; +CharT do_tolower(CharT c) const; +const CharT* do_tolower(CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -1596,8 +1596,8 @@ \indexlibrarymember{ctype}{do_widen}% \begin{itemdecl} -charT do_widen(char c) const; -const char* do_widen(const char* low, const char* high, charT* dest) const; +CharT do_widen(char c) const; +const char* do_widen(const char* low, const char* high, CharT* dest) const; \end{itemdecl} \begin{itemdescr} @@ -1605,7 +1605,7 @@ \effects Applies the simplest reasonable transformation from a \tcode{char} value or sequence of \tcode{char} values -to the corresponding \tcode{charT} value or values. +to the corresponding \tcode{CharT} value or values. \begin{footnote} The parameter \tcode{c} of \tcode{do_widen} is intended to accept values derived from \grammarterm{character-literal}s @@ -1636,15 +1636,15 @@ \indexlibrarymember{ctype}{do_narrow}% \begin{itemdecl} -char do_narrow(charT c, char dfault) const; -const charT* do_narrow(const charT* low, const charT* high, char dfault, char* dest) const; +char do_narrow(CharT c, char dfault) const; +const CharT* do_narrow(const CharT* low, const CharT* high, char dfault, char* dest) const; \end{itemdecl} \begin{itemdescr} \pnum \effects Applies the simplest reasonable transformation -from a \tcode{charT} value or sequence of \tcode{charT} values +from a \tcode{CharT} value or sequence of \tcode{CharT} values to the corresponding \tcode{char} value or values. For any character \tcode{c} in the basic character set\iref{lex.charset} @@ -1681,10 +1681,10 @@ \indexlibraryglobal{ctype_byname}% \begin{codeblock} namespace std { - template - class ctype_byname : public ctype { + template + class ctype_byname : public ctype { public: - using mask = typename ctype::mask; + using mask = typename ctype::mask; explicit ctype_byname(const char*, size_t refs = 0); explicit ctype_byname(const string&, size_t refs = 0); @@ -2426,10 +2426,10 @@ \indexlibraryglobal{num_get}% \begin{codeblock} namespace std { - template> + template> class num_get : public locale::facet { public: - using char_type = charT; + using char_type = CharT; using iter_type = InputIterator; explicit num_get(size_t refs = 0); @@ -2557,8 +2557,8 @@ Reads characters from \tcode{in}, interpreting them according to \tcode{str.flags()}, -\tcode{use_facet>(loc)}, and -\tcode{use_facet>(loc)}, +\tcode{use_facet>(loc)}, and +\tcode{use_facet>(loc)}, where \tcode{loc} is \tcode{str.getloc()}. \pnum @@ -2631,22 +2631,22 @@ \stage{2} If \tcode{in == end} then stage 2 terminates. -Otherwise a \tcode{charT} is taken from \tcode{in} and +Otherwise a \tcode{CharT} is taken from \tcode{in} and local variables are initialized as if by \begin{codeblock} char_type ct = *in; char c = src[find(atoms, atoms + sizeof(src) - 1, ct) - atoms]; -if (ct == use_facet>(loc).decimal_point()) +if (ct == use_facet>(loc).decimal_point()) c = '.'; bool discard = - ct == use_facet>(loc).thousands_sep() - && use_facet>(loc).grouping().length() != 0; + ct == use_facet>(loc).thousands_sep() + && use_facet>(loc).grouping().length() != 0; \end{codeblock} where the values \tcode{src} and \tcode{atoms} are defined as if by: \begin{codeblock} static const char src[] = "0123456789abcdefpxABCDEFPX+-"; char_type atoms[sizeof(src)]; -use_facet>(loc).widen(src, src + sizeof(src), atoms); +use_facet>(loc).widen(src, src + sizeof(src), atoms); \end{codeblock} for this value of \tcode{loc}. @@ -2727,7 +2727,7 @@ Digit grouping is checked. That is, the positions of discarded separators are examined for consistency with -\tcode{use_facet>(loc).grouping()}. +\tcode{use_facet>(loc).grouping()}. If they are not consistent then \tcode{ios_base::failbit} is assigned to \tcode{err}. @@ -2758,7 +2758,7 @@ \pnum Otherwise target sequences are determined ``as if'' by calling the members \tcode{falsename()} and \tcode{truename()} of -the facet obtained by \tcode{use_facet>(str.getloc())}. +the facet obtained by \tcode{use_facet>(str.getloc())}. Successive characters in the range \range{in}{end} (see~\ref{sequence.reqmts}) are obtained and matched against corresponding positions in the target sequences @@ -2805,10 +2805,10 @@ \indexlibraryglobal{num_put}% \begin{codeblock} namespace std { - template> + template> class num_put : public locale::facet { public: - using char_type = charT; + using char_type = CharT; using iter_type = OutputIterator; explicit num_put(size_t refs = 0); @@ -2903,9 +2903,9 @@ \item Stage 2: Adjust the representation by converting -each \tcode{char} determined by stage 1 to a \tcode{charT} +each \tcode{char} determined by stage 1 to a \tcode{CharT} using a conversion and -values returned by members of \tcode{use_facet>(loc)}. +values returned by members of \tcode{use_facet>(loc)}. \item Stage 3: Determine where padding is required. @@ -3018,14 +3018,14 @@ \stage{2} Any character \tcode{c} other than a decimal point(.) is converted to -a \tcode{charT} via +a \tcode{CharT} via \begin{codeblock} -use_facet>(loc).widen(c) +use_facet>(loc).widen(c) \end{codeblock} A local variable \tcode{punct} is initialized via \begin{codeblock} -const numpunct& punct = use_facet>(loc); +const numpunct& punct = use_facet>(loc); \end{codeblock} For arithmetic types, @@ -3061,7 +3061,7 @@ \textit{otherwise} & pad before \\ \end{floattable} -If \tcode{str.width()} is nonzero and the number of \tcode{charT}'s +If \tcode{str.width()} is nonzero and the number of \tcode{CharT}'s in the sequence after stage 2 is less than \tcode{str.\brk{}width()}, then enough \tcode{fill} characters are added to the sequence at the position indicated for padding @@ -3070,7 +3070,7 @@ \tcode{str.width(0)} is called. \stage{4} -The sequence of \tcode{charT}'s at the end of stage 3 are output via +The sequence of \tcode{CharT}'s at the end of stage 3 are output via \begin{codeblock} *out++ = c \end{codeblock} @@ -3090,8 +3090,8 @@ otherwise obtains a string \tcode{s} as if by \begin{codeblock} string_type s = - val ? use_facet>(loc).truename() - : use_facet>(loc).falsename(); + val ? use_facet>(loc).truename() + : use_facet>(loc).falsename(); \end{codeblock} and then inserts each character \tcode{c} of \tcode{s} into \tcode{out} via \tcode{*out++ = c} @@ -3107,11 +3107,11 @@ \indexlibraryglobal{numpunct}% \begin{codeblock} namespace std { - template + template class numpunct : public locale::facet { public: - using char_type = charT; - using string_type = basic_string; + using char_type = CharT; + using string_type = basic_string; explicit numpunct(size_t refs = 0); @@ -3155,7 +3155,7 @@ where \locgrammarterm{digit} represents the radix set specified by the \tcode{fmtflags} argument value, and \locgrammarterm{thousands-sep} and \locgrammarterm{decimal-point} -are the results of corresponding \tcode{numpunct} members. +are the results of corresponding \tcode{numpunct} members. Integer values have the format: \begin{ncbnf} \locnontermdef{intval}\br @@ -3328,12 +3328,12 @@ \indexlibraryglobal{numpunct_byname}% \begin{codeblock} namespace std { - template - class numpunct_byname : public numpunct { + template + class numpunct_byname : public numpunct { // this class is specialized for \tcode{char} and \keyword{wchar_t}. public: - using char_type = charT; - using string_type = basic_string; + using char_type = CharT; + using string_type = basic_string; explicit numpunct_byname(const char*, size_t refs = 0); explicit numpunct_byname(const string&, size_t refs = 0); @@ -3353,33 +3353,33 @@ \indexlibraryglobal{collate}% \begin{codeblock} namespace std { - template + template class collate : public locale::facet { public: - using char_type = charT; - using string_type = basic_string; + using char_type = CharT; + using string_type = basic_string; explicit collate(size_t refs = 0); - int compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; - string_type transform(const charT* low, const charT* high) const; - long hash(const charT* low, const charT* high) const; + int compare(const CharT* low1, const CharT* high1, + const CharT* low2, const CharT* high2) const; + string_type transform(const CharT* low, const CharT* high) const; + long hash(const CharT* low, const CharT* high) const; static locale::id id; protected: ~collate(); - virtual int do_compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; - virtual string_type do_transform(const charT* low, const charT* high) const; - virtual long do_hash (const charT* low, const charT* high) const; + virtual int do_compare(const CharT* low1, const CharT* high1, + const CharT* low2, const CharT* high2) const; + virtual string_type do_transform(const CharT* low, const CharT* high) const; + virtual long do_hash (const CharT* low, const CharT* high) const; }; } \end{codeblock} \pnum -The class \tcode{collate} provides features +The class \tcode{collate} provides features for use in the collation (comparison) and hashing of strings. A locale member function template, \tcode{operator()}, uses the collate facet to allow a locale to act directly as @@ -3398,8 +3398,8 @@ \indexlibrarymember{collate}{compare}% \begin{itemdecl} -int compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; +int compare(const CharT* low1, const CharT* high1, + const CharT* low2, const CharT* high2) const; \end{itemdecl} \begin{itemdescr} @@ -3410,7 +3410,7 @@ \indexlibrarymember{collate}{transform}% \begin{itemdecl} -string_type transform(const charT* low, const charT* high) const; +string_type transform(const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -3421,7 +3421,7 @@ \indexlibrarymember{collate}{hash}% \begin{itemdecl} -long hash(const charT* low, const charT* high) const; +long hash(const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -3434,8 +3434,8 @@ \indexlibrarymember{collate}{do_compare}% \begin{itemdecl} -int do_compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; +int do_compare(const CharT* low1, const CharT* high1, + const CharT* low2, const CharT* high2) const; \end{itemdecl} \begin{itemdescr} @@ -3452,13 +3452,13 @@ \indexlibrarymember{collate}{do_transform}% \begin{itemdecl} -string_type do_transform(const charT* low, const charT* high) const; +string_type do_transform(const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} \pnum \returns -A \tcode{basic_string} value that, +A \tcode{basic_string} value that, compared lexicographically with the result of calling \tcode{transform()} on another string, yields the same result as calling \tcode{do_compare()} on the same two strings. @@ -3469,7 +3469,7 @@ \indexlibrarymember{collate}{do_hash}% \begin{itemdecl} -long do_hash(const charT* low, const charT* high) const; +long do_hash(const CharT* low, const CharT* high) const; \end{itemdecl} \begin{itemdescr} @@ -3491,10 +3491,10 @@ \indexlibraryglobal{collate_byname}% \begin{codeblock} namespace std { - template - class collate_byname : public collate { + template + class collate_byname : public collate { public: - using string_type = basic_string; + using string_type = basic_string; explicit collate_byname(const char*, size_t refs = 0); explicit collate_byname(const string&, size_t refs = 0); @@ -3511,8 +3511,8 @@ \pnum Templates -\tcode{time_get} and -\tcode{time_put} +\tcode{time_get} and +\tcode{time_put} provide date and time formatting and parsing. All specifications of member functions for \tcode{time_put} and \tcode{time_get} in the subclauses of~\ref{category.time} only apply to the @@ -3536,10 +3536,10 @@ enum dateorder { no_order, dmy, mdy, ymd, ydm }; }; - template> + template> class time_get : public locale::facet, public time_base { public: - using char_type = charT; + using char_type = CharT; using iter_type = InputIterator; explicit time_get(size_t refs = 0); @@ -3751,7 +3751,7 @@ \pnum \begin{note} -The function uses the \tcode{ctype} facet +The function uses the \tcode{ctype} facet installed in \tcode{f}'s locale to determine valid whitespace characters. It is unspecified @@ -3948,8 +3948,8 @@ \indexlibraryglobal{time_get_byname}% \begin{codeblock} namespace std { - template> - class time_get_byname : public time_get { + template> + class time_get_byname : public time_get { public: using dateorder = time_base::dateorder; using iter_type = InputIterator; @@ -3970,17 +3970,17 @@ \indexlibraryglobal{time_put}% \begin{codeblock} namespace std { - template> + template> class time_put : public locale::facet { public: - using char_type = charT; + using char_type = CharT; using iter_type = OutputIterator; explicit time_put(size_t refs = 0); // the following is implemented in terms of other member functions. iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb, - const charT* pattern, const charT* pat_end) const; + const CharT* pattern, const CharT* pat_end) const; iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb, char format, char modifier = 0) const; @@ -3999,7 +3999,7 @@ \indexlibrarymember{time_put}{put}% \begin{itemdecl} iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t, - const charT* pattern, const charT* pat_end) const; + const CharT* pattern, const CharT* pat_end) const; iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t, char format, char modifier = 0) const; \end{itemdecl} @@ -4017,7 +4017,7 @@ in the order in which they appear in the pattern. Format sequences are identified by converting each character \tcode{c} to a \tcode{char} value as if by \tcode{ct.narrow(c, 0)}, -where \tcode{ct} is a reference to \tcode{ctype} +where \tcode{ct} is a reference to \tcode{ctype} obtained from \tcode{str.getloc()}. The first character of each sequence is equal to \tcode{'\%'}, followed by an optional modifier character \tcode{mod} @@ -4091,10 +4091,10 @@ \indexlibraryglobal{time_put_byname}% \begin{codeblock} namespace std { - template> - class time_put_byname : public time_put { + template> + class time_put_byname : public time_put { public: - using char_type = charT; + using char_type = CharT; using iter_type = OutputIterator; explicit time_put_byname(const char*, size_t refs = 0); @@ -4133,12 +4133,12 @@ \indexlibraryglobal{money_get}% \begin{codeblock} namespace std { - template> + template> class money_get : public locale::facet { public: - using char_type = charT; + using char_type = CharT; using iter_type = InputIterator; - using string_type = basic_string; + using string_type = basic_string; explicit money_get(size_t refs = 0); @@ -4192,9 +4192,9 @@ \effects Reads characters from \tcode{s} to parse and construct a monetary value according to the format specified by -a \tcode{moneypunct} facet reference \tcode{mp} +a \tcode{moneypunct} facet reference \tcode{mp} and the character mapping specified by -a \tcode{ctype} facet reference \tcode{ct} +a \tcode{ctype} facet reference \tcode{ct} obtained from the locale returned by \tcode{str.getloc()}, and \tcode{str.flags()}. If a valid sequence is recognized, does not change \tcode{err}; @@ -4285,7 +4285,7 @@ the values \tcode{src} and \tcode{atoms} are defined as if by \begin{codeblock} static const char src[] = "0123456789-"; -charT atoms[sizeof(src)]; +CharT atoms[sizeof(src)]; ct.widen(src, src + sizeof(src) - 1, atoms); \end{codeblock} @@ -4302,12 +4302,12 @@ \indexlibraryglobal{money_put}% \begin{codeblock} namespace std { - template> + template> class money_put : public locale::facet { public: - using char_type = charT; + using char_type = CharT; using iter_type = OutputIterator; - using string_type = basic_string; + using string_type = basic_string; explicit money_put(size_t refs = 0); @@ -4357,9 +4357,9 @@ \effects Writes characters to \tcode{s} according to the format specified by -a \tcode{moneypunct} facet reference \tcode{mp} and +a \tcode{moneypunct} facet reference \tcode{mp} and the character mapping specified by -a \tcode{ctype} facet reference \tcode{ct} +a \tcode{ctype} facet reference \tcode{ct} obtained from the locale returned by \tcode{str.getloc()}, and \tcode{str.flags()}. The argument \tcode{units} is transformed into @@ -4426,16 +4426,16 @@ struct pattern { char field[4]; }; }; - template + template class moneypunct : public locale::facet, public money_base { public: - using char_type = charT; - using string_type = basic_string; + using char_type = CharT; + using string_type = basic_string; explicit moneypunct(size_t refs = 0); - charT decimal_point() const; - charT thousands_sep() const; + CharT decimal_point() const; + CharT thousands_sep() const; string grouping() const; string_type curr_symbol() const; string_type positive_sign() const; @@ -4449,8 +4449,8 @@ protected: ~moneypunct(); - virtual charT do_decimal_point() const; - virtual charT do_thousands_sep() const; + virtual CharT do_decimal_point() const; + virtual CharT do_thousands_sep() const; virtual string do_grouping() const; virtual string_type do_curr_symbol() const; virtual string_type do_positive_sign() const; @@ -4534,7 +4534,7 @@ In the syntax specification, the symbol \locgrammarterm{adigit} is any of the values \tcode{ct.widen(c)} for \tcode{c} in the range \tcode{'0'} through \tcode{'9'} (inclusive) and -\tcode{ct} is a reference of type \tcode{const ctype\&} +\tcode{ct} is a reference of type \tcode{const ctype\&} obtained as described in the definitions of \tcode{money_get<>} and \tcode{money_put<>}. The symbol \locgrammarterm{thousands-sep} @@ -4562,8 +4562,8 @@ \indexlibrarymember{moneypunct}{positive_sign}% \indexlibrarymember{moneypunct}{negative_sign}% \begin{codeblock} -charT decimal_point() const; -charT thousands_sep() const; +CharT decimal_point() const; +CharT thousands_sep() const; string grouping() const; string_type curr_symbol() const; string_type positive_sign() const; @@ -4583,7 +4583,7 @@ \indexlibrarymember{moneypunct}{do_decimal_point}% \begin{itemdecl} -charT do_decimal_point() const; +CharT do_decimal_point() const; \end{itemdecl} \begin{itemdescr} @@ -4598,7 +4598,7 @@ \indexlibrarymember{moneypunct}{do_thousands_sep}% \begin{itemdecl} -charT do_thousands_sep() const; +CharT do_thousands_sep() const; \end{itemdecl} \begin{itemdescr} @@ -4620,7 +4620,7 @@ \pnum \returns A pattern defined identically as, but not necessarily equal to, -the result of \tcode{numpunct::\brk{}do_grouping()}. +the result of \tcode{numpunct::\brk{}do_grouping()}. \begin{footnote} To specify grouping by 3s, the value is \tcode{"\textbackslash003"} \textit{not} \tcode{"3"}. @@ -4708,11 +4708,11 @@ \indexlibraryglobal{moneypunct_byname}% \begin{codeblock} namespace std { - template - class moneypunct_byname : public moneypunct { + template + class moneypunct_byname : public moneypunct { public: using pattern = money_base::pattern; - using string_type = basic_string; + using string_type = basic_string; explicit moneypunct_byname(const char*, size_t refs = 0); explicit moneypunct_byname(const string&, size_t refs = 0); @@ -4728,7 +4728,7 @@ \rSec4[category.messages.general]{General} \pnum -Class \tcode{messages} +Class \tcode{messages} implements retrieval of strings from message catalogs. \rSec4[locale.messages]{Class template \tcode{messages}} @@ -4743,11 +4743,11 @@ using catalog = @\textit{unspecified signed integer type}@; }; - template + template class messages : public locale::facet, public messages_base { public: - using char_type = charT; - using string_type = basic_string; + using char_type = CharT; + using string_type = basic_string; explicit messages(size_t refs = 0); @@ -4878,11 +4878,11 @@ \indexlibraryglobal{messages_byname}% \begin{codeblock} namespace std { - template - class messages_byname : public messages { + template + class messages_byname : public messages { public: using catalog = messages_base::catalog; - using string_type = basic_string; + using string_type = basic_string; explicit messages_byname(const char*, size_t refs = 0); explicit messages_byname(const string&, size_t refs = 0); @@ -5731,7 +5731,7 @@ \begin{codeblock} namespace std { // \ref{format.context}, class template \tcode{basic_format_context} - template class basic_format_context; + template class basic_format_context; using format_context = basic_format_context<@\unspec@, char>; using wformat_context = basic_format_context<@\unspec@, wchar_t>; @@ -5741,14 +5741,14 @@ using wformat_args = basic_format_args; // \ref{format.fmt.string}, class template \tcode{basic_format_string} - template + template struct basic_format_string; - template struct @\exposid{runtime-format-string}@ { // \expos + template struct @\exposid{runtime-format-string}@ { // \expos private: - basic_string_view @\exposid{str}@; // \expos + basic_string_view @\exposid{str}@; // \expos public: - @\exposid{runtime-format-string}@(basic_string_view s) noexcept : @\exposid{str}@(s) {} + @\exposid{runtime-format-string}@(basic_string_view s) noexcept : @\exposid{str}@(s) {} @\exposid{runtime-format-string}@(const @\exposid{runtime-format-string}@&) = delete; @\exposid{runtime-format-string}@& operator=(const @\exposid{runtime-format-string}@&) = delete; }; @@ -5822,27 +5822,27 @@ size_t formatted_size(const locale& loc, wformat_string fmt, Args&&... args); // \ref{format.formatter}, formatter - template struct formatter; + template struct formatter; // \ref{format.formatter.locking}, formatter locking template constexpr bool enable_nonlocking_formatter_optimization = false; // \ref{format.formattable}, concept \libconcept{formattable} - template + template concept formattable = @\seebelow@; - template + template concept @\defexposconcept{const-formattable-range}@ = // \expos ranges::@\libconcept{input_range}@ && - @\libconcept{formattable}@, charT>; + @\libconcept{formattable}@, CharT>; - template + template using @\exposid{fmt-maybe-const}@ = // \expos - conditional_t<@\exposconcept{const-formattable-range}@, const R, R>; + conditional_t<@\exposconcept{const-formattable-range}@, const R, R>; // \ref{format.parse.ctx}, class template \tcode{basic_format_parse_context} - template class basic_format_parse_context; + template class basic_format_parse_context; using format_parse_context = basic_format_parse_context; using wformat_parse_context = basic_format_parse_context; @@ -5865,19 +5865,19 @@ constexpr range_format format_kind = @\seebelow@; // \ref{format.range.formatter}, class template \tcode{range_formatter} - template - requires @\libconcept{same_as}@, T> && @\libconcept{formattable}@ + template + requires @\libconcept{same_as}@, T> && @\libconcept{formattable}@ class range_formatter; // \ref{format.range.fmtdef}, class template \exposid{range-default-formatter} - template + template struct @\exposid{range-default-formatter}@; // \expos // \ref{format.range.fmtmap}, \ref{format.range.fmtset}, \ref{format.range.fmtstr}, specializations for maps, sets, and strings - template + template requires (format_kind != range_format::disabled) && - @\libconcept{formattable}@, charT> - struct formatter : @\exposid{range-default-formatter}@, R, charT> { }; + @\libconcept{formattable}@, CharT> + struct formatter : @\exposid{range-default-formatter}@, R, CharT> { }; template requires (format_kind != range_format::disabled) @@ -5917,7 +5917,7 @@ \defnx{replacement fields}{replacement field!format string}, \defnx{escape sequences}{escape sequence!format string}, and characters other than \tcode{\{} and \tcode{\}}. -Let \tcode{charT} be the character type of the format string. +Let \tcode{CharT} be the character type of the format string. Each character that is not part of a replacement field or an escape sequence is copied unchanged to the output. @@ -6177,7 +6177,7 @@ by inserting $n$ fill characters after the formatted argument where $n$ is the padding width. This is the default for -non-arithmetic non-pointer types, \tcode{charT}, and \tcode{bool}, +non-arithmetic non-pointer types, \tcode{CharT}, and \tcode{bool}, unless an integer presentation type is specified. \\ \rowsep % @@ -6186,7 +6186,7 @@ by inserting $n$ fill characters before the formatted argument where $n$ is the padding width. This is the default for -arithmetic types other than \tcode{charT} and \tcode{bool}, +arithmetic types other than \tcode{CharT} and \tcode{bool}, pointer types, or when an integer presentation type is specified. \\ \rowsep @@ -6204,7 +6204,7 @@ \pnum The \fmtgrammarterm{sign} option is only valid -for arithmetic types other than \tcode{charT} and \tcode{bool} +for arithmetic types other than \tcode{CharT} and \tcode{bool} or when an integer presentation type is specified. The meaning of the various options is as specified in \tref{format.sign}. @@ -6254,7 +6254,7 @@ \defnx{alternate form}{alternate form!format string} to be used for the conversion. This option is valid for arithmetic types other than -\tcode{charT} and \tcode{bool} +\tcode{CharT} and \tcode{bool} or when an integer presentation type is specified, and not otherwise. For integral types, the alternate form inserts the @@ -6275,7 +6275,7 @@ \pnum The \tcode{0} option is valid for arithmetic types -other than \tcode{charT} and \tcode{bool}, pointer types, or +other than \tcode{CharT} and \tcode{bool}, pointer types, or when an integer presentation type is specified. For formatting arguments that have a value other than an infinity or a NaN, @@ -6431,7 +6431,7 @@ \pnum The available integer presentation types -for integral types other than \tcode{bool} and \tcode{charT} +for integral types other than \tcode{bool} and \tcode{CharT} are specified in \tref{format.type.int}. \begin{example} \begin{codeblock} @@ -6459,9 +6459,9 @@ \\ \rowsep % \tcode{c} & -Copies the character \tcode{static_cast(value)} to the output. +Copies the character \tcode{static_cast(value)} to the output. Throws \tcode{format_error} if \tcode{value} is not -in the range of representable values for \tcode{charT}. +in the range of representable values for \tcode{CharT}. \\ \rowsep % \tcode{d} & @@ -6490,16 +6490,16 @@ none & The same as \tcode{d}. \begin{tailnote} -If the formatting argument type is \tcode{charT} or \tcode{bool}, +If the formatting argument type is \tcode{CharT} or \tcode{bool}, the default is instead \tcode{c} or \tcode{s}, respectively. \end{tailnote} \\ \end{floattable} \pnum -The available \tcode{charT} presentation types are specified in \tref{format.type.char}. +The available \tcode{CharT} presentation types are specified in \tref{format.type.char}. % -\begin{floattable}{Meaning of \fmtgrammarterm{type} options for \tcode{charT}}{format.type.char}{lp{.8\hsize}} +\begin{floattable}{Meaning of \fmtgrammarterm{type} options for \tcode{CharT}}{format.type.char}{lp{.8\hsize}} \topline \lhdr{Type} & \rhdr{Meaning} \\ \rowsep none, \tcode{c} & @@ -6658,16 +6658,16 @@ \begin{codeblock} namespace std { - template + template struct @\libglobal{basic_format_string}@ { private: - basic_string_view @\exposidnc{str}@; // \expos + basic_string_view @\exposidnc{str}@; // \expos public: template consteval basic_format_string(const T& s); - basic_format_string(@\exposid{runtime-format-string}@ s) noexcept : str(s.@\exposid{str}@) {} + basic_format_string(@\exposid{runtime-format-string}@ s) noexcept : str(s.@\exposid{str}@) {} - constexpr basic_string_view get() const noexcept { return @\exposid{str}@; } + constexpr basic_string_view get() const noexcept { return @\exposid{str}@; } }; } \end{codeblock} @@ -6679,7 +6679,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{const T\&} models \tcode{\libconcept{convertible_to}>}. +\tcode{const T\&} models \tcode{\libconcept{convertible_to}>}. \pnum \effects @@ -6855,15 +6855,15 @@ \begin{itemdescr} \pnum -Let \tcode{charT} be \tcode{decltype(fmt)::value_type}. +Let \tcode{CharT} be \tcode{decltype(fmt)::value_type}. \pnum \constraints -\tcode{Out} satisfies \tcode{\libconcept{output_iterator}}. +\tcode{Out} satisfies \tcode{\libconcept{output_iterator}}. \pnum \expects -\tcode{Out} models \tcode{\libconcept{output_iterator}}. +\tcode{Out} models \tcode{\libconcept{output_iterator}}. \pnum \effects @@ -6905,7 +6905,7 @@ \pnum Let \begin{itemize} -\item \tcode{charT} be \tcode{decltype(fmt.\exposid{str})::value_type}, +\item \tcode{CharT} be \tcode{decltype(fmt.\exposid{str})::value_type}, \item \tcode{N} be \tcode{formatted_size(fmt, args...)} for the functions without a \tcode{loc} parameter and \tcode{formatted_size(loc, fmt, args...)} for the functions with a \tcode{loc} parameter, and @@ -6914,12 +6914,12 @@ \pnum \constraints -\tcode{Out} satisfies \tcode{\libconcept{output_iterator}}. +\tcode{Out} satisfies \tcode{\libconcept{output_iterator}}. \pnum \expects -\tcode{Out} models \tcode{\libconcept{output_iterator}}, and -\tcode{formatter<}$\tcode{remove_cvref_t, charT>} +\tcode{Out} models \tcode{\libconcept{output_iterator}}, and +\tcode{formatter<}$\tcode{remove_cvref_t, CharT>} meets the \newoldconcept{BasicFormatter} requirements\iref{formatter.requirements} for each $\tcode{T}_i$ in \tcode{Args}. @@ -6954,11 +6954,11 @@ \begin{itemdescr} \pnum -Let \tcode{charT} be \tcode{decltype(fmt.\exposid{str})::value_type}. +Let \tcode{CharT} be \tcode{decltype(fmt.\exposid{str})::value_type}. \pnum \expects -\tcode{formatter<}$\tcode{remove_cvref_t, charT>} +\tcode{formatter<}$\tcode{remove_cvref_t, CharT>} meets the \newoldconcept{BasicFormatter} requirements\iref{formatter.requirements} for each $\tcode{T}_i$ in \tcode{Args}. @@ -6999,7 +6999,7 @@ have the indicated semantics. \pnum -Given character type \tcode{charT}, output iterator type +Given character type \tcode{CharT}, output iterator type \tcode{Out}, and formatting argument type \tcode{T}, in \tref{formatter.basic} and \tref{formatter}: \begin{itemize} @@ -7007,8 +7007,8 @@ \item \tcode{g} is an lvalue of type \tcode{F}, \item \tcode{u} is an lvalue of type \tcode{T}, \item \tcode{t} is a value of a type convertible to (possibly const) \tcode{T}, -\item \tcode{PC} is \tcode{basic_format_parse_context}, -\item \tcode{FC} is \tcode{basic_format_context}, +\item \tcode{PC} is \tcode{basic_format_parse_context}, +\item \tcode{FC} is \tcode{basic_format_context}, \item \tcode{pc} is an lvalue of type \tcode{PC}, and \item \tcode{fc} is an lvalue of type \tcode{FC}. \end{itemize} @@ -7095,9 +7095,9 @@ \rSec3[format.formattable]{Concept \cname{formattable}} \pnum -Let \tcode{\placeholder{fmt-iter-for}} be an unspecified type +Let \tcode{\placeholder{fmt-iter-for}} be an unspecified type that models -\tcode{\libconcept{output_iterator}}\iref{iterator.concept.output}. +\tcode{\libconcept{output_iterator}}\iref{iterator.concept.output}. \begin{codeblock} template @\libconcept{same_as}@; }; -template +template concept @\deflibconcept{formattable}@ = - @\exposconcept{formattable-with}@, basic_format_context<@\placeholder{fmt-iter-for}@, charT>>; + @\exposconcept{formattable-with}@, basic_format_context<@\placeholder{fmt-iter-for}@, CharT>>; \end{codeblock} \pnum -A type \tcode{T} and a character type \tcode{charT} +A type \tcode{T} and a character type \tcode{CharT} model \libconcept{formattable} -if \tcode{formatter, charT>} meets +if \tcode{formatter, CharT>} meets the \newoldconcept{BasicFormatter} requirements\iref{formatter.requirements} and, if \tcode{remove_reference_t} is const-qualified, the \newoldconcept{Formatter} requirements. @@ -7134,7 +7134,7 @@ individual arguments. \pnum -Let \tcode{charT} be either \tcode{char} or \keyword{wchar_t}. +Let \tcode{CharT} be either \tcode{char} or \keyword{wchar_t}. Each specialization of \tcode{formatter} is either enabled or disabled, as described below. \indextext{\idxcode{formatter}!debug-enabled specialization of}% @@ -7158,21 +7158,21 @@ \item \indexlibrary{\idxcode{formatter}!specializations!string types}% -For each \tcode{charT}, +For each \tcode{CharT}, the debug-enabled string type specializations \begin{codeblock} -template<> struct formatter; -template<> struct formatter; -template struct formatter; -template - struct formatter, charT>; -template - struct formatter, charT>; +template<> struct formatter; +template<> struct formatter; +template struct formatter; +template + struct formatter, CharT>; +template + struct formatter, CharT>; \end{codeblock} \item \indexlibrary{\idxcode{formatter}!specializations!arithmetic types}% -For each \tcode{charT}, +For each \tcode{CharT}, for each cv-unqualified arithmetic type \tcode{ArithmeticT} other than \tcode{char}, @@ -7182,18 +7182,18 @@ \keyword{char32_t}, a specialization \begin{codeblock} -template<> struct formatter; +template<> struct formatter; \end{codeblock} \item \indexlibrary{\idxcode{formatter}!specializations!pointer types}% \indexlibrary{\idxcode{formatter}!specializations!\idxcode{nullptr_t}}% -For each \tcode{charT}, +For each \tcode{CharT}, the pointer type specializations \begin{codeblock} -template<> struct formatter; -template<> struct formatter; -template<> struct formatter; +template<> struct formatter; +template<> struct formatter; +template<> struct formatter; \end{codeblock} \end{itemize} The \tcode{parse} member functions of these formatters @@ -7224,23 +7224,23 @@ template<> struct formatter; template<> struct formatter; template struct formatter; -template - struct formatter, wchar_t>; -template - struct formatter, wchar_t>; +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 +For any types \tcode{T} and \tcode{CharT} for which neither the library nor the user provides an explicit or partial specialization of the class template \tcode{formatter}, -\tcode{formatter} is disabled. +\tcode{formatter} is disabled. \pnum If the library provides an explicit or partial specialization of -\tcode{formatter}, that specialization is enabled +\tcode{formatter}, that specialization is enabled and meets the \newoldconcept{Formatter} requirements except as noted otherwise. @@ -7256,7 +7256,7 @@ \end{itemize} \pnum -An enabled specialization \tcode{formatter} meets the +An enabled specialization \tcode{formatter} meets the \newoldconcept{BasicFormatter} requirements\iref{formatter.requirements}. \begin{example} \begin{codeblock} @@ -7293,7 +7293,7 @@ The escaped string \placeholder{E} representation of a string \placeholder{S} is constructed by encoding a sequence of characters as follows. The associated character encoding \placeholder{CE} -for \tcode{charT}~(\tref{lex.string.literal}) +for \tcode{CharT}~(\tref{lex.string.literal}) is used to both interpret \placeholder{S} and construct \placeholder{E}. \begin{itemize} @@ -7444,11 +7444,11 @@ \indexlibrarymember{iterator}{basic_format_parse_context}% \begin{codeblock} namespace std { - template + template class basic_format_parse_context { public: - using char_type = charT; - using const_iterator = typename basic_string_view::const_iterator; + using char_type = CharT; + using const_iterator = typename basic_string_view::const_iterator; using iterator = const_iterator; private: @@ -7460,7 +7460,7 @@ size_t num_args_; // \expos public: - constexpr explicit basic_format_parse_context(basic_string_view fmt) noexcept; + constexpr explicit basic_format_parse_context(basic_string_view fmt) noexcept; basic_format_parse_context(const basic_format_parse_context&) = delete; basic_format_parse_context& operator=(const basic_format_parse_context&) = delete; @@ -7492,7 +7492,7 @@ \indexlibraryctor{basic_format_parse_context}% \begin{itemdecl} -constexpr explicit basic_format_parse_context(basic_string_view fmt) noexcept; +constexpr explicit basic_format_parse_context(basic_string_view fmt) noexcept; \end{itemdecl} \begin{itemdescr} @@ -7679,7 +7679,7 @@ \indexlibrarymember{formatter_type}{basic_format_context}% \begin{codeblock} namespace std { - template + template class basic_format_context { basic_format_args args_; // \expos Out out_; // \expos @@ -7689,8 +7689,8 @@ public: using iterator = Out; - using char_type = charT; - template using formatter_type = formatter; + using char_type = CharT; + template using formatter_type = formatter; basic_format_arg arg(size_t id) const noexcept; std::locale locale(); @@ -7711,7 +7711,7 @@ the program is ill-formed, no diagnostic required. \pnum -\tcode{Out} shall model \tcode{\libconcept{output_iterator}}. +\tcode{Out} shall model \tcode{\libconcept{output_iterator}}. \pnum \indexlibraryglobal{format_context}% @@ -7728,15 +7728,15 @@ \pnum \recommended -For a given type \tcode{charT}, +For a given type \tcode{CharT}, implementations should provide a single instantiation of \tcode{basic_format_context} for appending to -\tcode{basic_string}, -\tcode{vector}, +\tcode{basic_string}, +\tcode{vector}, or any other container with contiguous storage by wrapping those in temporary objects with a uniform interface -(such as a \tcode{span}) and polymorphic reallocation. +(such as a \tcode{span}) and polymorphic reallocation. \indexlibrarymember{arg}{basic_format_context}% \begin{itemdecl} @@ -7890,27 +7890,27 @@ \indexlibraryglobal{range_formatter}% \begin{codeblock} namespace std { - template - requires @\libconcept{same_as}@, T> && @\libconcept{formattable}@ + template + requires @\libconcept{same_as}@, T> && @\libconcept{formattable}@ class range_formatter { - formatter @\exposid{underlying_}@; // \expos - basic_string_view @\exposid{separator_}@ = @\exposid{STATICALLY-WIDEN}@(", "); // \expos - basic_string_view @\exposid{opening-bracket_}@ = @\exposid{STATICALLY-WIDEN}@("["); // \expos - basic_string_view @\exposid{closing-bracket_}@ = @\exposid{STATICALLY-WIDEN}@("]"); // \expos + formatter @\exposid{underlying_}@; // \expos + basic_string_view @\exposid{separator_}@ = @\exposid{STATICALLY-WIDEN}@(", "); // \expos + basic_string_view @\exposid{opening-bracket_}@ = @\exposid{STATICALLY-WIDEN}@("["); // \expos + basic_string_view @\exposid{closing-bracket_}@ = @\exposid{STATICALLY-WIDEN}@("]"); // \expos public: - constexpr void set_separator(basic_string_view sep) noexcept; - constexpr void set_brackets(basic_string_view opening, - basic_string_view closing) noexcept; - constexpr formatter& underlying() noexcept { return @\exposid{underlying_}@; } - constexpr const formatter& underlying() const noexcept { return @\exposid{underlying_}@; } + constexpr void set_separator(basic_string_view sep) noexcept; + constexpr void set_brackets(basic_string_view opening, + basic_string_view closing) noexcept; + constexpr formatter& underlying() noexcept { return @\exposid{underlying_}@; } + constexpr const formatter& underlying() const noexcept { return @\exposid{underlying_}@; } template constexpr typename ParseContext::iterator parse(ParseContext& ctx); template - requires @\libconcept{formattable}@, charT> && + requires @\libconcept{formattable}@, CharT> && @\libconcept{same_as}@>, T> typename FormatContext::iterator format(R&& r, FormatContext& ctx) const; @@ -7955,10 +7955,10 @@ \end{ncbnf} \pnum -For \tcode{range_formatter}, +For \tcode{range_formatter}, the \fmtgrammarterm{format-spec} in a \fmtgrammarterm{range-underlying-spec}, if any, -is interpreted by \tcode{formatter}. +is interpreted by \tcode{formatter}. \pnum The \fmtgrammarterm{range-fill-and-align} is interpreted @@ -8001,12 +8001,12 @@ \\ \rowsep % \tcode{s} & -\tcode{T} shall be \tcode{charT}. & +\tcode{T} shall be \tcode{CharT}. & Indicates that the range should be formatted as a \tcode{string}. \\ \rowsep % \tcode{?s} & -\tcode{T} shall be \tcode{charT}. & +\tcode{T} shall be \tcode{CharT}. & Indicates that the range should be formatted as an escaped string\iref{format.string.escaped}. \\ @@ -8018,7 +8018,7 @@ \indexlibrarymember{set_separator}{range_formatter}% \begin{itemdecl} -constexpr void set_separator(basic_string_view sep) noexcept; +constexpr void set_separator(basic_string_view sep) noexcept; \end{itemdecl} \begin{itemdescr} @@ -8029,8 +8029,8 @@ \indexlibrarymember{set_brackets}{range_formatter}% \begin{itemdecl} -constexpr void set_brackets(basic_string_view opening, - basic_string_view closing) noexcept; +constexpr void set_brackets(basic_string_view opening, + basic_string_view closing) noexcept; \end{itemdecl} \begin{itemdescr} @@ -8081,7 +8081,7 @@ \indexlibrarymember{format}{range_formatter}% \begin{itemdecl} template - requires @\libconcept{formattable}@, charT> && + requires @\libconcept{formattable}@, CharT> && @\libconcept{same_as}@>, T> typename FormatContext::iterator format(R&& r, FormatContext& ctx) const; @@ -8096,10 +8096,10 @@ \begin{itemize} \item If the \fmtgrammarterm{range-type} was \tcode{s}, -then as if by formatting \tcode{basic_string(from_range, r)}. +then as if by formatting \tcode{basic_string(from_range, r)}. \item Otherwise, if the \fmtgrammarterm{range-type} was \tcode{?s}, -then as if by formatting \tcode{basic_string(from_range, r)} +then as if by formatting \tcode{basic_string(from_range, r)} as an escaped string\iref{format.string.escaped}. \item Otherwise, @@ -8129,17 +8129,17 @@ \indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { - template - struct @\exposidnc{range-default-formatter}@ { // \expos + template + struct @\exposidnc{range-default-formatter}@ { // \expos private: - using @\exposidnc{maybe-const-r}@ = @\exposidnc{fmt-maybe-const}@; // \expos + using @\exposidnc{maybe-const-r}@ = @\exposidnc{fmt-maybe-const}@; // \expos range_formatter>, - charT> @\exposid{underlying_}@; // \expos + CharT> @\exposid{underlying_}@; // \expos public: - constexpr void set_separator(basic_string_view sep) noexcept; - constexpr void set_brackets(basic_string_view opening, - basic_string_view closing) noexcept; + constexpr void set_separator(basic_string_view sep) noexcept; + constexpr void set_brackets(basic_string_view opening, + basic_string_view closing) noexcept; template constexpr typename ParseContext::iterator @@ -8154,7 +8154,7 @@ \indexlibrarymemberexpos{set_separator}{range-default-formatter}% \begin{itemdecl} -constexpr void set_separator(basic_string_view sep) noexcept; +constexpr void set_separator(basic_string_view sep) noexcept; \end{itemdecl} \begin{itemdescr} @@ -8165,8 +8165,8 @@ \indexlibrarymemberexpos{set_brackets}{range-default-formatter}% \begin{itemdecl} -constexpr void set_brackets(basic_string_view opening, - basic_string_view closing) noexcept; +constexpr void set_brackets(basic_string_view opening, + basic_string_view closing) noexcept; \end{itemdecl} \begin{itemdescr} @@ -8206,13 +8206,13 @@ \indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { - template - struct @\exposid{range-default-formatter}@ { + template + struct @\exposid{range-default-formatter}@ { private: - using @\exposidnc{maybe-const-map}@ = @\exposidnc{fmt-maybe-const}@; // \expos + using @\exposidnc{maybe-const-map}@ = @\exposidnc{fmt-maybe-const}@; // \expos using @\exposidnc{element-type}@ = // \expos remove_cvref_t>; - range_formatter<@\exposidnc{element-type}@, charT> @\exposid{underlying_}@; // \expos + range_formatter<@\exposidnc{element-type}@, CharT> @\exposid{underlying_}@; // \expos public: constexpr @\exposid{range-default-formatter}@(); @@ -8249,9 +8249,9 @@ \effects Equivalent to: \begin{codeblock} -@\exposid{underlying_}@.set_brackets(@\exposid{STATICALLY-WIDEN}@("{"), @\exposid{STATICALLY-WIDEN}@("}")); +@\exposid{underlying_}@.set_brackets(@\exposid{STATICALLY-WIDEN}@("{"), @\exposid{STATICALLY-WIDEN}@("}")); @\exposid{underlying_}@.underlying().set_brackets({}, {}); -@\exposid{underlying_}@.underlying().set_separator(@\exposid{STATICALLY-WIDEN}@(": ")); +@\exposid{underlying_}@.underlying().set_separator(@\exposid{STATICALLY-WIDEN}@(": ")); \end{codeblock} \end{itemdescr} @@ -8286,12 +8286,12 @@ \indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { - template - struct @\exposid{range-default-formatter}@ { + template + struct @\exposid{range-default-formatter}@ { private: - using @\exposidnc{maybe-const-set}@ = @\exposidnc{fmt-maybe-const}@; // \expos + using @\exposidnc{maybe-const-set}@ = @\exposidnc{fmt-maybe-const}@; // \expos range_formatter>, - charT> @\exposid{underlying_}@; // \expos + CharT> @\exposid{underlying_}@; // \expos public: constexpr @\exposid{range-default-formatter}@(); @@ -8317,7 +8317,7 @@ \effects Equivalent to: \begin{codeblock} -@\exposid{underlying_}@.set_brackets(@\exposid{STATICALLY-WIDEN}@("{"), @\exposid{STATICALLY-WIDEN}@("}")); +@\exposid{underlying_}@.set_brackets(@\exposid{STATICALLY-WIDEN}@("{"), @\exposid{STATICALLY-WIDEN}@("}")); \end{codeblock} \end{itemdescr} @@ -8352,11 +8352,11 @@ \indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { - template + template requires (K == range_format::string || K == range_format::debug_string) - struct @\exposid{range-default-formatter}@ { + struct @\exposid{range-default-formatter}@ { private: - formatter, charT> @\exposid{underlying_}@; // \expos + formatter, CharT> @\exposid{underlying_}@; // \expos public: template @@ -8372,7 +8372,7 @@ \pnum \mandates -\tcode{\libconcept{same_as}>, charT>} +\tcode{\libconcept{same_as}>, CharT>} is \tcode{true}. \indexlibrarymemberexpos{parse}{range-default-formatter}% @@ -8410,7 +8410,7 @@ \pnum \effects -Let \tcode{\placeholder{s}} be a \tcode{basic_string} such that +Let \tcode{\placeholder{s}} be a \tcode{basic_string} such that \tcode{ranges::equal(\placeholder{s}, r)} is \tcode{true}. Equivalent to: \tcode{return \exposid{underlying_}.format(\placeholder{s}, ctx);} \end{itemdescr} @@ -8760,18 +8760,18 @@ \indexlibraryglobal{formatter}% \begin{codeblock} namespace std { - template... Ts> - struct formatter<@\placeholder{pair-or-tuple}@, charT> { + template... Ts> + struct formatter<@\placeholder{pair-or-tuple}@, CharT> { private: - tuple, charT>...> @\exposid{underlying_}@; // \expos - basic_string_view @\exposid{separator_}@ = @\exposid{STATICALLY-WIDEN}@(", "); // \expos - basic_string_view @\exposid{opening-bracket_}@ = @\exposid{STATICALLY-WIDEN}@("("); // \expos - basic_string_view @\exposid{closing-bracket_}@ = @\exposid{STATICALLY-WIDEN}@(")"); // \expos + tuple, CharT>...> @\exposid{underlying_}@; // \expos + basic_string_view @\exposid{separator_}@ = @\exposid{STATICALLY-WIDEN}@(", "); // \expos + basic_string_view @\exposid{opening-bracket_}@ = @\exposid{STATICALLY-WIDEN}@("("); // \expos + basic_string_view @\exposid{closing-bracket_}@ = @\exposid{STATICALLY-WIDEN}@(")"); // \expos public: - constexpr void set_separator(basic_string_view sep) noexcept; - constexpr void set_brackets(basic_string_view opening, - basic_string_view closing) noexcept; + constexpr void set_separator(basic_string_view sep) noexcept; + constexpr void set_brackets(basic_string_view opening, + basic_string_view closing) noexcept; template constexpr typename ParseContext::iterator @@ -8836,7 +8836,7 @@ \tcode{sizeof...(Ts) == 2} & Equivalent to: \begin{codeblock} -set_separator(@\exposid{STATICALLY-WIDEN}@(": ")); +set_separator(@\exposid{STATICALLY-WIDEN}@(": ")); set_brackets({}, {}); \end{codeblock}% \\ \rowsep @@ -8854,7 +8854,7 @@ \indexlibrarymember{set_separator}{formatter}% \begin{itemdecl} -constexpr void set_separator(basic_string_view sep) noexcept; +constexpr void set_separator(basic_string_view sep) noexcept; \end{itemdecl} \begin{itemdescr} @@ -8865,8 +8865,8 @@ \indexlibrarymember{set_brackets}{formatter}% \begin{itemdecl} -constexpr void set_brackets(basic_string_view opening, - basic_string_view closing) noexcept; +constexpr void set_brackets(basic_string_view opening, + basic_string_view closing) noexcept; \end{itemdecl} \begin{itemdescr} @@ -8920,7 +8920,7 @@ The type of \tcode{elems} is: \begin{itemize} \item -If \tcode{(\libconcept{formattable} \&\& ...)} is \tcode{true}, +If \tcode{(\libconcept{formattable} \&\& ...)} is \tcode{true}, \tcode{const \placeholder{pair-or-tuple}\&}. \item Otherwise \tcode{\placeholder{pair-or-tuple}\&}. @@ -9043,7 +9043,7 @@ \ref{re.regex}, needs a set of related types and functions to complete the definition of its semantics. These types and functions are provided as a set of member \grammarterm{typedef-name}{s} and functions -in the template parameter \tcode{traits} used by the \tcode{basic_regex} class +in the template parameter \tcode{Traits} used by the \tcode{basic_regex} class template. This subclause defines the semantics of these members. @@ -9061,19 +9061,19 @@ \begin{itemize} \item \tcode{X} denotes a traits class defining types and functions -for the character container type \tcode{charT}; +for the character container type \tcode{CharT}; \item \tcode{u} is an object of type \tcode{X}; \item \tcode{v} is an object of type \tcode{const X}; \item -\tcode{p} is a value of type \tcode{const charT*}; +\tcode{p} is a value of type \tcode{const CharT*}; \item \tcode{I1} and \tcode{I2} are input iterators\iref{input.iterators}; \item \tcode{F1} and \tcode{F2} are forward iterators\iref{forward.iterators}; \item -\tcode{c} is a value of type \tcode{const charT}; +\tcode{c} is a value of type \tcode{const CharT}; \item \tcode{s} is an object of type \tcode{X::string_type}; \item @@ -9100,7 +9100,7 @@ \begin{itemdescr} \pnum \result -\tcode{charT}, +\tcode{CharT}, the character container type used in the implementation of class template \tcode{basic_regex}. \end{itemdescr} @@ -9112,7 +9112,7 @@ \begin{itemdescr} \pnum \result -\tcode{basic_string} +\tcode{basic_string} \end{itemdescr} \begin{itemdecl} @@ -9365,17 +9365,17 @@ class regex_error; // \ref{re.traits}, class template \tcode{regex_traits} - template struct regex_traits; + template struct regex_traits; // \ref{re.regex}, class template \tcode{basic_regex} - template> class basic_regex; + template> class basic_regex; using regex = basic_regex; using wregex = basic_regex; // \ref{re.regex.swap}, \tcode{basic_regex} swap - template - void swap(basic_regex& e1, basic_regex& e2); + template + void swap(basic_regex& e1, basic_regex& e2); // \ref{re.submatch}, class template \tcode{sub_match} template @@ -9415,9 +9415,9 @@ auto operator<=>(const sub_match& lhs, const typename iterator_traits::value_type& rhs); - template - basic_ostream& - operator<<(basic_ostream& os, const sub_match& m); + template + basic_ostream& + operator<<(basic_ostream& os, const sub_match& m); // \ref{re.results}, class template \tcode{match_results} template& m2); // \ref{re.alg.match}, function template \tcode{regex_match} - template + template bool regex_match(BidirectionalIterator first, BidirectionalIterator last, match_results& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template + template bool regex_match(BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_match(const charT* str, match_results& m, - const basic_regex& e, + template + bool regex_match(const CharT* str, match_results& m, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_match(const basic_string& s, - match_results::const_iterator, + template + bool regex_match(const basic_string& s, + match_results::const_iterator, Allocator>& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_match(const basic_string&&, - match_results::const_iterator, + template + bool regex_match(const basic_string&&, + match_results::const_iterator, Allocator>&, - const basic_regex&, + const basic_regex&, regex_constants::match_flag_type = regex_constants::match_default) = delete; - template - bool regex_match(const charT* str, - const basic_regex& e, + template + bool regex_match(const CharT* str, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_match(const basic_string& s, - const basic_regex& e, + template + bool regex_match(const basic_string& s, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); // \ref{re.alg.search}, function template \tcode{regex_search} - template + template bool regex_search(BidirectionalIterator first, BidirectionalIterator last, match_results& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template + template bool regex_search(BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_search(const charT* str, - match_results& m, - const basic_regex& e, + template + bool regex_search(const CharT* str, + match_results& m, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_search(const charT* str, - const basic_regex& e, + template + bool regex_search(const CharT* str, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_search(const basic_string& s, - const basic_regex& e, + template + bool regex_search(const basic_string& s, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_search(const basic_string& s, - match_results::const_iterator, + template + bool regex_search(const basic_string& s, + match_results::const_iterator, Allocator>& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); - template - bool regex_search(const basic_string&&, - match_results::const_iterator, + template + bool regex_search(const basic_string&&, + match_results::const_iterator, Allocator>&, - const basic_regex&, + const basic_regex&, regex_constants::match_flag_type = regex_constants::match_default) = delete; // \ref{re.alg.replace}, function template \tcode{regex_replace} template + class Traits, class CharT, class ST, class SA> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, - const basic_string& fmt, + const basic_regex& e, + const basic_string& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); - template + template OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, - const charT* fmt, + const basic_regex& e, + const CharT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); - template - basic_string - regex_replace(const basic_string& s, - const basic_regex& e, - const basic_string& fmt, + template + basic_string + regex_replace(const basic_string& s, + const basic_regex& e, + const basic_string& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); - template - basic_string - regex_replace(const basic_string& s, - const basic_regex& e, - const charT* fmt, + template + basic_string + regex_replace(const basic_string& s, + const basic_regex& e, + const CharT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); - template - basic_string - regex_replace(const charT* s, - const basic_regex& e, - const basic_string& fmt, + template + basic_string + regex_replace(const CharT* s, + const basic_regex& e, + const basic_string& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); - template - basic_string - regex_replace(const charT* s, - const basic_regex& e, - const charT* fmt, + template + basic_string + regex_replace(const CharT* s, + const basic_regex& e, + const CharT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); // \ref{re.regiter}, class template \tcode{regex_iterator} template::value_type, - class traits = regex_traits> + class CharT = typename iterator_traits::value_type, + class Traits = regex_traits> class regex_iterator; using cregex_iterator = regex_iterator; @@ -9565,8 +9565,8 @@ // \ref{re.tokiter}, class template \tcode{regex_token_iterator} template::value_type, - class traits = regex_traits> + class CharT = typename iterator_traits::value_type, + class Traits = regex_traits> class regex_token_iterator; using cregex_token_iterator = regex_token_iterator; @@ -9996,17 +9996,17 @@ \indexlibraryglobal{regex_traits}% \begin{codeblock} namespace std { - template + template struct regex_traits { - using char_type = charT; + using char_type = CharT; using string_type = basic_string; using locale_type = locale; using char_class_type = @\placeholdernc{bitmask_type}@; regex_traits(); static size_t length(const char_type* p); - charT translate(charT c) const; - charT translate_nocase(charT c) const; + CharT translate(CharT c) const; + CharT translate_nocase(CharT c) const; template string_type transform(ForwardIterator first, ForwardIterator last) const; template @@ -10018,8 +10018,8 @@ template char_class_type lookup_classname( ForwardIterator first, ForwardIterator last, bool icase = false) const; - bool isctype(charT c, char_class_type f) const; - int value(charT ch, int radix) const; + bool isctype(CharT c, char_class_type f) const; + int value(CharT ch, int radix) const; locale_type imbue(locale_type l); locale_type getloc() const; }; @@ -10053,12 +10053,12 @@ \begin{itemdescr} \pnum \returns -\tcode{char_traits::length(p)}. +\tcode{char_traits::length(p)}. \end{itemdescr} \indexlibrarymember{regex_traits}{translate}% \begin{itemdecl} -charT translate(charT c) const; +CharT translate(CharT c) const; \end{itemdecl} \begin{itemdescr} @@ -10069,13 +10069,13 @@ \indexlibrarymember{regex_traits}{translate_nocase}% \begin{itemdecl} -charT translate_nocase(charT c) const; +CharT translate_nocase(CharT c) const; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{use_facet>(getloc()).tolower(c)}. +\tcode{use_facet>(getloc()).tolower(c)}. \end{itemdescr} \indexlibrarymember{regex_traits}{transform}% @@ -10090,7 +10090,7 @@ As if by: \begin{codeblock} string_type str(first, last); -return use_facet>( +return use_facet>( getloc()).transform(str.data(), str.data() + str.length()); \end{codeblock} \end{itemdescr} @@ -10106,10 +10106,10 @@ \effects If \begin{codeblock} -typeid(use_facet>(getloc())) == typeid(collate_byname) +typeid(use_facet>(getloc())) == typeid(collate_byname) \end{codeblock} and the form of the sort key returned -by \tcode{collate_byname::transform(first, last)} is known and +by \tcode{collate_byname::transform(first, last)} is known and can be converted into a primary sort key then returns that key, otherwise returns an empty string. \end{itemdescr} @@ -10166,7 +10166,7 @@ \indexlibrarymember{regex_traits}{isctype}% \begin{itemdecl} -bool isctype(charT c, char_class_type f) const; +bool isctype(CharT c, char_class_type f) const; \end{itemdecl} \begin{itemdescr} @@ -10187,12 +10187,12 @@ a value in \tcode{f} named in \tref{re.traits.classnames} is set, then the result is determined as if by: \begin{codeblock} -ctype_base::mask m = convert(f); -const ctype& ct = use_facet>(getloc()); +ctype_base::mask m = convert(f); +const ctype& ct = use_facet>(getloc()); if (ct.is(m, c)) { return true; } else if (c == ct.widen('_')) { - charT w[1] = { ct.widen('w') }; + CharT w[1] = { ct.widen('w') }; char_class_type x = lookup_classname(w, w+1); return (f&x) == x; } else { @@ -10225,7 +10225,7 @@ \indexlibrarymember{value}{regex_traits}% \begin{itemdecl} -int value(charT ch, int radix) const; +int value(CharT ch, int radix) const; \end{itemdecl} \begin{itemdescr} @@ -10308,16 +10308,16 @@ \indexlibraryglobal{basic_regex}% \pnum -For a char-like type \tcode{charT}, specializations of class +For a char-like type \tcode{CharT}, specializations of class template \tcode{basic_regex} represent regular expressions constructed -from character sequences of \tcode{charT} characters. In the rest -of~\ref{re.regex}, \tcode{charT} denotes a given char-like +from character sequences of \tcode{CharT} characters. In the rest +of~\ref{re.regex}, \tcode{CharT} denotes a given char-like type. Storage for a regular expression is allocated and freed as necessary by the member functions of class \tcode{basic_regex}. \pnum Objects of type specialization of \tcode{basic_regex} are responsible for -converting the sequence of \tcode{charT} objects to an internal +converting the sequence of \tcode{CharT} objects to an internal representation. It is not specified what form this representation takes, nor how it is accessed by algorithms that operate on regular expressions. @@ -10335,15 +10335,15 @@ \indexlibraryglobal{basic_regex}% \begin{codeblock} namespace std { - template> + template> class basic_regex { public: // types - using value_type = charT; - using traits_type = traits; - using string_type = typename traits::string_type; + using value_type = CharT; + using traits_type = Traits; + using string_type = typename Traits::string_type; using flag_type = regex_constants::syntax_option_type; - using locale_type = typename traits::locale_type; + using locale_type = typename Traits::locale_type; // \ref{re.synopt}, constants static constexpr flag_type icase = regex_constants::icase; @@ -10360,39 +10360,39 @@ // \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); + 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, + 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(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); + basic_regex& operator=(const CharT* p); + basic_regex& operator=(initializer_list il); template - basic_regex& operator=(const basic_string& s); + 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); + 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, + 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, + basic_regex& assign(initializer_list, flag_type f = regex_constants::ECMAScript); // \ref{re.regex.operations}, const operations @@ -10429,20 +10429,20 @@ \indexlibraryctor{basic_regex}% \begin{itemdecl} -explicit basic_regex(const charT* p, flag_type f = regex_constants::ECMAScript); +explicit basic_regex(const CharT* p, flag_type f = regex_constants::ECMAScript); \end{itemdecl} \begin{itemdescr} \pnum \expects -\range{p}{p + char_traits::length(p)} is a valid range. +\range{p}{p + char_traits::length(p)} is a valid range. \pnum \effects The object's internal finite state machine is constructed from the regular expression contained in the sequence of characters -\range{p}{p + char_traits::\brk{}length(p)}, and +\range{p}{p + char_traits::\brk{}length(p)}, and interpreted according to the flags \tcode{f}. \pnum @@ -10454,12 +10454,12 @@ \pnum \throws \tcode{regex_error} if -\range{p}{p + char_traits::length(p)} is not a valid regular expression. +\range{p}{p + char_traits::length(p)} is not a valid regular expression. \end{itemdescr} \indexlibraryctor{basic_regex}% \begin{itemdecl} -basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); +basic_regex(const CharT* p, size_t len, flag_type f = regex_constants::ECMAScript); \end{itemdecl} \begin{itemdescr} @@ -10512,7 +10512,7 @@ \indexlibraryctor{basic_regex}% \begin{itemdecl} template - explicit basic_regex(const basic_string& s, + explicit basic_regex(const basic_string& s, flag_type f = regex_constants::ECMAScript); \end{itemdecl} @@ -10564,7 +10564,7 @@ \indexlibraryctor{basic_regex}% \begin{itemdecl} -basic_regex(initializer_list il, flag_type f = regex_constants::ECMAScript); +basic_regex(initializer_list il, flag_type f = regex_constants::ECMAScript); \end{itemdecl} \begin{itemdescr} @@ -10602,7 +10602,7 @@ \indexlibrarymember{basic_regex}{operator=}% \begin{itemdecl} -basic_regex& operator=(const charT* p); +basic_regex& operator=(const CharT* p); \end{itemdecl} \begin{itemdescr} @@ -10613,7 +10613,7 @@ \indexlibrarymember{basic_regex}{operator=}% \begin{itemdecl} -basic_regex& operator=(initializer_list il); +basic_regex& operator=(initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -10625,7 +10625,7 @@ \indexlibrarymember{basic_regex}{operator=}% \begin{itemdecl} template - basic_regex& operator=(const basic_string& s); + basic_regex& operator=(const basic_string& s); \end{itemdecl} \begin{itemdescr} @@ -10658,7 +10658,7 @@ \indexlibrarymember{basic_regex}{assign}% \begin{itemdecl} -basic_regex& assign(const charT* p, flag_type f = regex_constants::ECMAScript); +basic_regex& assign(const CharT* p, flag_type f = regex_constants::ECMAScript); \end{itemdecl} \begin{itemdescr} @@ -10669,7 +10669,7 @@ \indexlibrarymember{basic_regex}{assign}% \begin{itemdecl} -basic_regex& assign(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); +basic_regex& assign(const CharT* p, size_t len, flag_type f = regex_constants::ECMAScript); \end{itemdecl} \begin{itemdescr} @@ -10681,7 +10681,7 @@ \indexlibrarymember{basic_regex}{assign}% \begin{itemdecl} template - basic_regex& assign(const basic_string& s, + basic_regex& assign(const basic_string& s, flag_type f = regex_constants::ECMAScript); \end{itemdecl} @@ -10722,7 +10722,7 @@ \indexlibrarymember{assign}{basic_regex}% \begin{itemdecl} -basic_regex& assign(initializer_list il, +basic_regex& assign(initializer_list il, flag_type f = regex_constants::ECMAScript); \end{itemdecl} @@ -10773,7 +10773,7 @@ \effects Returns the result of \tcode{traits_inst.imbue(loc)} where \tcode{traits_inst} is a (default-initialized) instance of the template -type argument \tcode{traits} stored within the object. After a call +type argument \tcode{Traits} stored within the object. After a call to \tcode{imbue} the \tcode{basic_regex} object does not match any character sequence. \end{itemdescr} @@ -10788,7 +10788,7 @@ \effects Returns the result of \tcode{traits_inst.getloc()} where \tcode{traits_inst} is a (default-initialized) instance of the template -parameter \tcode{traits} stored within the object. +parameter \tcode{Traits} stored within the object. \end{itemdescr} \rSec3[re.regex.swap]{Swap} @@ -10819,8 +10819,8 @@ \indexlibrarymember{basic_regex}{swap}% \begin{itemdecl} -template - void swap(basic_regex& lhs, basic_regex& rhs); +template + void swap(basic_regex& lhs, basic_regex& rhs); \end{itemdecl} \begin{itemdescr} @@ -11099,9 +11099,9 @@ \indexlibraryglobal{basic_ostream}% \indexlibrarymember{sub_match}{operator<<}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const sub_match& m); +template + basic_ostream& + operator<<(basic_ostream& os, const sub_match& m); \end{itemdecl} \begin{itemdescr} @@ -11725,10 +11725,10 @@ \rSec3[re.alg.match]{\tcode{regex_match}} \indexlibraryglobal{regex_match}% \begin{itemdecl} -template +template bool regex_match(BidirectionalIterator first, BidirectionalIterator last, match_results& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -11837,9 +11837,9 @@ \indexlibraryglobal{regex_match}% \begin{itemdecl} -template +template bool regex_match(BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -11854,26 +11854,26 @@ \indexlibraryglobal{regex_match}% \begin{itemdecl} -template - bool regex_match(const charT* str, - match_results& m, - const basic_regex& e, +template + bool regex_match(const CharT* str, + match_results& m, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{regex_match(str, str + char_traits::length(str), m, e, flags)}. +\tcode{regex_match(str, str + char_traits::length(str), m, e, flags)}. \end{itemdescr} \indexlibraryglobal{regex_match}% \begin{itemdecl} -template - bool regex_match(const basic_string& s, - match_results::const_iterator, +template + bool regex_match(const basic_string& s, + match_results::const_iterator, Allocator>& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -11885,23 +11885,23 @@ \indexlibraryglobal{regex_match}% \begin{itemdecl} -template - bool regex_match(const charT* str, - const basic_regex& e, +template + bool regex_match(const CharT* str, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{regex_match(str, str + char_traits::length(str), e, flags)}. +\tcode{regex_match(str, str + char_traits::length(str), e, flags)}. \end{itemdescr} \indexlibraryglobal{regex_match}% \begin{itemdecl} -template - bool regex_match(const basic_string& s, - const basic_regex& e, +template + bool regex_match(const basic_string& s, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -11915,10 +11915,10 @@ \indexlibraryglobal{regex_search}% \begin{itemdecl} -template +template bool regex_search(BidirectionalIterator first, BidirectionalIterator last, match_results& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -12012,25 +12012,25 @@ \indexlibraryglobal{regex_search}% \begin{itemdecl} -template - bool regex_search(const charT* str, match_results& m, - const basic_regex& e, +template + bool regex_search(const CharT* str, match_results& m, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{regex_search(str, str + char_traits::length(str), m, e, flags)}. +\tcode{regex_search(str, str + char_traits::length(str), m, e, flags)}. \end{itemdescr} \indexlibraryglobal{regex_search}% \begin{itemdecl} -template - bool regex_search(const basic_string& s, - match_results::const_iterator, +template + bool regex_search(const basic_string& s, + match_results::const_iterator, Allocator>& m, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -12042,9 +12042,9 @@ \indexlibraryglobal{regex_search}% \begin{itemdecl} -template +template bool regex_search(BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -12058,23 +12058,23 @@ \indexlibraryglobal{regex_search}% \begin{itemdecl} -template - bool regex_search(const charT* str, - const basic_regex& e, +template + bool regex_search(const CharT* str, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{regex_search(str, str + char_traits::length(str), e, flags)}. +\tcode{regex_search(str, str + char_traits::length(str), e, flags)}. \end{itemdescr} \indexlibraryglobal{regex_search}% \begin{itemdecl} -template - bool regex_search(const basic_string& s, - const basic_regex& e, +template + bool regex_search(const basic_string& s, + const basic_regex& e, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -12089,19 +12089,19 @@ \indexlibraryglobal{regex_replace}% \begin{itemdecl} template + class Traits, class CharT, class ST, class SA> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, - const basic_string& fmt, + const basic_regex& e, + const basic_string& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); -template +template OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, - const basic_regex& e, - const charT* fmt, + const basic_regex& e, + const CharT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -12113,7 +12113,7 @@ Constructs a \tcode{regex_iterator} object \tcode{i} as if by \begin{codeblock} -regex_iterator i(first, last, e, flags) +regex_iterator i(first, last, e, flags) \end{codeblock} and uses \tcode{i} to enumerate through all of the matches \tcode{m} of type \tcode{match_results} @@ -12138,7 +12138,7 @@ \end{codeblock} for the first form of the function and \begin{codeblock} -out = m.format(out, fmt, fmt + char_traits::length(fmt), flags) +out = m.format(out, fmt, fmt + char_traits::length(fmt), flags) \end{codeblock} for the second. \end{itemize} @@ -12159,17 +12159,17 @@ \indexlibraryglobal{regex_replace}% \begin{itemdecl} -template - basic_string - regex_replace(const basic_string& s, - const basic_regex& e, - const basic_string& fmt, +template + basic_string + regex_replace(const basic_string& s, + const basic_regex& e, + const basic_string& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); -template - basic_string - regex_replace(const basic_string& s, - const basic_regex& e, - const charT* fmt, +template + basic_string + regex_replace(const basic_string& s, + const basic_regex& e, + const CharT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -12177,7 +12177,7 @@ \pnum \effects Constructs an empty string \tcode{result} of -type \tcode{basic_string} and calls: +type \tcode{basic_string} and calls: \begin{codeblock} regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, flags); \end{codeblock} @@ -12189,17 +12189,17 @@ \indexlibraryglobal{regex_replace}% \begin{itemdecl} -template - basic_string - regex_replace(const charT* s, - const basic_regex& e, - const basic_string& fmt, +template + basic_string + regex_replace(const CharT* s, + const basic_regex& e, + const basic_string& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); -template - basic_string - regex_replace(const charT* s, - const basic_regex& e, - const charT* fmt, +template + basic_string + regex_replace(const CharT* s, + const basic_regex& e, + const CharT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); \end{itemdecl} @@ -12207,9 +12207,9 @@ \pnum \effects Constructs an empty string \tcode{result} of -type \tcode{basic_string} and calls: +type \tcode{basic_string} and calls: \begin{codeblock} -regex_replace(back_inserter(result), s, s + char_traits::length(s), e, fmt, flags); +regex_replace(back_inserter(result), s, s + char_traits::length(s), e, fmt, flags); \end{codeblock} \pnum @@ -12251,11 +12251,11 @@ \begin{codeblock} namespace std { template::value_type, - class traits = regex_traits> + class CharT = typename iterator_traits::value_type, + class Traits = regex_traits> class regex_iterator { public: - using regex_type = basic_regex; + using regex_type = basic_regex; using iterator_category = forward_iterator_tag; using iterator_concept = input_iterator_tag; using value_type = match_results; @@ -12522,11 +12522,11 @@ \begin{codeblock} namespace std { template::value_type, - class traits = regex_traits> + class CharT = typename iterator_traits::value_type, + class Traits = regex_traits> class regex_token_iterator { public: - using regex_type = basic_regex; + using regex_type = basic_regex; using iterator_category = forward_iterator_tag; using iterator_concept = input_iterator_tag; using value_type = sub_match; @@ -12588,7 +12588,7 @@ private: using position_iterator = - regex_iterator; // \expos + regex_iterator; // \expos position_iterator position; // \expos const value_type* result; // \expos value_type suffix; // \expos @@ -12794,7 +12794,7 @@ \indexlibraryglobal{locale}% \indextext{regular expression traits}% Objects of type specialization of \tcode{basic_regex} store within themselves a -default-constructed instance of their \tcode{traits} template parameter, henceforth +default-constructed instance of their \tcode{Traits} template parameter, henceforth referred to as \tcode{traits_inst}. This \tcode{traits_inst} object is used to support localization of the regular expression; \tcode{basic_regex} member functions shall not call any locale dependent C or \Cpp{} API, including the formatted string input functions. @@ -12916,7 +12916,7 @@ \pnum \indexlibraryglobal{regex_error}% If the \textit{CV} of a \textit{UnicodeEscapeSequence} is greater than the largest -value that can be held in an object of type \tcode{charT} the translator shall +value that can be held in an object of type \tcode{CharT} the translator shall throw an exception object of type \tcode{regex_error}. \begin{note} This means that values of the form \tcode{"\textbackslash{}uxxxx"} that do not fit in @@ -12976,7 +12976,7 @@ \item During matching of a regular expression finite state machine against a sequence of characters, testing whether a collating element is a member of a primary equivalence class is conducted by first converting the collating element and the equivalence -class to sort keys using \tcode{traits::transform_primary}, and then comparing the sort +class to sort keys using \tcode{Traits::transform_primary}, and then comparing the sort keys for equality. \indextext{regular expression traits!\idxcode{transform_primary}}% \indextext{transform_primary@\tcode{transform_primary}!regular expression traits}% diff --git a/source/threads.tex b/source/threads.tex index f50000518e..97786ab598 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -1498,11 +1498,11 @@ bool operator==(thread::id x, thread::id y) noexcept; strong_ordering operator<=>(thread::id x, thread::id y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& out, thread::id id); + template + basic_ostream& + operator<<(basic_ostream& out, thread::id id); - template struct formatter; + template struct formatter; // hash support template struct hash; @@ -1522,8 +1522,8 @@ \pnum The \defn{text representation} for -the character type \tcode{charT} of an object of type \tcode{thread::id} -is an unspecified sequence of \tcode{charT} such that, +the character type \tcode{CharT} of an object of type \tcode{thread::id} +is an unspecified sequence of \tcode{CharT} such that, for two objects of type \tcode{thread::id} \tcode{x} and \tcode{y}, if \tcode{x == y} is \tcode{true}, the \tcode{thread::id} objects have the same text representation, and @@ -1585,15 +1585,15 @@ \indexlibrarymember{operator<<}{thread::id}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& out, thread::id id); +template + basic_ostream& + operator<<(basic_ostream& out, thread::id id); \end{itemdecl} \begin{itemdescr} \pnum \effects -Inserts the text representation for \tcode{charT} of \tcode{id} into +Inserts the text representation for \tcode{CharT} of \tcode{id} into \tcode{out}. \pnum @@ -1603,12 +1603,12 @@ \indexlibrary{\idxcode{formatter}!specializations!\idxcode{thread::id}}% \begin{itemdecl} -template struct formatter; +template struct formatter; \end{itemdecl} \begin{itemdescr} \pnum -\tcode{formatter} interprets \fmtgrammarterm{format-spec} +\tcode{formatter} interprets \fmtgrammarterm{format-spec} as a \fmtgrammarterm{thread-id-format-spec}. The syntax of format specifications is as follows: @@ -1627,7 +1627,7 @@ \pnum A \tcode{thread::id} object is formatted by -writing its text representation for \tcode{charT} to the output +writing its text representation for \tcode{CharT} to the output with additional padding and adjustments as specified by the format specifiers. \end{itemdescr} diff --git a/source/time.tex b/source/time.tex index 97c799819b..922f43b580 100644 --- a/source/time.tex +++ b/source/time.tex @@ -27,9 +27,9 @@ \pnum \indextext{STATICALLY-WIDEN@\exposid{STATICALLY-WIDEN}}% -Let \exposid{STATICALLY-WIDEN}\tcode{("...")} be -\tcode{"..."} if \tcode{charT} is \tcode{char} and -\tcode{L"..."} if \tcode{charT} is \keyword{wchar_t}. +Let \exposid{STATICALLY-WIDEN}\tcode{("...")} be +\tcode{"..."} if \tcode{CharT} is \tcode{char} and +\tcode{L"..."} if \tcode{CharT} is \keyword{wchar_t}. \rSec1[time.syn]{Header \tcode{} synopsis} @@ -154,15 +154,15 @@ constexpr ToDuration round(const duration& d); // \ref{time.duration.io}, \tcode{duration} I/O - template - basic_ostream& - operator<<(basic_ostream& os, + template + basic_ostream& + operator<<(basic_ostream& os, const duration& d); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, duration& d, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); // convenience typedefs @@ -239,19 +239,19 @@ using sys_seconds = sys_time; using sys_days = sys_time; - template - basic_ostream& - operator<<(basic_ostream& os, const sys_time& tp); + template + basic_ostream& + operator<<(basic_ostream& os, const sys_time& tp); - template - basic_ostream& - operator<<(basic_ostream& os, const sys_days& dp); + template + basic_ostream& + operator<<(basic_ostream& os, const sys_days& dp); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, sys_time& tp, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.clock.utc}, class \tcode{utc_clock} @@ -261,14 +261,14 @@ using utc_time = time_point; using utc_seconds = utc_time; - template - basic_ostream& - operator<<(basic_ostream& os, const utc_time& t); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template + basic_ostream& + operator<<(basic_ostream& os, const utc_time& t); + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, utc_time& tp, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); struct leap_second_info; @@ -283,14 +283,14 @@ using tai_time = time_point; using tai_seconds = tai_time; - template - basic_ostream& - operator<<(basic_ostream& os, const tai_time& t); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template + basic_ostream& + operator<<(basic_ostream& os, const tai_time& t); + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, tai_time& tp, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.clock.gps}, class \tcode{gps_clock} @@ -300,14 +300,14 @@ using gps_time = time_point; using gps_seconds = gps_time; - template - basic_ostream& - operator<<(basic_ostream& os, const gps_time& t); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template + basic_ostream& + operator<<(basic_ostream& os, const gps_time& t); + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, gps_time& tp, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.clock.file}, type \tcode{file_clock} @@ -316,14 +316,14 @@ template using file_time = time_point; - template - basic_ostream& - operator<<(basic_ostream& os, const file_time& tp); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template + basic_ostream& + operator<<(basic_ostream& os, const file_time& tp); + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, file_time& tp, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.clock.steady}, class \tcode{steady_clock} @@ -339,14 +339,14 @@ using local_seconds = local_time; using local_days = local_time; - template - basic_ostream& - operator<<(basic_ostream& os, const local_time& tp); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template + basic_ostream& + operator<<(basic_ostream& os, const local_time& tp); + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, local_time& tp, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.clock.cast}, \tcode{time_point} conversions @@ -370,13 +370,13 @@ constexpr day operator-(const day& x, const days& y) noexcept; constexpr days operator-(const day& x, const day& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const day& d); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - day& d, basic_string* abbrev = nullptr, + template + basic_ostream& + operator<<(basic_ostream& os, const day& d); + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + day& d, basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.cal.month}, class \tcode{month} @@ -390,13 +390,13 @@ constexpr month operator-(const month& x, const months& y) noexcept; constexpr months operator-(const month& x, const month& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const month& m); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - month& m, basic_string* abbrev = nullptr, + template + basic_ostream& + operator<<(basic_ostream& os, const month& m); + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + month& m, basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.cal.year}, class \tcode{year} @@ -410,14 +410,14 @@ constexpr year operator-(const year& x, const years& y) noexcept; constexpr years operator-(const year& x, const year& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const year& y); + template + basic_ostream& + operator<<(basic_ostream& os, const year& y); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - year& y, basic_string* abbrev = nullptr, + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + year& y, basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.cal.wd}, class \tcode{weekday} @@ -430,14 +430,14 @@ constexpr weekday operator-(const weekday& x, const days& y) noexcept; constexpr days operator-(const weekday& x, const weekday& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const weekday& wd); + template + basic_ostream& + operator<<(basic_ostream& os, const weekday& wd); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - weekday& wd, basic_string* abbrev = nullptr, + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + weekday& wd, basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.cal.wdidx}, class \tcode{weekday_indexed} @@ -445,18 +445,18 @@ constexpr bool operator==(const weekday_indexed& x, const weekday_indexed& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const weekday_indexed& wdi); + template + basic_ostream& + operator<<(basic_ostream& os, const weekday_indexed& wdi); // \ref{time.cal.wdlast}, class \tcode{weekday_last} class weekday_last; constexpr bool operator==(const weekday_last& x, const weekday_last& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const weekday_last& wdl); + template + basic_ostream& + operator<<(basic_ostream& os, const weekday_last& wdl); // \ref{time.cal.md}, class \tcode{month_day} class month_day; @@ -464,14 +464,14 @@ constexpr bool operator==(const month_day& x, const month_day& y) noexcept; constexpr strong_ordering operator<=>(const month_day& x, const month_day& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const month_day& md); + template + basic_ostream& + operator<<(basic_ostream& os, const month_day& md); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - month_day& md, basic_string* abbrev = nullptr, + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + month_day& md, basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.cal.mdlast}, class \tcode{month_day_last} @@ -481,27 +481,27 @@ constexpr strong_ordering operator<=>(const month_day_last& x, const month_day_last& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const month_day_last& mdl); + template + basic_ostream& + operator<<(basic_ostream& os, const month_day_last& mdl); // \ref{time.cal.mwd}, class \tcode{month_weekday} class month_weekday; constexpr bool operator==(const month_weekday& x, const month_weekday& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const month_weekday& mwd); + template + basic_ostream& + operator<<(basic_ostream& os, const month_weekday& mwd); // \ref{time.cal.mwdlast}, class \tcode{month_weekday_last} class month_weekday_last; constexpr bool operator==(const month_weekday_last& x, const month_weekday_last& y) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const month_weekday_last& mwdl); + template + basic_ostream& + operator<<(basic_ostream& os, const month_weekday_last& mwdl); // \ref{time.cal.ym}, class \tcode{year_month} class year_month; @@ -517,14 +517,14 @@ constexpr year_month operator+(const years& dy, const year_month& ym) noexcept; constexpr year_month operator-(const year_month& ym, const years& dy) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const year_month& ym); + template + basic_ostream& + operator<<(basic_ostream& os, const year_month& ym); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - year_month& ym, basic_string* abbrev = nullptr, + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + year_month& ym, basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.cal.ymd}, class \tcode{year_month_day} @@ -541,15 +541,15 @@ constexpr year_month_day operator-(const year_month_day& ymd, const months& dm) noexcept; constexpr year_month_day operator-(const year_month_day& ymd, const years& dy) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const year_month_day& ymd); + template + basic_ostream& + operator<<(basic_ostream& os, const year_month_day& ymd); - template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, + template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, year_month_day& ymd, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); // \ref{time.cal.ymdlast}, class \tcode{year_month_day_last} @@ -573,9 +573,9 @@ constexpr year_month_day_last operator-(const year_month_day_last& ymdl, const years& dy) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const year_month_day_last& ymdl); + template + basic_ostream& + operator<<(basic_ostream& os, const year_month_day_last& ymdl); // \ref{time.cal.ymwd}, class \tcode{year_month_weekday} class year_month_weekday; @@ -596,9 +596,9 @@ constexpr year_month_weekday operator-(const year_month_weekday& ymwd, const years& dy) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const year_month_weekday& ymwd); + template + basic_ostream& + operator<<(basic_ostream& os, const year_month_weekday& ymwd); // \ref{time.cal.ymwdlast}, class \tcode{year_month_weekday_last} class year_month_weekday_last; @@ -619,9 +619,9 @@ constexpr year_month_weekday_last operator-(const year_month_weekday_last& ymwdl, const years& dy) noexcept; - template - basic_ostream& - operator<<(basic_ostream& os, const year_month_weekday_last& ymwdl); + template + basic_ostream& + operator<<(basic_ostream& os, const year_month_weekday_last& ymwdl); // \ref{time.cal.operators}, civil calendar conventional syntax operators constexpr year_month @@ -708,9 +708,9 @@ // \ref{time.hms}, class template \tcode{hh_mm_ss} template class hh_mm_ss; - template - basic_ostream& - operator<<(basic_ostream& os, const hh_mm_ss& hms); + template + basic_ostream& + operator<<(basic_ostream& os, const hh_mm_ss& hms); // \ref{time.12}, 12/24 hour functions constexpr bool is_am(const hours& h) noexcept; @@ -738,14 +738,14 @@ // \ref{time.zone.info}, information classes struct sys_info; - template - basic_ostream& - operator<<(basic_ostream& os, const sys_info& si); + template + basic_ostream& + operator<<(basic_ostream& os, const sys_info& si); struct local_info; - template - basic_ostream& - operator<<(basic_ostream& os, const local_info& li); + template + basic_ostream& + operator<<(basic_ostream& os, const local_info& li); // \ref{time.zone.timezone}, class \tcode{time_zone} enum class choose {earliest, latest}; @@ -766,9 +766,9 @@ bool operator==(const zoned_time& x, const zoned_time& y); - template - basic_ostream& - operator<<(basic_ostream& os, + template + basic_ostream& + operator<<(basic_ostream& os, const zoned_time& t); // \ref{time.zone.leap}, leap second support @@ -814,79 +814,79 @@ } namespace std { - template - struct formatter, charT>; - template - struct formatter, charT>; - template - struct formatter, charT>; - template - struct formatter, charT>; - template - struct formatter, charT>; - template - struct formatter, charT>; - template - struct formatter, charT>; - template - struct formatter, charT>; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template struct formatter; - template - struct formatter>, charT>; - template struct formatter; - template struct formatter; - template - struct formatter, charT>; + template + struct formatter, CharT>; + template + struct formatter, CharT>; + template + struct formatter, CharT>; + template + struct formatter, CharT>; + template + struct formatter, CharT>; + template + struct formatter, CharT>; + template + struct formatter, CharT>; + template + struct formatter, CharT>; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template struct formatter; + template + struct formatter>, CharT>; + template struct formatter; + template struct formatter; + template + struct formatter, CharT>; } namespace std::chrono { // \ref{time.parse}, parsing - template + template @\unspec@ - parse(const charT* fmt, Parsable& tp); - template + parse(const CharT* fmt, Parsable& tp); + template @\unspec@ - parse(const basic_string& fmt, Parsable& tp); + parse(const basic_string& fmt, Parsable& tp); - template + template @\unspec@ - parse(const charT* fmt, Parsable& tp, - basic_string& abbrev); - template + parse(const CharT* fmt, Parsable& tp, + basic_string& abbrev); + template @\unspec@ - parse(const basic_string& fmt, Parsable& tp, - basic_string& abbrev); + parse(const basic_string& fmt, Parsable& tp, + basic_string& abbrev); - template + template @\unspec@ - parse(const charT* fmt, Parsable& tp, minutes& offset); - template + parse(const CharT* fmt, Parsable& tp, minutes& offset); + template @\unspec@ - parse(const basic_string& fmt, Parsable& tp, + parse(const basic_string& fmt, Parsable& tp, minutes& offset); - template + template @\unspec@ - parse(const charT* fmt, Parsable& tp, - basic_string& abbrev, minutes& offset); - template + parse(const CharT* fmt, Parsable& tp, + basic_string& abbrev, minutes& offset); + template @\unspec@ - parse(const basic_string& fmt, Parsable& tp, - basic_string& abbrev, minutes& offset); + parse(const basic_string& fmt, Parsable& tp, + basic_string& abbrev, minutes& offset); // calendrical constants inline constexpr last_spec last{}; @@ -2054,9 +2054,9 @@ \indexlibrarymember{operator<<}{duration}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const duration& d); +template + basic_ostream& + operator<<(basic_ostream& os, const duration& d); \end{itemdecl} \begin{itemdescr} @@ -2065,7 +2065,7 @@ Inserts the duration \tcode{d} onto the stream \tcode{os} as if it were implemented as follows: \begin{codeblock} -basic_ostringstream s; +basic_ostringstream s; s.flags(os.flags()); s.imbue(os.getloc()); s.precision(os.precision()); @@ -2172,7 +2172,7 @@ In the list above, the use of \tcode{\placeholder{num}} and \tcode{\placeholder{den}} refers to the static data members of \tcode{Period::type}, -which are converted to arrays of \tcode{charT} using a decimal conversion with no leading zeroes. +which are converted to arrays of \tcode{CharT} using a decimal conversion with no leading zeroes. \pnum \returns @@ -2181,11 +2181,11 @@ \indexlibrarymember{from_stream}{duration}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, duration& d, - basic_string* abbrev = nullptr, + basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -2728,9 +2728,9 @@ \indexlibrarymember{operator<<}{sys_time}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const sys_time& tp); +template + basic_ostream& + operator<<(basic_ostream& os, const sys_time& tp); \end{itemdecl} \begin{itemdescr} @@ -2743,7 +2743,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), tp); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), tp); \end{codeblock} \pnum @@ -2758,9 +2758,9 @@ \indexlibrarymember{operator<<}{sys_days}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const sys_days& dp); +template + basic_ostream& + operator<<(basic_ostream& os, const sys_days& dp); \end{itemdecl} \begin{itemdescr} @@ -2775,10 +2775,10 @@ \indexlibrarymember{from_stream}{sys_time}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - sys_time& tp, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + sys_time& tp, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -2929,9 +2929,9 @@ \indexlibrarymember{operator<<}{utc_time}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const utc_time& t); +template + basic_ostream& + operator<<(basic_ostream& os, const utc_time& t); \end{itemdecl} \begin{itemdescr} @@ -2939,7 +2939,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \pnum @@ -2968,10 +2968,10 @@ \indexlibrarymember{from_stream}{utc_time}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - utc_time& tp, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + utc_time& tp, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -3135,9 +3135,9 @@ \indexlibrarymember{operator<<}{tai_time}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const tai_time& t); +template + basic_ostream& + operator<<(basic_ostream& os, const tai_time& t); \end{itemdecl} \begin{itemdescr} @@ -3145,7 +3145,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \pnum @@ -3167,10 +3167,10 @@ \indexlibrarymember{from_stream}{tai_time}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - tai_time& tp, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + tai_time& tp, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -3298,9 +3298,9 @@ \indexlibrarymember{operator<<}{gps_time}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const gps_time& t); +template + basic_ostream& + operator<<(basic_ostream& os, const gps_time& t); \end{itemdecl} \begin{itemdescr} @@ -3308,7 +3308,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \pnum @@ -3330,10 +3330,10 @@ \indexlibrarymember{from_stream}{gps_time}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - gps_time& tp, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + gps_time& tp, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -3421,9 +3421,9 @@ \indexlibrarymember{operator<<}{file_time}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const file_time& t); +template + basic_ostream& + operator<<(basic_ostream& os, const file_time& t); \end{itemdecl} \begin{itemdescr} @@ -3431,16 +3431,16 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{file_time}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - file_time& tp, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + file_time& tp, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -3529,9 +3529,9 @@ \indexlibrarymember{operator<<}{local_time}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const local_time& lt); +template + basic_ostream& + operator<<(basic_ostream& os, const local_time& lt); \end{itemdecl} \begin{itemdescr} @@ -3548,10 +3548,10 @@ \indexlibrarymember{from_stream}{local_time}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - local_time& tp, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + local_time& tp, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -4183,9 +4183,9 @@ \indexlibrarymember{operator<<}{day}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const day& d); +template + basic_ostream& + operator<<(basic_ostream& os, const day& d); \end{itemdecl} \begin{itemdescr} @@ -4194,17 +4194,17 @@ Equivalent to: \begin{codeblock} return os << (d.ok() ? - format(@\placeholder{STATICALLY-WIDEN}@("{:%d}"), d) : - format(@\placeholder{STATICALLY-WIDEN}@("{:%d} is not a valid day"), d)); + format(@\placeholder{STATICALLY-WIDEN}@("{:%d}"), d) : + format(@\placeholder{STATICALLY-WIDEN}@("{:%d} is not a valid day"), d)); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{day}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - day& d, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + day& d, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -4496,9 +4496,9 @@ \indexlibrarymember{operator<<}{month}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const month& m); +template + basic_ostream& + operator<<(basic_ostream& os, const month& m); \end{itemdecl} \begin{itemdescr} @@ -4507,18 +4507,18 @@ Equivalent to: \begin{codeblock} return os << (m.ok() ? - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%b}"), m) : - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{} is not a valid month"), + format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%b}"), m) : + format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{} is not a valid month"), static_cast(m))); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{month}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - month& m, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + month& m, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -4841,9 +4841,9 @@ \indexlibrarymember{operator<<}{year}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const year& y); +template + basic_ostream& + operator<<(basic_ostream& os, const year& y); \end{itemdecl} \begin{itemdescr} @@ -4852,17 +4852,17 @@ Equivalent to: \begin{codeblock} return os << (y.ok() ? - format(@\placeholder{STATICALLY-WIDEN}@("{:%Y}"), y) : - format(@\placeholder{STATICALLY-WIDEN}@("{:%Y} is not a valid year"), y)); + format(@\placeholder{STATICALLY-WIDEN}@("{:%Y}"), y) : + format(@\placeholder{STATICALLY-WIDEN}@("{:%Y} is not a valid year"), y)); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{year}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - year& y, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + year& y, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -5223,9 +5223,9 @@ \indexlibrarymember{operator<<}{weekday}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const weekday& wd); +template + basic_ostream& + operator<<(basic_ostream& os, const weekday& wd); \end{itemdecl} \begin{itemdescr} @@ -5234,18 +5234,18 @@ Equivalent to: \begin{codeblock} return os << (wd.ok() ? - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%a}"), wd) : - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{} is not a valid weekday"), + format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%a}"), wd) : + format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{} is not a valid weekday"), static_cast(wd.wd_))); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{weekday}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - weekday& wd, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + weekday& wd, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -5376,9 +5376,9 @@ \indexlibrarymember{operator<<}{weekday_indexed}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const weekday_indexed& wdi); +template + basic_ostream& + operator<<(basic_ostream& os, const weekday_indexed& wdi); \end{itemdecl} \begin{itemdescr} @@ -5388,8 +5388,8 @@ \begin{codeblock} auto i = wdi.index(); return os << (i >= 1 && i <= 5 ? - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[{}]"), wdi.weekday(), i) : - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[{} is not a valid index]"), + format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[{}]"), wdi.weekday(), i) : + format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[{} is not a valid index]"), wdi.weekday(), i)); \end{codeblock} \end{itemdescr} @@ -5481,9 +5481,9 @@ \indexlibrarymember{operator<<}{weekday_last}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const weekday_last& wdl); +template + basic_ostream& + operator<<(basic_ostream& os, const weekday_last& wdl); \end{itemdecl} \begin{itemdescr} @@ -5491,7 +5491,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[last]"), wdl.weekday()); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[last]"), wdl.weekday()); \end{codeblock} \end{itemdescr} @@ -5608,9 +5608,9 @@ \indexlibrarymember{operator<<}{month_day}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const month_day& md); +template + basic_ostream& + operator<<(basic_ostream& os, const month_day& md); \end{itemdecl} \begin{itemdescr} @@ -5618,17 +5618,17 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{}"), +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{}"), md.month(), md.day()); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{month_day}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - month_day& md, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + month_day& md, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -5745,9 +5745,9 @@ \indexlibrarymember{operator<<}{month_day_last}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const month_day_last& mdl); +template + basic_ostream& + operator<<(basic_ostream& os, const month_day_last& mdl); \end{itemdecl} \begin{itemdescr} @@ -5755,7 +5755,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/last"), mdl.month()); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/last"), mdl.month()); \end{codeblock} \end{itemdescr} @@ -5858,9 +5858,9 @@ \indexlibrarymember{operator<<}{month_weekday}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const month_weekday& mwd); +template + basic_ostream& + operator<<(basic_ostream& os, const month_weekday& mwd); \end{itemdecl} \begin{itemdescr} @@ -5868,7 +5868,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{:L}"), +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{:L}"), mwd.month(), mwd.weekday_indexed()); \end{codeblock} \end{itemdescr} @@ -5974,9 +5974,9 @@ \indexlibrarymember{operator<<}{month_weekday_last}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const month_weekday_last& mwdl); +template + basic_ostream& + operator<<(basic_ostream& os, const month_weekday_last& mwdl); \end{itemdecl} \begin{itemdescr} @@ -5984,7 +5984,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{:L}"), +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{:L}"), mwdl.month(), mwdl.weekday_last()); \end{codeblock} \end{itemdescr} @@ -6288,9 +6288,9 @@ \indexlibrarymember{operator<<}{year_month}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const year_month& ym); +template + basic_ostream& + operator<<(basic_ostream& os, const year_month& ym); \end{itemdecl} \begin{itemdescr} @@ -6298,17 +6298,17 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}"), +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}"), ym.year(), ym.month()); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{year_month}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - year_month& ym, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + year_month& ym, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -6751,9 +6751,9 @@ \indexlibrarymember{operator<<}{year_month_day}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const year_month_day& ymd); +template + basic_ostream& + operator<<(basic_ostream& os, const year_month_day& ymd); \end{itemdecl} \begin{itemdescr} @@ -6762,17 +6762,17 @@ Equivalent to: \begin{codeblock} return os << (ymd.ok() ? - format(@\placeholder{STATICALLY-WIDEN}@("{:%F}"), ymd) : - format(@\placeholder{STATICALLY-WIDEN}@("{:%F} is not a valid date"), ymd)); + format(@\placeholder{STATICALLY-WIDEN}@("{:%F}"), ymd) : + format(@\placeholder{STATICALLY-WIDEN}@("{:%F} is not a valid date"), ymd)); \end{codeblock} \end{itemdescr} \indexlibrarymember{from_stream}{year_month_day}% \begin{itemdecl} -template> - basic_istream& - from_stream(basic_istream& is, const charT* fmt, - year_month_day& ymd, basic_string* abbrev = nullptr, +template> + basic_istream& + from_stream(basic_istream& is, const CharT* fmt, + year_month_day& ymd, basic_string* abbrev = nullptr, minutes* offset = nullptr); \end{itemdecl} @@ -7147,9 +7147,9 @@ \indexlibrarymember{operator<<}{year_month_day_last}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const year_month_day_last& ymdl); +template + basic_ostream& + operator<<(basic_ostream& os, const year_month_day_last& ymdl); \end{itemdecl} \begin{itemdescr} @@ -7157,7 +7157,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}"), +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}"), ymdl.year(), ymdl.month_day_last()); \end{codeblock} \end{itemdescr} @@ -7543,9 +7543,9 @@ \indexlibrarymember{operator<<}{year_month_weekday}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const year_month_weekday& ymwd); +template + basic_ostream& + operator<<(basic_ostream& os, const year_month_weekday& ymwd); \end{itemdecl} \begin{itemdescr} @@ -7553,7 +7553,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), ymwd.year(), ymwd.month(), ymwd.weekday_indexed()); \end{codeblock} \end{itemdescr} @@ -7891,9 +7891,9 @@ \indexlibrarymember{operator<<}{year_month_weekday_last}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const year_month_weekday_last& ymwdl); +template + basic_ostream& + operator<<(basic_ostream& os, const year_month_weekday_last& ymwdl); \end{itemdecl} \begin{itemdescr} @@ -7901,7 +7901,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), ymwdl.year(), ymwdl.month(), ymwdl.weekday_last()); \end{codeblock} \end{itemdescr} @@ -8637,9 +8637,9 @@ \rSec2[time.hms.nonmembers]{Non-members} \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const hh_mm_ss& hms); +template + basic_ostream& + operator<<(basic_ostream& os, const hh_mm_ss& hms); \end{itemdecl} \begin{itemdescr} @@ -8647,7 +8647,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%T}"), hms); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%T}"), hms); \end{codeblock} \pnum @@ -9312,9 +9312,9 @@ \indexlibrarymember{operator<<}{sys_info} \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const sys_info& r); +template + basic_ostream& + operator<<(basic_ostream& os, const sys_info& r); \end{itemdecl} \begin{itemdescr} @@ -9389,9 +9389,9 @@ \indexlibrarymember{operator<<}{local_info}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const local_info& r); +template + basic_ostream& + operator<<(basic_ostream& os, const local_info& r); \end{itemdecl} \begin{itemdescr} @@ -10115,9 +10115,9 @@ \indexlibrarymember{operator<<}{zoned_time}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, +template + basic_ostream& + operator<<(basic_ostream& os, const zoned_time& t); \end{itemdecl} @@ -10126,7 +10126,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T %Z}"), t); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T %Z}"), t); \end{codeblock} \end{itemdescr} @@ -10550,7 +10550,7 @@ a \tcode{std::chrono::duration} instance holding a negative value, or an \tcode{hh_mm_ss} object \tcode{h} for which \tcode{h.is_negative()} is \tcode{true}, is equivalent to the output of the corresponding positive value, -with a \tcode{\exposid{STATICALLY-WIDEN}("-")} character sequence +with a \tcode{\exposid{STATICALLY-WIDEN}("-")} character sequence placed before the replacement of the initial conversion specifier. \begin{example} \begin{codeblockdigitsep} @@ -10818,7 +10818,7 @@ \pnum If the \fmtgrammarterm{chrono-specs} is omitted, the chrono object is formatted -as if by streaming it to \tcode{basic_ostring\-stream os} +as if by streaming it to \tcode{basic_ostring\-stream os} with the formatting locale imbued and copying \tcode{os.str()} through the output iterator of the context with additional padding and adjustments as specified by the format specifiers. @@ -10851,49 +10851,49 @@ \indexlibrary{\idxcode{formatter}!specializations!\idxcode{chrono::sys_time}}% \begin{itemdecl} -template - struct formatter, charT>; +template + struct formatter, CharT>; \end{itemdecl} \begin{itemdescr} \pnum \remarks If \tcode{\%Z} is used, -it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. +it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, an offset of \tcode{0min} is formatted. \end{itemdescr} \indexlibrary{\idxcode{formatter}!specializations!\idxcode{chrono::utc_time}}% \begin{itemdecl} -template - struct formatter, charT>; +template + struct formatter, CharT>; \end{itemdecl} \begin{itemdescr} \pnum \remarks If \tcode{\%Z} is used, -it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. +it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, an offset of \tcode{0min} is formatted. If the argument represents a time during a positive leap second insertion, and if a seconds field is formatted, the integral portion of that format is -\tcode{\exposid{STATICALLY-WIDEN}("60")}. +\tcode{\exposid{STATICALLY-WIDEN}("60")}. \end{itemdescr} \indexlibrary{\idxcode{formatter}!specializations!\idxcode{chrono::tai_time}}% \begin{itemdecl} -template - struct formatter, charT>; +template + struct formatter, CharT>; \end{itemdecl} \begin{itemdescr} \pnum \remarks If \tcode{\%Z} is used, -it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("TAI")}. +it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("TAI")}. If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, an offset of \tcode{0min} is formatted. The date and time formatted are equivalent to @@ -10906,15 +10906,15 @@ \indexlibrary{\idxcode{formatter}!specializations!\idxcode{chrono::gps_time}}% \begin{itemdecl} -template - struct formatter, charT>; +template + struct formatter, CharT>; \end{itemdecl} \begin{itemdescr} \pnum \remarks If \tcode{\%Z} is used, -it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("GPS")}. +it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("GPS")}. If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, an offset of \tcode{0min} is formatted. The date and time formatted are equivalent to @@ -10927,15 +10927,15 @@ \indexlibrary{\idxcode{formatter}!specializations!\idxcode{chrono::file_time}}% \begin{itemdecl} -template - struct formatter, charT>; +template + struct formatter, CharT>; \end{itemdecl} \begin{itemdescr} \pnum \remarks If \tcode{\%Z} is used, -it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. +it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, an offset of \tcode{0min} is formatted. The date and time formatted are equivalent to @@ -10947,8 +10947,8 @@ \indexlibrary{\idxcode{formatter}!specializations!\idxcode{chrono::local_time}}% \begin{itemdecl} -template - struct formatter, charT>; +template + struct formatter, CharT>; \end{itemdecl} \begin{itemdescr} @@ -10983,8 +10983,8 @@ \indexlibrary{\idxcode{formatter}!specializations!chrono::local-time-format-t@\tcode{chrono::\exposid{local-time-format-t}}}% \begin{itemdecl} -template - struct formatter, charT>; +template + struct formatter, CharT>; \end{itemdecl} \begin{itemdescr} @@ -11013,9 +11013,9 @@ \indexlibrary{\idxcode{formatter}!specializations!\idxcode{chrono::zoned_time}}% \begin{codeblock} -template -struct formatter, charT> - : formatter>, charT> { +template +struct formatter, CharT> + : formatter>, CharT> { template typename FormatContext::iterator format(const chrono::zoned_time& tp, FormatContext& ctx) const; @@ -11035,7 +11035,7 @@ Equivalent to: \begin{codeblock} sys_info info = tp.get_info(); -return formatter>, charT>:: +return formatter>, CharT>:: format({tp.get_local_time(), &info.abbrev, &info.offset}, ctx); \end{codeblock} \end{itemdescr} @@ -11051,9 +11051,9 @@ calls \tcode{from_stream} unqualified, so as to enable argument-dependent lookup\iref{basic.lookup.argdep}. In the following paragraphs, -let \tcode{is} denote an object of type \tcode{basic_istream} and -let \tcode{I} be \tcode{basic_istream\&}, -where \tcode{charT} and \tcode{traits} are template parameters in that context. +let \tcode{is} denote an object of type \tcode{basic_istream} and +let \tcode{I} be \tcode{basic_istream\&}, +where \tcode{CharT} and \tcode{Traits} are template parameters in that context. \pnum \recommended @@ -11063,25 +11063,25 @@ preventing stream extraction into an lvalue of such a manipulator type. \begin{itemdecl} -template +template @\unspec@ - parse(const charT* fmt, Parsable& tp); -template + parse(const CharT* fmt, Parsable& tp); +template @\unspec@ - parse(const basic_string& fmt, Parsable& tp); + parse(const basic_string& fmt, Parsable& tp); \end{itemdecl} \begin{itemdescr} \pnum Let $F$ be \tcode{fmt} for the first overload and \tcode{fmt.c_str()} for the second overload. -Let \tcode{traits} be \tcode{char_traits} for the first overload. +Let \tcode{Traits} be \tcode{char_traits} for the first overload. \pnum \constraints The expression \begin{codeblock} -from_stream(declval&>(), @$F$@, tp) +from_stream(declval&>(), @$F$@, tp) \end{codeblock} is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. @@ -11095,14 +11095,14 @@ \end{itemdescr} \begin{itemdecl} -template +template @\unspec@ - parse(const charT* fmt, Parsable& tp, - basic_string& abbrev); -template + parse(const CharT* fmt, Parsable& tp, + basic_string& abbrev); +template @\unspec@ - parse(const basic_string& fmt, Parsable& tp, - basic_string& abbrev); + parse(const basic_string& fmt, Parsable& tp, + basic_string& abbrev); \end{itemdecl} \begin{itemdescr} @@ -11114,7 +11114,7 @@ \constraints The expression \begin{codeblock} -from_stream(declval&>(), @$F$@, tp, addressof(abbrev)) +from_stream(declval&>(), @$F$@, tp, addressof(abbrev)) \end{codeblock} is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. @@ -11128,12 +11128,12 @@ \end{itemdescr} \begin{itemdecl} -template +template @\unspec@ - parse(const charT* fmt, Parsable& tp, minutes& offset); -template + parse(const CharT* fmt, Parsable& tp, minutes& offset); +template @\unspec@ - parse(const basic_string& fmt, Parsable& tp, + parse(const basic_string& fmt, Parsable& tp, minutes& offset); \end{itemdecl} @@ -11141,16 +11141,16 @@ \pnum Let $F$ be \tcode{fmt} for the first overload and \tcode{fmt.c_str()} for the second overload. -Let \tcode{traits} be \tcode{char_traits} and -\tcode{Alloc} be \tcode{allocator} for the first overload. +Let \tcode{Traits} be \tcode{char_traits} and +\tcode{Alloc} be \tcode{allocator} for the first overload. \pnum \constraints The expression \begin{codeblock} -from_stream(declval&>(), +from_stream(declval&>(), @$F$@, tp, - declval*>(), + declval*>(), &offset) \end{codeblock} is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. @@ -11165,20 +11165,20 @@ \begin{codeblock} from_stream(is, @$F$@, tp, - static_cast*>(nullptr), + static_cast*>(nullptr), &offset) \end{codeblock} \end{itemdescr} \begin{itemdecl} -template +template @\unspec@ - parse(const charT* fmt, Parsable& tp, - basic_string& abbrev, minutes& offset); -template + parse(const CharT* fmt, Parsable& tp, + basic_string& abbrev, minutes& offset); +template @\unspec@ - parse(const basic_string& fmt, Parsable& tp, - basic_string& abbrev, minutes& offset); + parse(const basic_string& fmt, Parsable& tp, + basic_string& abbrev, minutes& offset); \end{itemdecl} \begin{itemdescr} @@ -11190,7 +11190,7 @@ \constraints The expression \begin{codeblock} -from_stream(declval&>(), +from_stream(declval&>(), @$F$@, tp, addressof(abbrev), &offset) \end{codeblock} is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. diff --git a/source/utilities.tex b/source/utilities.tex index 54df0b8dcc..53438e0170 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -9820,12 +9820,12 @@ constexpr bitset operator|(const bitset&, const bitset&) noexcept; template constexpr bitset operator^(const bitset&, const bitset&) noexcept; - template - basic_istream& - operator>>(basic_istream& is, bitset& x); - template - basic_ostream& - operator<<(basic_ostream& os, const bitset& x); + template + basic_istream& + operator>>(basic_istream& is, bitset& x); + template + basic_ostream& + operator<<(basic_ostream& os, const bitset& x); } \end{codeblock} @@ -9852,28 +9852,28 @@ // \ref{bitset.cons}, constructors constexpr bitset() noexcept; constexpr bitset(unsigned long long val) noexcept; - template + template constexpr explicit bitset( - const basic_string& str, - typename basic_string::size_type pos = 0, - typename basic_string::size_type n - = basic_string::npos, - charT zero = charT('0'), - charT one = charT('1')); - template + const basic_string& str, + typename basic_string::size_type pos = 0, + typename basic_string::size_type n + = basic_string::npos, + CharT zero = CharT('0'), + CharT one = CharT('1')); + template constexpr explicit bitset( - basic_string_view str, - typename basic_string_view::size_type pos = 0, - typename basic_string_view::size_type n - = basic_string_view::npos, - charT zero = charT('0'), - charT one = charT('1')); - template + basic_string_view str, + typename basic_string_view::size_type pos = 0, + typename basic_string_view::size_type n + = basic_string_view::npos, + CharT zero = CharT('0'), + CharT one = CharT('1')); + template constexpr explicit bitset( - const charT* str, - typename basic_string_view::size_type n = basic_string_view::npos, - charT zero = charT('0'), - charT one = charT('1')); + const CharT* str, + typename basic_string_view::size_type n = basic_string_view::npos, + CharT zero = CharT('0'), + CharT one = CharT('1')); // \ref{bitset.members}, bitset operations constexpr bitset& operator&=(const bitset& rhs) noexcept; @@ -9897,11 +9897,11 @@ constexpr unsigned long to_ulong() const; constexpr unsigned long long to_ullong() const; - template, - class Allocator = allocator> - constexpr basic_string - to_string(charT zero = charT('0'), charT one = charT('1')) const; + template, + class Allocator = allocator> + constexpr basic_string + to_string(CharT zero = CharT('0'), CharT one = CharT('1')) const; // observers constexpr size_t count() const noexcept; @@ -9996,22 +9996,22 @@ \indexlibraryctor{bitset}% \begin{itemdecl} -template +template constexpr explicit bitset( - const basic_string& str, - typename basic_string::size_type pos = 0, - typename basic_string::size_type n - = basic_string::npos, - charT zero = charT('0'), - charT one = charT('1')); -template + const basic_string& str, + typename basic_string::size_type pos = 0, + typename basic_string::size_type n + = basic_string::npos, + CharT zero = CharT('0'), + CharT one = CharT('1')); +template constexpr explicit bitset( - basic_string_view str, - typename basic_string_view::size_type pos = 0, - typename basic_string_view::size_type n - = basic_string_view::npos, - charT zero = charT('0'), - charT one = charT('1')); + basic_string_view str, + typename basic_string_view::size_type pos = 0, + typename basic_string_view::size_type n + = basic_string_view::npos, + CharT zero = CharT('0'), + CharT one = CharT('1')); \end{itemdecl} \begin{itemdescr} @@ -10039,7 +10039,7 @@ If \tcode{M < N}, remaining bit positions are initialized to zero. \pnum -The function uses \tcode{traits::eq} +The function uses \tcode{Traits::eq} to compare the character values. \pnum @@ -10055,12 +10055,12 @@ \indexlibraryctor{bitset}% \begin{itemdecl} -template +template constexpr explicit bitset( - const charT* str, - typename basic_string_view::size_type n = basic_string_view::npos, - charT zero = charT('0'), - charT one = charT('1')); + const CharT* str, + typename basic_string_view::size_type n = basic_string_view::npos, + CharT zero = CharT('0'), + CharT one = CharT('1')); \end{itemdecl} \begin{itemdescr} @@ -10068,9 +10068,9 @@ \effects As if by: \begin{codeblock} -bitset(n == basic_string_view::npos - ? basic_string_view(str) - : basic_string_view(str, n), +bitset(n == basic_string_view::npos + ? basic_string_view(str) + : basic_string_view(str, n), 0, n, zero, one) \end{codeblock} \end{itemdescr} @@ -10425,11 +10425,11 @@ \indexlibrarymember{to_string}{bitset}% \begin{itemdecl} -template, - class Allocator = allocator> - constexpr basic_string - to_string(charT zero = charT('0'), charT one = charT('1')) const; +template, + class Allocator = allocator> + constexpr basic_string + to_string(CharT zero = CharT('0'), CharT one = CharT('1')) const; \end{itemdecl} \begin{itemdescr} @@ -10595,9 +10595,9 @@ \indexlibrarymember{operator>>}{bitset}% \begin{itemdecl} -template - basic_istream& - operator>>(basic_istream& is, bitset& x); +template + basic_istream& + operator>>(basic_istream& is, bitset& x); \end{itemdecl} \begin{itemdescr} @@ -10608,7 +10608,7 @@ \effects Extracts up to \tcode{N} characters from \tcode{is}. Stores these characters in a temporary object \tcode{str} of type -\tcode{basic_string}, +\tcode{basic_string}, then evaluates the expression \tcode{x = bitset(str)}. Characters are extracted and stored until any of the following occurs: @@ -10638,18 +10638,18 @@ \indexlibrarymember{operator<<}{bitset}% \begin{itemdecl} -template - basic_ostream& - operator<<(basic_ostream& os, const bitset& x); +template + basic_ostream& + operator<<(basic_ostream& os, const bitset& x); \end{itemdecl} \begin{itemdescr} \pnum \returns \begin{codeblock} -os << x.template to_string>( - use_facet>(os.getloc()).widen('0'), - use_facet>(os.getloc()).widen('1')) +os << x.template to_string>( + use_facet>(os.getloc()).widen('0'), + use_facet>(os.getloc()).widen('1')) \end{codeblock} (see~\ref{ostream.formatted}). \end{itemdescr}