<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 427: Stage 2 and rationale of DR 221</title>
<meta property="og:title" content="Issue 427: Stage 2 and rationale of DR 221">
<meta property="og:description" content="C++ library issue. Status: C++11">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue427.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#C++11">C++11</a> status.</em></p>
<h3 id="427"><a href="lwg-defects.html#427">427</a>. Stage 2 and rationale of DR 221</h3>
<p><b>Section:</b> 28.3.4.3.2.3 <a href="https://wg21.link/facet.num.get.virtuals">[facet.num.get.virtuals]</a> <b>Status:</b> <a href="lwg-active.html#C++11">C++11</a>
 <b>Submitter:</b> Martin Sebor <b>Opened:</b> 2003-09-18 <b>Last modified:</b> 2016-01-28</p>
<p><b>Priority: </b>Not Prioritized
</p>
<p><b>View other</b> <a href="lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
<p><b>View all other</b> <a href="lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#C++11">C++11</a> status.</p>
<p><b>Discussion:</b></p>
<p>
The requirements specified in Stage 2 and reiterated in the rationale
of DR 221 (and echoed again in DR 303) specify that num_get&lt;charT>::
do_get() compares characters on the stream against the widened elements
of "012...abc...ABCX+-"
</p>

<p>
An implementation is required to allow programs to instantiate the num_get
template on any charT that satisfies the requirements on a user-defined
character type. These requirements do not include the ability of the
character type to be equality comparable (the char_traits template must
be used to perform tests for equality). Hence, the num_get template cannot
be implemented to support any arbitrary character type. The num_get template
must either make the assumption that the character type is equality-comparable
(as some popular implementations do), or it may use char_traits&lt;charT> to do
the comparisons (some other popular implementations do that). This diversity
of approaches makes it difficult to write portable programs that attempt to
instantiate the num_get template on user-defined types.
</p>

<p><i>[Kona: the heart of the problem is that we're theoretically
  supposed to use traits classes for all fundamental character
  operations like assignment and comparison, but facets don't have
  traits parameters.  This is a fundamental design flaw and it
  appears all over the place, not just in this one place.  It's not
  clear what the correct solution is, but a thorough review of facets
  and traits is in order.  The LWG considered and rejected the
  possibility of changing numeric facets to use narrowing instead of
  widening.  This may be a good idea for other reasons (see issue
  <a href="lwg-closed.html#459" title="Requirement for widening in stage 2 is overspecification (Status: NAD)">459</a><sup><a href="https://cplusplus.github.io/LWG/issue459" title="Latest snapshot">(i)</a></sup>), but it doesn't solve the problem raised by this
  issue.  Whether we use widen or narrow the <code>num_get</code> facet
  still has no idea which traits class the user wants to use for 
  the comparison, because only streams, not facets, are passed traits
  classes.   The standard does not require that two different
  traits classes with the same <code>char_type</code> must necessarily 
  have the same behavior.]</i></p>


<p>Informally, one possibility: require that some of the basic
character operations, such as <code>eq</code>, <code>lt</code>,
and <code>assign</code>, must behave the same way for all traits classes
with the same <code>char_type</code>.  If we accept that limitation on
traits classes, then the facet could reasonably be required to
use <code>char_traits&lt;charT&gt;</code>.</p>

<p><i>[
2009-07 Frankfurt
]</i></p>


<blockquote>
<p>
There was general agreement that the standard only needs to specify the
behavior when the character type is char or wchar_t.
</p>
<p>
Beman: we don't need to worry about C++1x because there is a non-zero
possibility that we would have a replacement facility for iostreams that
would solve these problems.
</p>
<p>
We need to change the following sentence in [locale.category], paragraph
6 to specify that C is char and wchar_t:
</p>
<p>
"A template formal parameter with name C represents the set of all
possible specializations on a parameter that satisfies the requirements
for a character on which any member of the iostream components can be
instantiated."
</p>
<p>
We also need to specify in 27 that the basic character operations, such
as eq, lt, and assign use std::char_traits.
</p>
<p>
Daniel volunteered to provide wording.
</p>
</blockquote>

<p><i>[
2009-09-19 Daniel provided wording.
]</i></p>


<p><i>[
2009-10 Santa Cruz:
]</i></p>


<blockquote><p>
Leave as Open. Alisdair and&#47;or Tom will provide wording based on discussions.
We want to clearly state that streams and locales work just on <code>char</code>
and <code>wchar_t</code> (except where otherwise specified).
</p></blockquote>

<p><i>[
2010-02-06 Tom updated the proposed wording.
]</i></p>


<blockquote>
<p><i>[
The original proposed wording is preserved here:
]</i></p>


