<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 160</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="160"></A><H4>160.
  
Missing <TT>std::</TT> qualification
</H4>
<B>Section: </B>9.3.3&#160; [<A href="https://wg21.link/dcl.ambig.res">dcl.ambig.res</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD1
 &#160;&#160;&#160;

 <B>Submitter: </B>Al Stevens
 &#160;&#160;&#160;

 <B>Date: </B>23 Aug 1999<BR>



<P>[Moved to DR at 10/01 meeting.]</P>

<P>9.3.3 [<A href="https://wg21.link/dcl.ambig.res#3">dcl.ambig.res</A>] paragraph 3

shows an example that includes <TT>&lt;cstddef&gt;</TT> with no using
declarations or directives and refers to <TT>size_t</TT>
without the <TT>std::</TT>
qualification.</P>

<P>Many references to <TT>size_t</TT> throughout the document omit the
<TT>std::</TT>
namespace
qualification.</P>

<P>This is a typical case. The use of <TT>std::</TT>
is inconsistent throughout
the
document.</P>

<P>In addition, the use of exception specifications should be
examined for consistency.</P>

<P>(See also <A HREF="282.html">issue 282</A>.)</P>

<P><B>Proposed resolution:</B></P>

<P>In
6.10.1 [<A href="https://wg21.link/intro.execution#9">intro.execution</A>] paragraph 9,
 replace all two instances of "<TT>sig_atomic_t</TT>"
by "<TT>std::sig_atomic_t</TT>".</P>


<P>In
6.2 [<A href="https://wg21.link/basic.def#4">basic.def</A>] paragraph 4,
 replace all three instances of "<TT>string</TT>" by
"<TT>std::string</TT>" in the example and insert "<TT>#include
&lt;string&gt;</TT>" at the beginning of the example code.</P>


<P>In
6.10.3.1 [<A href="https://wg21.link/basic.start.main#4">basic.start.main</A>] paragraph 4,
 replace</P>
<BLOCKQUOTE>
Calling the function
<BLOCKQUOTE>
<TT>void exit(int);</TT>
</BLOCKQUOTE>
declared in <TT>&lt;cstdlib&gt;</TT>...
</BLOCKQUOTE>
<P>by</P>
<BLOCKQUOTE>
Calling the function <TT>std::exit(int)</TT> declared in
<TT>&lt;cstdlib&gt;</TT>...
</BLOCKQUOTE>
<P>and also replace "<TT>exit</TT>" by "<TT>std::exit</TT>" in
the last sentence of that paragraph.</P>


<P>In
6.10.3.1 [<A href="https://wg21.link/basic.start.main">basic.start.main</A>]
first sentence of paragraph 5, replace "<TT>exit</TT>" by
"<TT>std::exit</TT>".</P>


<P>In
6.10.3.2 [<A href="https://wg21.link/basic.start.static#4">basic.start.static</A>] paragraph 4,
 replace "<TT>terminate</TT>" by
"<TT>std::terminate</TT>".</P>


<P>In
6.10.3.3 [<A href="https://wg21.link/basic.start.dynamic#1">basic.start.dynamic</A>] paragraph 1,
 replace "<TT>exit</TT>" by "<TT>std::exit</TT>"
(see also <A HREF="28.html">issue 28</A>).</P>


<P>In
6.10.3.3 [<A href="https://wg21.link/basic.start.dynamic#3">basic.start.dynamic</A>] paragraph 3,
 replace all three instances of "<TT>atexit</TT>" by
"<TT>std::atexit</TT>" and both instances of "<TT>exit</TT>"
by "<TT>std::exit</TT>" (see also <A HREF="28.html">issue 28</A>).</P>


<P>In
6.10.3.3 [<A href="https://wg21.link/basic.start.dynamic#4">basic.start.dynamic</A>] paragraph 4,
 replace</P>
<BLOCKQUOTE>
Calling the function
<BLOCKQUOTE>
<TT>void abort();</TT>
</BLOCKQUOTE>
declared in <TT>&lt;cstdlib&gt;</TT>...
</BLOCKQUOTE>
<P>by</P>
<BLOCKQUOTE>
Calling the function <TT>std::abort()</TT> declared in
<TT>&lt;cstdlib&gt;</TT>...</BLOCKQUOTE>
and "<TT>atexit</TT>" by "<TT>std::atexit</TT>" (see also
<A HREF="28.html">issue 28</A>).


