<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
		<title>Correcting library usage of "literal type"</title>
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<meta http-equiv="Content-Language" content="en-us">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<style type="text/css">
			.addition { color: green; text-decoration: underline; }
			.right { float:right; }
			.desc { margin-left: 35px; margin-top: 10px; padding:0; white-space: normal; }
			.changed-deleted { color: red; background-color: #CFF0FC ; text-decoration: line-through; }
			.addition.changed-deleted { color: green; background-color: #CFF0FC; text-decoration: line-through; text-decoration: black double line-through;}
			.changed-added { background-color: #CFF0FC ;}
			body {max-width: 1024px; margin-left: 25px;}
			.cppkeyword { color: blue; }
			.cppcomment { color: green; }
			.cppcomment > .cppkeyword{ color: green; }
			.cpptext { color: #2E8B57; }
		</style>
	</head>


	<body bgcolor="#ffffff">
		<address>Document number: P0503R0</address>
		<address>Project: Programming Language C++</address>
		<address>Audience: Library Working Group</address>
		<address>&nbsp;</address>
		<address>Erich Keane &lt;<a href="mailto:erich.keane@intel.com">erich.keane@intel.com</a>&gt;</address>
		<address>&nbsp;</address>
		<address>Date: 2016-11-09</address>
		<h1>Correcting library usage of "literal type"</h1>

		<h2>I. Introduction and Motivation</h2>
        <p>A number of National Body Comments [P0488R0] (GB68, US155, US154) point out that the application of "literal type" to a number of locations is too strict, and not what is intended as a constraint for the type.</p>

		<h2>II. Impact on the Standard</h2>
		<p>This proposal alters the wording for a number of components to the library, however the changes are largely editorial.
		</p>

		<h2>III. Proposed wording relative to the Working Draft N4606.</h2>
		<p><b>Note for editor:</b> Remove the note  in 20.8.3¶1[any.class]:</p>
        <pre>
        <span class="changed-deleted">[ Note: any is not a literal type. — end note ]</span>
        </pre>
		<p><b>Note for editor:</b> Replace the following paragraphs in 24.6.1.1 [istream.iterator.cons]:</p>
        <pre>
        <b>¶1:</b> <span>Effects: Constructs the end-of-stream iterator. If <span class=addition><span class=changed-deleted>T is a literal type</span>is_trivially_default_constructible_v&lt;T&gt; is true</span>, then this constructor <span class=addition><span class=changed-deleted>shall be</span>is</span> a constexpr constructor.</span>
        <b>¶5:</b> <span>Effects: Constructs a copy of x. If <span class=addition><span class=changed-deleted>T is a literal type</span>is_trivially_copy_constructible_v&lt;T&gt; is true</span>, then this constructor <span class=addition><span class=changed-deleted>shall be</span>is</span> a trivial copy constructor.</span>
        <b>¶7:</b> <span>Effects: The iterator is destroyed. If <span class=addition><span class=changed-deleted>T is a literal type</span>is_trivially_destructible_v&lt;T&gt; is true</span>, then this destructor <span class=addition><span class=changed-deleted>shall be</span>is</span> a trivial destructor.</span></p>
        </pre>
		<p><b>Note for editor:</b> Alter 20.6.4[optional.nullopt] to reflect the following changes:</p>
        <pre>
        <b>20.7.4[optional.nullopt]:</b><span>Type nullopt_t shall not have a default constructor. <span class=changed-deleted>It shall be a literal type.  Constant nullopt shall be initialized with an argument of literal type.</span></span>
        </pre>

        <p><b>Note for the editor:</b>The usage of literal type in 26.5¶2[complex.numbers] is correct, and should remain(quoted for informational and review purposes).</p>
        <pre>
        <b>26.5¶2[complex.numbers]:</b><span>The specializations complex&lt;float&gt;,complex&lt;double&gt;, and complex&lt;long double&gt; are literal types (3.9).
        </pre>

		<h2>IV. Revision History</h2>
		<p>Revision 0:</p>
		<ul>
			<li>
				Initial proposal.
			</li>
		</ul>


		<h2>V. References</h2>
		<p>[<a name="N4606">N4606</a>] C++17 CD Ballot Document. Available online at
					<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4606.pdf">www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4606.pdf</a>.</p>
		<p>[<a name="P0488R0">P0488R0</a>] National Body Comments
			Available online at <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0488r0.pdf">
				http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0488r0.pdf</a>.
			</p>
		<p>&nbsp;</p>

</body></html>