<blockquote class="note">
<ol>
<li>
<p>
Change 28.3.3.1.2.1 <a href="https://wg21.link/locale.category">[locale.category]</a>/6:
</p>

<blockquote><p>
[..] A template formal parameter with name <code>C</code> represents the set of all possible
specializations on a <ins><code>char</code> or <code>wchar_t</code></ins> parameter<del> that satisfies
the requirements for a character on which any of the iostream components
can be instantiated</del>. [..]
</p></blockquote>
</li>

<li>
<p>
Add the following sentence to the end of 28.3.4.3 <a href="https://wg21.link/category.numeric">[category.numeric]</a>/2:
</p>

<blockquote><p>
[..] These specializations refer to [..], and also for the <code>ctype&lt;&gt;</code> facet to
perform character classification. <ins>Implementations are encouraged
but not required to use the <code>char_traits&lt;charT&gt;</code> functions for all
comparisons and assignments of characters of type <code>charT</code> that do
not belong to the set of required specializations.</ins>
</p></blockquote>
</li>

<li>
<p>
Change 28.3.4.3.2.3 <a href="https://wg21.link/facet.num.get.virtuals">[facet.num.get.virtuals]</a>/3:
</p>

<blockquote>
<p>
Stage 2: If <code>in==end</code> then stage 2 terminates. Otherwise a <code>charT</code> is taken
from <code>in</code> and local variables are initialized as if by
</p>

<blockquote><pre>
char_type ct = *in;
<ins>using tr = char_traits&lt;char_type&gt;;
const char_type* pos = tr::find(atoms, sizeof(src) - 1, ct);</ins>
char c = src[<del>find(atoms, atoms + sizeof(src) - 1, ct) - atoms</del>
             <ins>pos ? pos - atoms : sizeof(src) - 1</ins>];
if (<ins>tr::eq(ct, </ins><del>ct == </del>use_facet&lt;numpunct&lt;charT&gt;(loc).decimal_point()<ins>)</ins>)
    c = '.';
bool discard =
    <ins>tr::eq(ct, </ins><del>ct == </del>use_facet&lt;numpunct&lt;charT&gt;(loc).thousands_sep()<ins>)</ins>
    &amp;&amp; use_facet&lt;numpunct&lt;charT&gt; &gt;(loc).grouping().length() != 0;
</pre></blockquote>

<p>
where the values <code>src</code> and <code>atoms</code> are defined as if by: [..]
</p>
</blockquote>

<p>
[Remark of the author: I considered to replace the initialization
"<code>char_type ct = *in;</code>"
by the sequence "<code>char_type ct; tr::assign(ct, *in);</code>", but decided
against it, because
it is a copy-initialization context, not an assignment]
</p>
</li>

<li>
<p>
Add the following sentence to the end of 28.3.4.6 <a href="https://wg21.link/category.time">[category.time]</a>/1:
</p>

<blockquote><p>
[..] Their members use [..] , to determine formatting details.
<ins>Implementations are encouraged but not required to use the
<code>char_traits&lt;charT&gt;</code> functions for all comparisons and assignments
of characters of type <code>charT</code> that do
not belong to the set of required specializations.</ins>
</p></blockquote>
</li>

<li>
<p>
Change 28.3.4.6.2.2 <a href="https://wg21.link/locale.time.get.members">[locale.time.get.members]</a>/8 bullet 4:
</p>

<ul>
<li>
<del>The next element of <code>fmt</code> is equal to <code>'%'</code></del> <ins>For the next element <code>c</code>
of <code>fmt char_traits&lt;char_type&gt;::eq(c, use_facet&lt;ctype&lt;char_type&gt;&gt;(f.getloc()).widen('%')) == true</code></ins>,
[..]
</li>
</ul>
</li>

<li>
<p>
Add the following sentence to the end of 28.3.4.7 <a href="https://wg21.link/category.monetary">[category.monetary]</a>/2:
</p>

<blockquote><p>
Their members use [..] to determine formatting details.
<ins>Implementations are encouraged but not required to use the
<code>char_traits&lt;charT&gt;</code> functions for all comparisons and assignments
of characters of type <code>charT</code> that do
not belong to the set of required specializations.</ins>
</p></blockquote>
</li>

<li>
<p>
Change 28.3.4.7.2.3 <a href="https://wg21.link/locale.money.get.virtuals">[locale.money.get.virtuals]</a>/4:
</p>

<blockquote>
<p>
[..] The value <code>units</code> is produced as if by:
</p>