<P>In
6.8.6.5.2 [<A href="https://wg21.link/basic.stc.dynamic.allocation#1">basic.stc.dynamic.allocation</A>] paragraph 1
third sentence, replace "<TT>size_t</TT>" by
"<TT>std::size_t</TT>".</P>


<P>In
6.8.6.5.2 [<A href="https://wg21.link/basic.stc.dynamic.allocation#3">basic.stc.dynamic.allocation</A>] paragraph 3,
 replace "<TT>new_handler</TT>" by
"<TT>std::new_handler</TT>". Furthermore, replace
"<TT>set_new_handler</TT>" by "<TT>std::set_new_handler</TT>"
in the note.</P>


<P>In
6.8.6.5.2 [<A href="https://wg21.link/basic.stc.dynamic.allocation#4">basic.stc.dynamic.allocation</A>] paragraph 4,
 replace "<TT>type_info</TT>" by
"<TT>std::type_info</TT>" in the note.</P>


<P>In
6.8.6.5.3 [<A href="https://wg21.link/basic.stc.dynamic.deallocation#3">basic.stc.dynamic.deallocation</A>] paragraph 3,
 replace all four instances of "<TT>size_t</TT>" by
"<TT>std::size_t</TT>".</P>


<P>In
6.8.4 [<A href="https://wg21.link/basic.life#5">basic.life</A>] paragraph 5,
 replace "<TT>malloc</TT>" by
"<TT>std::malloc</TT>" in the example code and insert
"<TT>#include &lt;cstdlib&gt;</TT>" at the beginning of the example
code.</P>


<P>In
6.9 [<A href="https://wg21.link/basic.types#2">basic.types</A>] paragraph 2,
 replace "<TT>memcpy</TT>" by
"<TT>std::memcpy</TT>" (the only instance in the footnote and both
instances in the example) and replace "<TT>memmove</TT>" by
"<TT>std::memmove</TT>" in the footnote (see also
<A HREF="43.html">issue 43</A>).</P>


<P>In
6.9 [<A href="https://wg21.link/basic.types#3">basic.types</A>] paragraph 3,
 replace "<TT>memcpy</TT>" by
"<TT>std::memcpy</TT>", once in the normative text and once in the
example (see also <A HREF="43.html">issue 43</A>).</P>


<P>In
6.9.2 [<A href="https://wg21.link/basic.fundamental#8">basic.fundamental</A>] paragraph 8
last sentence, replace "<TT>numeric_limits</TT>" by
"<TT>std::numeric_limits</TT>".</P>


<P>In
7.6.1.7 [<A href="https://wg21.link/expr.dynamic.cast#9">expr.dynamic.cast</A>] paragraph 9
second sentence, replace "<TT>bad_cast</TT>" by
"<TT>std::bad_cast</TT>".</P>


<P>In
7.6.1.8 [<A href="https://wg21.link/expr.typeid#2">expr.typeid</A>] paragraph 2,
 replace "<TT>type_info</TT>" by
"<TT>std::type_info</TT>" and "<TT>bad_typeid</TT>" by
"<TT>std::bad_typeid</TT>".</P>


<P>In
7.6.1.8 [<A href="https://wg21.link/expr.typeid#3">expr.typeid</A>] paragraph 3,
 replace "<TT>type_info</TT>" by
"<TT>std::type_info</TT>".</P>


<P>In
7.6.1.8 [<A href="https://wg21.link/expr.typeid#4">expr.typeid</A>] paragraph 4,
 replace both instances of "<TT>type_info</TT>" by
"<TT>std::type_info</TT>".</P>


<P>In
7.6.2.5 [<A href="https://wg21.link/expr.sizeof#6">expr.sizeof</A>] paragraph 6,
 replace both instances of "<TT>size_t</TT>" by
"<TT>std::size_t</TT>".</P>


<P>In
7.6.2.8 [<A href="https://wg21.link/expr.new#11">expr.new</A>] paragraph 11
last sentence, replace "<TT>size_t</TT>" by
"<TT>std::size_t</TT>".</P>


<P>In
7.6.6 [<A href="https://wg21.link/expr.add#6">expr.add</A>] paragraph 6,
 replace both instances of "<TT>ptrdiff_t</TT>" by
"<TT>std::ptrdiff_t</TT>".</P>


<P>In
7.6.6 [<A href="https://wg21.link/expr.add#8">expr.add</A>] paragraph 8,
 replace "<TT>ptrdiff_t</TT>" by
"<TT>std::ptrdiff_t</TT>".</P>


