<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1746</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="1746"></A><H4>1746.
  
Are volatile scalar types trivially copyable?
</H4>
<B>Section: </B>6.9&#160; [<A href="https://wg21.link/basic.types">basic.types</A>]
 &#160;&#160;&#160;

 <B>Status: </B>C++14
 &#160;&#160;&#160;

 <B>Submitter: </B>Walter Brown
 &#160;&#160;&#160;

 <B>Date: </B>2013-09-06<BR>


<P>[Moved to DR at the February, 2014 meeting.]</P>



<P>According to 6.9 [<A href="https://wg21.link/basic.types#9">basic.types</A>] paragraph 9,</P>

<BLOCKQUOTE>

Arithmetic types (6.9.2 [<A href="https://wg21.link/basic.fundamental">basic.fundamental</A>]), enumeration types, pointer
types, pointer to member types (6.9.4 [<A href="https://wg21.link/basic.compound">basic.compound</A>]),
<TT>std::nullptr_t</TT>, and cv-qualified versions of these types
(6.9.5 [<A href="https://wg21.link/basic.type.qualifier">basic.type.qualifier</A>]) are collectively called <I>scalar types</I>...
Scalar types, trivially copyable class types (
Clause 11 [<A href="https://wg21.link/class">class</A>]), arrays of such types, and non-volatile
const-qualified versions of these types (6.9.5 [<A href="https://wg21.link/basic.type.qualifier">basic.type.qualifier</A>]) are
collectively called <I>trivially copyable types</I>.

</BLOCKQUOTE>

<P>This is confusing, because &#8220;scalar types&#8221; include
volatile-qualified types, but the intent of the definition of
&#8220;trivially copyable type&#8221; appears to be to exclude
volatile-qualified types.  Perhaps the second quoted sentence should
read something like,</P>

<BLOCKQUOTE>

A non-volatile type <TT>T</TT> or an array of such <TT>T</TT> is called a
trivially copyable type if <TT>T</TT> is either a scalar type or a
trivially copyable class type.

</BLOCKQUOTE>

<P>(Note that the following sentence, defining &#8220;trivial type,&#8221;
has a similar formal issue, although it has no actual significance because
all cv-qualifiers are permitted.)</P>

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

<P><B>Proposed resolution (January, 2014):</B></P>

<P>Change 6.9 [<A href="https://wg21.link/basic.types#10">basic.types</A>] paragraph 10 as follows:</P>

<BLOCKQUOTE>

...<DEL>Scalar</DEL> <INS>Cv-unqualified scalar</INS> types,
trivially copyable class types (
Clause 11 [<A href="https://wg21.link/class">class</A>]), arrays of such types, and
non-volatile const-qualified versions of these types
(6.9.5 [<A href="https://wg21.link/basic.type.qualifier">basic.type.qualifier</A>]) are collectively called
<I>trivially copyable types</I>...

</BLOCKQUOTE>

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