<blockquote><pre>
for (int i = 0; i &lt; n; ++i)
  buf2[i] = src[<ins>char_traits&lt;charT&gt;::</ins>find(atoms, <del>atoms+</del>sizeof(src), buf1[i]) - atoms];
buf2[n] = 0;
sscanf(buf2, "%Lf", &amp;units);
</pre></blockquote>
</blockquote>
</li>

<li>
<p>
Change 28.3.4.7.3.3 <a href="https://wg21.link/locale.money.put.virtuals">[locale.money.put.virtuals]</a>/1:
</p>

<blockquote><p>
[..] for character buffers <code>buf1</code> and <code>buf2</code>. If <ins>for</ins> the first
character <ins><code>c</code></ins>
in <code>digits</code> or <code>buf2</code> <del>is equal to
<code>ct.widen('-')</code></del><ins><code>char_traits&lt;charT&gt;::eq(c,
ct.widen('-')) == true</code></ins>, [..]
</p></blockquote>
</li>

<li>
<p>
Add a footnote to the first sentence of 31.7.5.3.2 <a href="https://wg21.link/istream.formatted.arithmetic">[istream.formatted.arithmetic]</a>/1:
</p>

<blockquote>
<p>
As in the case of the inserters, these extractors depend on the locale's
<code>num_get&lt;&gt;</code> (22.4.2.1) object to perform parsing the input stream
data.<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the input stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote to the second sentence of 31.7.6.3.2 <a href="https://wg21.link/ostream.inserters.arithmetic">[ostream.inserters.arithmetic]</a>/1:
</p>

<blockquote>
<p>
<i>Effects:</i> The classes <code>num_get&lt;&gt;</code> and
<code>num_put&lt;&gt;</code> handle locale-dependent numeric formatting and
parsing. These inserter functions use the imbued locale value to perform
numeric formatting.<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the output stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/4:
</p>

<blockquote>
<p>
<i>Returns:</i> An object of unspecified type such that if in is an object of type
<code>basic_istream&lt;charT, traits&gt;</code> then the expression <code>in &gt;&gt; get_money(mon, intl)</code>
behaves as if it called <code>f(in, mon, intl)</code>, where the function <code>f</code> is defined
as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the input stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/5:
</p>

<blockquote>
<p>
<i>Returns:</i> An object of unspecified type such that if <code>out</code> is an object of type
<code>basic_ostream&lt;charT, traits&gt;</code> then the expression <code>out &lt;&lt; put_money(mon, intl)</code>
behaves as a formatted input function that calls <code>f(out, mon, intl)</code>, where the
function <code>f</code> is defined as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the output stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
13) Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/8:
</p>

<blockquote>
<p>
<i>Returns:</i> An object of unspecified type such that if <code>in</code> is an
object of type b<code>asic_istream&lt;charT, traits&gt;</code> then the expression
<code>in &gt;&gt;get_time(tmb, fmt)</code> behaves as if it called <code>f(in, tmb, fmt)</code>,
where the function <code>f</code> is defined as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the input stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/10:
</p>

<blockquote>
<p>
Returns: An object of unspecified type such that if <code>out</code> is an object of type
<code>basic_ostream&lt;charT, traits&gt;</code> then the expression <code>out &lt;&lt;put_time(tmb, fmt)</code>
behaves as if it called <code>f(out, tmb, fmt)</code>, where the function <code>f</code> is defined
as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the output stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>
</ol>

</blockquote>
</blockquote>

<p><i>[
2010 Pittsburgh:
]</i></p>


<blockquote>
<p>
Moved to Ready with only two of the bullets.  The original wording is preserved
here:
</p>

<blockquote class="note">
<ol>
<li>
<p>
Change 28.3.3.1.2.1 <a href="https://wg21.link/locale.category">[locale.category]</a>/6:
</p>

<blockquote><p>
[..] A template formal parameter with name <code>C</code> represents 
the set 
<del>of all possible specializations on a</del> 
<ins>of types containing <code>char</code>, <code>wchar_t</code>,
and any other implementation-defined character type
</ins>
<del> parameter</del>
that satisfies
the requirements for a character on which any of the iostream components
can be instantiated. [..]
</p></blockquote>
</li>

<li>
<p>
Add the following sentence to the end of 28.3.4.3 <a href="https://wg21.link/category.numeric">[category.numeric]</a>/2:
</p>

<blockquote><p>
[..] These specializations refer to [..], and also for the <code>ctype&lt;&gt;</code> facet to
perform character classification. <ins>[<i>Note:</i> Implementations are encouraged
but not required to use the <code>char_traits&lt;charT&gt;</code> functions for all
comparisons and assignments of characters of type <code>charT</code> that do
not belong to the set of required specializations - <i>end note</i>].</ins>
</p></blockquote>
</li>