<P>In
8.8 [<A href="https://wg21.link/stmt.jump#2">stmt.jump</A>] paragraph 2,
 replace "<TT>exit</TT>" by "<TT>std::exit</TT>"
and "<TT>abort</TT>" by "<TT>std::abort</TT>" in the note.</P>


<P>In
9.3.3 [<A href="https://wg21.link/dcl.ambig.res#3">dcl.ambig.res</A>] paragraph 3,
 replace "<TT>size_t</TT>" by
"<TT>std::size_t</TT>" in the example.</P>


<P>In
9.6 [<A href="https://wg21.link/dcl.fct.def#5">dcl.fct.def</A>] paragraph 5,
 replace "<TT>printf</TT>" by
"<TT>std::printf</TT>" in the note.</P>


<P>In
11.4.7 [<A href="https://wg21.link/class.dtor#13">class.dtor</A>] paragraph 13,
 replace "<TT>size_t</TT>" by
"<TT>std::size_t</TT>" in the example.</P>


<P>In
11.4.11 [<A href="https://wg21.link/class.free#2">class.free</A>] paragraph 2,
 replace all four instances of "<TT>size_t</TT>" by
"<TT>std::size_t</TT>" in the example.</P>


<P>In
11.4.11 [<A href="https://wg21.link/class.free#6">class.free</A>] paragraph 6,
 replace both instances of "<TT>size_t</TT>" by
"<TT>std::size_t</TT>" in the example.</P>


<P>In
11.4.11 [<A href="https://wg21.link/class.free#7">class.free</A>] paragraph 7,
 replace all four instances of "<TT>size_t</TT>" by
"<TT>std::size_t</TT>" in the two examples.</P>


<P>In
11.9.5 [<A href="https://wg21.link/class.cdtor#4">class.cdtor</A>] paragraph 4,
 replace "<TT>type_info</TT>" by
"<TT>std::type_info</TT>".</P>


<P>In
12.5 [<A href="https://wg21.link/over.built#13">over.built</A>] paragraph 13,
 replace all five instances of "<TT>ptrdiff_t</TT>"
by "<TT>std::ptrdiff_t</TT>".</P>


<P>In
12.5 [<A href="https://wg21.link/over.built#14">over.built</A>] paragraph 14,
 replace "<TT>ptrdiff_t</TT>" by
"<TT>std::ptrdiff_t</TT>".</P>


<P>In
12.5 [<A href="https://wg21.link/over.built#21">over.built</A>] paragraph 21,
 replace both instances of "<TT>ptrdiff_t</TT>" by
"<TT>std::ptrdiff_t</TT>".</P>


<P>In
13.3 [<A href="https://wg21.link/temp.names#4">temp.names</A>] paragraph 4,
 replace both instances of "<TT>size_t</TT>" by
"<TT>std::size_t</TT>" in the example.  (The example is quoted in
<A HREF="96.html">issue 96</A>.)</P>


<P>In
13.4 [<A href="https://wg21.link/temp.arg#1">temp.arg</A>] paragraph 1,
 replace "<TT>complex</TT>" by
"<TT>std::complex</TT>", once in the example code and once in the
comment.</P>


<P>In
13.9.4 [<A href="https://wg21.link/temp.expl.spec#8">temp.expl.spec</A>] paragraph 8,
 <A HREF="24.html">issue 24</A>
has already corrected the example.</P>


<P>In
14.2 [<A href="https://wg21.link/except.throw#6">except.throw</A>] paragraph 6,
 replace "<TT>uncaught_exception</TT>" by
"<TT>std::uncaught_exception</TT>".</P>


<P>In
14.2 [<A href="https://wg21.link/except.throw#7">except.throw</A>] paragraph 7,
 replace "<TT>terminate</TT>" by
"<TT>std::terminate</TT>" and both instances of
"<TT>unexpected</TT>" by "<TT>std::unexpected</TT>".</P>


<P>In
14.2 [<A href="https://wg21.link/except.throw#8">except.throw</A>] paragraph 8,
 replace "<TT>terminate</TT>" by
"<TT>std::terminate</TT>".</P>


<P>In
14.3 [<A href="https://wg21.link/except.ctor#3">except.ctor</A>] paragraph 3,
 replace "<TT>terminate</TT>" by
"<TT>std::terminate</TT>".</P>


<P>In
14.4 [<A href="https://wg21.link/except.handle#9">except.handle</A>] paragraph 9,
 replace "<TT>terminate</TT>" by
