Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 39 additions & 68 deletions source/locales.tex
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
template<class Facet> locale combine(const locale& other) const;

// locale operations
basic_string<char> name() const;
string name() const;

bool operator==(const locale& other) const;

Expand Down Expand Up @@ -573,9 +573,6 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Default constructor: a snapshot of the current global locale.

\pnum
\effects
Constructs a copy of the argument last passed to
Expand All @@ -584,24 +581,12 @@
function semantics identical to those of
\tcode{locale::classic()}.
\begin{note}
This constructor is commonly used as the default value for arguments
of functions that take a
\tcode{const locale\&}
argument.
This constructor yields a copy of the current global locale.
It is commonly used as a default argument for
function parameters of type \tcode{const locale\&}.
\end{note}
\end{itemdescr}

\indexlibraryctor{locale}%
\begin{itemdecl}
locale(const locale& other) noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
Constructs a locale which is a copy of \tcode{other}.
\end{itemdescr}

\indexlibraryctor{locale}%
\begin{itemdecl}
explicit locale(const char* std_name);
Expand Down Expand Up @@ -728,16 +713,6 @@
\tcode{*this}.
\end{itemdescr}

\indexlibrarydtor{locale}%
\begin{itemdecl}
~locale();
\end{itemdecl}

\begin{itemdescr}
\pnum
A non-virtual destructor that throws no exceptions.
\end{itemdescr}

\rSec3[locale.members]{Members}

\indexlibrarymember{locale}{combine}%
Expand Down Expand Up @@ -774,7 +749,7 @@

\indexlibrarymember{locale}{name}%
\begin{itemdecl}
basic_string<char> name() const;
string name() const;
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -852,11 +827,9 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Sets the global locale to its argument.

\pnum
\effects
Sets the global locale to its argument.
Causes future calls to the constructor
\tcode{locale()}
to return a copy of the argument.
Expand All @@ -866,9 +839,12 @@
\end{codeblock}
otherwise, the effect on the C locale, if any, is \impldef{effect on C locale of calling
\tcode{locale::global}}.

\pnum
\remarks
No library function other than
\tcode{locale::global()}
shall affect the value returned by
affects the value returned by
\tcode{locale()}.
\begin{note}
See~\ref{c.locales} for data race considerations when
Expand Down Expand Up @@ -910,7 +886,7 @@

\begin{itemdescr}
\pnum
\requires
\mandates
\tcode{Facet}
is a facet class whose definition contains the public static member
\tcode{id}
Expand Down Expand Up @@ -1605,10 +1581,8 @@

\begin{itemdescr}
\pnum
\requires
\tcode{tbl} either 0 or an array of at least
\tcode{table_size}
elements.
\expects
Either \tcode{tbl == nullptr} is \tcode{true} or \range{tbl}{tbl+table_size} is a valid range.

\pnum
\effects
Expand Down Expand Up @@ -2001,12 +1975,10 @@

\begin{itemdescr}
\pnum
\requires
\tcode{(from <= from_end \&\& to <= to_end)}
well-defined and
\tcode{true};
\tcode{state} initialized, if at the beginning of a sequence, or else equal to
the result of converting the preceding characters in the sequence.
\expects
\tcode{(from <= from_end \&\& to <= to_end)} is well-defined and \tcode{true};
\tcode{state} is initialized, if at the beginning of a sequence,
or else is equal to the result of converting the preceding characters in the sequence.

\pnum
\effects
Expand Down Expand Up @@ -2122,10 +2094,10 @@

\begin{itemdescr}
\pnum
\requires
\tcode{(to <= to_end)}
well-defined and \tcode{true}; state initialized, if at the beginning of a sequence,
or else equal to the result of converting the preceding characters in the
\expects
\tcode{(to <= to_end)} is well-defined and \tcode{true};
\tcode{state} is initialized, if at the beginning of a sequence,
or else is equal to the result of converting the preceding characters in the
sequence.

\pnum
Expand Down Expand Up @@ -2202,16 +2174,14 @@

\begin{itemdescr}
\pnum
\requires
\tcode{(from <= from_end)}
well-defined and
\tcode{true};
\tcode{state} initialized, if at the beginning of a sequence, or else equal to
the result of converting the preceding characters in the sequence.
\expects
\tcode{(from <= from_end)} is well-defined and \tcode{true};
\tcode{state} is initialized, if at the beginning of a sequence,
or else is equal to the result of converting the preceding characters in the sequence.

\pnum
\effects
The effect on the \tcode{state} argument is ``as if'' it called
The effect on the \tcode{state} argument is as if it called
\tcode{do_in(state, from, from_end, from, to, to+max, to)}
for \tcode{to} pointing to a buffer of at least \tcode{max} elements.

Expand Down Expand Up @@ -3249,7 +3219,7 @@
\begin{itemdescr}
\pnum
\returns
A basic_string<char> \tcode{vec} used as a vector of integer values,
A \tcode{string} \tcode{vec} used as a vector of integer values,
in which each element
\tcode{vec[i]}
represents the number of digits\footnote{Thus, the string
Expand Down Expand Up @@ -3677,7 +3647,8 @@

\begin{itemdescr}
\pnum
\requires \range{fmt}{fmtend} shall be a valid range.
\expects
\range{fmt}{fmtend} is a valid range.

\pnum
\effects
Expand Down Expand Up @@ -3882,8 +3853,8 @@

\begin{itemdescr}
\pnum
\requires
\tcode{t} shall point to an object.
\expects
\tcode{t} points to an object.

\pnum
\effects
Expand Down Expand Up @@ -4861,7 +4832,7 @@

explicit messages(size_t refs = 0);

catalog open(const basic_string<char>& fn, const locale&) const;
catalog open(const string& fn, const locale&) const;
string_type get(catalog c, int set, int msgid,
const string_type& dfault) const;
void close(catalog c) const;
Expand All @@ -4870,7 +4841,7 @@

protected:
~messages();
virtual catalog do_open(const basic_string<char>&, const locale&) const;
virtual catalog do_open(const string&, const locale&) const;
virtual string_type do_get(catalog, int set, int msgid,
const string_type& dfault) const;
virtual void do_close(catalog) const;
Expand All @@ -4892,7 +4863,7 @@

\indexlibrarymember{messages}{open}%
\begin{itemdecl}
catalog open(const basic_string<char>& name, const locale& loc) const;
catalog open(const string& name, const locale& loc) const;
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -4928,7 +4899,7 @@

\indexlibrarymember{messages}{do_open}%
\begin{itemdecl}
catalog do_open(const basic_string<char>& name, const locale& loc) const;
catalog do_open(const string& name, const locale& loc) const;
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -4959,8 +4930,8 @@

\begin{itemdescr}
\pnum
\requires
\tcode{cat} shall be a catalog obtained from
\expects
\tcode{cat} is a catalog obtained from
\tcode{open()}
and not yet closed.

Expand All @@ -4978,8 +4949,8 @@

\begin{itemdescr}
\pnum
\requires
\tcode{cat} shall be a catalog obtained from
\expects
\tcode{cat} is a catalog obtained from
\tcode{open()}
and not yet closed.

Expand Down