<li>
<p>
Change 28.3.4.3.2.3 <a href="https://wg21.link/facet.num.get.virtuals">[facet.num.get.virtuals]</a>/3:
</p>

<blockquote>
<p>
Stage 2: If <code>in==end</code> then stage 2 terminates. Otherwise a <code>charT</code> is taken
from <code>in</code> and local variables are initialized as if by
</p>

<blockquote><pre>
char_type ct = *in;
<ins>using tr = char_traits&lt;char_type&gt;;
const char_type* pos = tr::find(atoms, sizeof(src) - 1, ct);</ins>
char c = src[<del>find(atoms, atoms + sizeof(src) - 1, ct) - atoms</del>
             <ins>pos ? pos - atoms : sizeof(src) - 1</ins>];
if (<ins>tr::eq(ct, </ins><del>ct == </del>use_facet&lt;numpunct&lt;charT&gt;(loc).decimal_point()<ins>)</ins>)
    c = '.';
bool discard =
    <ins>tr::eq(ct, </ins><del>ct == </del>use_facet&lt;numpunct&lt;charT&gt;(loc).thousands_sep()<ins>)</ins>
    &amp;&amp; use_facet&lt;numpunct&lt;charT&gt; &gt;(loc).grouping().length() != 0;
</pre></blockquote>

<p>
where the values <code>src</code> and <code>atoms</code> are defined as if by: [..]
</p>
</blockquote>

<p>
[Remark of the author: I considered to replace the initialization
"<code>char_type ct = *in;</code>"
by the sequence "<code>char_type ct; tr::assign(ct, *in);</code>", but decided
against it, because
it is a copy-initialization context, not an assignment]
</p>
</li>

<li>
<p>
Add the following sentence to the end of 28.3.4.6 <a href="https://wg21.link/category.time">[category.time]</a>/1:
</p>

<blockquote><p>
[..] Their members use [..] , to determine formatting details.
<ins>[<i>Note:</i> Implementations are encouraged but not required to use the
<code>char_traits&lt;charT&gt;</code> functions for all comparisons and assignments
of characters of type <code>charT</code> that do
not belong to the set of required specializations - <i>end note</i>].</ins>
</p></blockquote>
</li>

<li>
<p>
Change 28.3.4.6.2.2 <a href="https://wg21.link/locale.time.get.members">[locale.time.get.members]</a>/8 bullet 4:
</p>

<ul>
<li>
<del>The next element of <code>fmt</code> is equal to <code>'%'</code></del> <ins>For the next element <code>c</code>
of <code>fmt char_traits&lt;char_type&gt;::eq(c, use_facet&lt;ctype&lt;char_type&gt;&gt;(f.getloc()).widen('%')) == true</code></ins>,
[..]
</li>
</ul>
</li>

<li>
<p>
Add the following sentence to the end of 28.3.4.7 <a href="https://wg21.link/category.monetary">[category.monetary]</a>/2:
</p>

<blockquote><p>
Their members use [..] to determine formatting details.
<ins>[<i>Note:</i> Implementations are encouraged but not required to use the
<code>char_traits&lt;charT&gt;</code> functions for all comparisons and assignments
of characters of type <code>charT</code> that do
not belong to the set of required specializations - <i>end note</i>].</ins>
</p></blockquote>
</li>

<li>
<p>
Change 28.3.4.7.2.3 <a href="https://wg21.link/locale.money.get.virtuals">[locale.money.get.virtuals]</a>/4:
</p>

<blockquote>
<p>
[..] The value <code>units</code> is produced as if by:
</p>

<blockquote><pre>
for (int i = 0; i &lt; n; ++i)
  buf2[i] = src[<ins>char_traits&lt;charT&gt;::</ins>find(atoms, <del>atoms+</del>sizeof(src), buf1[i]) - atoms];
buf2[n] = 0;
sscanf(buf2, "%Lf", &amp;units);
</pre></blockquote>
</blockquote>
</li>

<li>
<p>
Change 28.3.4.7.3.3 <a href="https://wg21.link/locale.money.put.virtuals">[locale.money.put.virtuals]</a>/1:
</p>

<blockquote><p>
[..] for character buffers <code>buf1</code> and <code>buf2</code>. If <ins>for</ins> the first
character <ins><code>c</code></ins>
in <code>digits</code> or <code>buf2</code> <del>is equal to
<code>ct.widen('-')</code></del><ins><code>char_traits&lt;charT&gt;::eq(c,
ct.widen('-')) == true</code></ins>, [..]
</p></blockquote>
</li>