"<TT>std::terminate</TT>".</P>


<P>In
14.5 [<A href="https://wg21.link/except.spec#8">except.spec</A>] paragraph 8,
 replace "<TT>unexpected</TT>" by
"<TT>std::unexpected</TT>".</P>


<P>In
14.5 [<A href="https://wg21.link/except.spec#9">except.spec</A>] paragraph 9,
 replace "<TT>unexpected</TT>" by
"<TT>std::unexpected</TT>" and "<TT>terminate</TT>" by
"<TT>std::terminate</TT>".</P>


<P>In
14.6 [<A href="https://wg21.link/except.special#1">except.special</A>] paragraph 1,
 replace "<TT>terminate</TT>" by
"<TT>std::terminate</TT>" and "<TT>unexpected</TT>" by
"<TT>std::unexpected</TT>".</P>


<P>In the heading of
14.6.2 [<A href="https://wg21.link/except.terminate">except.terminate</A>],
replace "<TT>terminate</TT>" by "<TT>std::terminate</TT>".</P>


<P>In
14.6.2 [<A href="https://wg21.link/except.terminate#1">except.terminate</A>] paragraph 1,
 footnote in the first bullet, replace
"<TT>terminate</TT>" by "<TT>std::terminate</TT>".  In the
same paragraph, fifth bullet, replace "<TT>atexit</TT>" by
"<TT>std::atexit</TT>".  In the same paragraph, last bullet,
replace "<TT>unexpected_handler</TT>" by
"<TT>std::unexpected_handler</TT>".</P>


<P>In
14.6.2 [<A href="https://wg21.link/except.terminate#2">except.terminate</A>] paragraph 2,
 replace</P>
<BLOCKQUOTE>
In such cases,
<BLOCKQUOTE>
<TT>void terminate();</TT>
</BLOCKQUOTE>
is called...
</BLOCKQUOTE>
<P>by</P>
<BLOCKQUOTE>
In such cases, <TT>std::terminate()</TT> is called...
</BLOCKQUOTE>
<P>and replace all three instances of "<TT>terminate</TT>" by
"<TT>std::terminate</TT>".</P>


<P>In the heading of
_N4606_.15.5.2 [<A href="https://wg21.link/except.unexpected">except.unexpected</A>],
replace "<TT>unexpected</TT>" by "<TT>std::unexpected</TT>".</P>


<P>In
_N4606_.15.5.2 [<A href="https://wg21.link/except.unexpected#1">except.unexpected</A>] paragraph 1,
 replace </P>
<BLOCKQUOTE>
...the function
<BLOCKQUOTE>
<TT>void unexpected();</TT>
</BLOCKQUOTE>
is called...
</BLOCKQUOTE>
<P>by</P>
<BLOCKQUOTE>
...the function <TT>std::unexpected()</TT> is called...
</BLOCKQUOTE>.


<P>In
_N4606_.15.5.2 [<A href="https://wg21.link/except.unexpected#2">except.unexpected</A>] paragraph 2,
 replace "<TT>unexpected</TT>" by
"<TT>std::unexpected</TT>" and "<TT>terminate</TT>" by
"<TT>std::terminate</TT>".</P>


<P>In
_N4606_.15.5.2 [<A href="https://wg21.link/except.unexpected#3">except.unexpected</A>] paragraph 3,
 replace "<TT>unexpected</TT>" by
"<TT>std::unexpected</TT>".</P>


<P>In the heading of
_N5001_.14.6.3 [<A href="https://wg21.link/except.uncaught">except.uncaught</A>],
replace "<TT>uncaught_exception</TT>" by
"<TT>std::uncaught_exception</TT>".</P>


<P>In
_N5001_.14.6.3 [<A href="https://wg21.link/except.uncaught#1">except.uncaught</A>] paragraph 1,
 replace</P>
<BLOCKQUOTE>
The function
<BLOCKQUOTE>
<TT>bool uncaught_exception()</TT>
</BLOCKQUOTE>
returns <TT>true</TT>...
</BLOCKQUOTE>
<P>by</P>
<BLOCKQUOTE>
The function <TT>std::uncaught_exception()</TT> returns <TT>true</TT>...
</BLOCKQUOTE>.
<P>In the last sentence of the same paragraph, replace
"<TT>uncaught_exception</TT>" by
"<TT>std::uncaught_exception</TT>".</P>

<BR><BR>
</BODY>
</HTML>