<li>
<p>
Add a new paragraph after the 
first paragraph of 31.2.3 <a href="https://wg21.link/iostreams.limits.pos">[iostreams.limits.pos]</a>/1:
</p>
<blockquote><p>
In the classes of clause 27,
a template formal parameter with name <code>charT</code> represents 
one of
the set of types
containing <code>char</code>, <code>wchar_t</code>,
and any other implementation-defined character type
that satisfies
the requirements for a character on which any of the iostream components
can be instantiated.
</p></blockquote>
</li>

<li>
<p>
Add a footnote to the first sentence of 31.7.5.3.2 <a href="https://wg21.link/istream.formatted.arithmetic">[istream.formatted.arithmetic]</a>/1:
</p>

<blockquote>
<p>
As in the case of the inserters, these extractors depend on the locale's
<code>num_get&lt;&gt;</code> (22.4.2.1) object to perform parsing the input stream
data.<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the input stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote to the second sentence of 31.7.6.3.2 <a href="https://wg21.link/ostream.inserters.arithmetic">[ostream.inserters.arithmetic]</a>/1:
</p>

<blockquote>
<p>
<i>Effects:</i> The classes <code>num_get&lt;&gt;</code> and
<code>num_put&lt;&gt;</code> handle locale-dependent numeric formatting and
parsing. These inserter functions use the imbued locale value to perform
numeric formatting.<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the output stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>


<li>
<p>
Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/4:
</p>

<blockquote>
<p>
<i>Returns:</i> An object of unspecified type such that if in is an object of type
<code>basic_istream&lt;charT, traits&gt;</code> then the expression <code>in &gt;&gt; get_money(mon, intl)</code>
behaves as if it called <code>f(in, mon, intl)</code>, where the function <code>f</code> is defined
as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the input stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/5:
</p>

<blockquote>
<p>
<i>Returns:</i> An object of unspecified type such that if <code>out</code> is an object of type
<code>basic_ostream&lt;charT, traits&gt;</code> then the expression <code>out &lt;&lt; put_money(mon, intl)</code>
behaves as a formatted input function that calls <code>f(out, mon, intl)</code>, where the
function <code>f</code> is defined as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the output stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/8:
</p>

<blockquote>
<p>
<i>Returns:</i> An object of unspecified type such that if <code>in</code> is an
object of type b<code>asic_istream&lt;charT, traits&gt;</code> then the expression
<code>in &gt;&gt;get_time(tmb, fmt)</code> behaves as if it called <code>f(in, tmb, fmt)</code>,
where the function <code>f</code> is defined as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the input stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>

<li>
<p>
Add a footnote after the first sentence of 31.7.8 <a href="https://wg21.link/ext.manip">[ext.manip]</a>/10:
</p>

<blockquote>
<p>
Returns: An object of unspecified type such that if <code>out</code> is an object of type
<code>basic_ostream&lt;charT, traits&gt;</code> then the expression <code>out &lt;&lt;put_time(tmb, fmt)</code>
behaves as if it called <code>f(out, tmb, fmt)</code>, where the function <code>f</code> is defined
as:<ins><sup>(footnote)</sup></ins> [..]
</p>

<p>
<ins>
<sup>footnote)</sup> If the traits of the output stream has different semantics for <code>lt()</code>,
<code>eq()</code>, and <code>assign()</code> than <code>char_traits&lt;char_type&gt;</code>, this may give surprising
results.
</ins>
</p>
</blockquote>
</li>
</ol>
</blockquote>
</blockquote>



<p id="res-427"><b>Proposed resolution:</b></p>
<ol>
<li>
<p>
Change 28.3.3.1.2.1 <a href="https://wg21.link/locale.category">[locale.category]</a>/6:
</p>

<blockquote><p>
[..] A template formal parameter with name <code>C</code> represents 
the set 
<del>of all possible specializations on a</del> 
<ins>of types containing <code>char</code>, <code>wchar_t</code>,
and any other implementation-defined character type
</ins>
<del> parameter</del>
that satisfies
the requirements for a character on which any of the iostream components
can be instantiated. [..]
</p></blockquote>
</li>

<li>
<p>
Add a new paragraph after the 
first paragraph of 31.2.3 <a href="https://wg21.link/iostreams.limits.pos">[iostreams.limits.pos]</a>/1:
</p>
<blockquote><p>
In the classes of clause 27,
a template formal parameter with name <code>charT</code> represents 
one of
the set of types
containing <code>char</code>, <code>wchar_t</code>,
and any other implementation-defined character type
that satisfies
the requirements for a character on which any of the iostream components
can be instantiated.
</p></blockquote>
</li>

</ol>




</body>
</html>
