<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en-us" xml:lang="en-us">
<head>
  <title>Integrating feature-test macros into the C++ WD</title>
  <meta charset="us-ascii" />
  <style type="text/css">
    tr {
      page-break-inside: avoid;
    }

    .editornote {
      /* display: none; */
      font-family: Cursive;
      background-color: Yellow;
    }

    .draftingnote {
      /* display: none; */
      background-color: LightGrey;
    }


    .note {
      font-style: italic;
    }

    ins, .ins {
      text-decoration: underline;
      background-color: #CFC;
    }

    del {
      text-decoration: line-through;
      background-color: #FCC;
    }

    h2, h3, h4, p, pre, dl, table {
      background-color: inherit;
    }

      h2:before {
        content: "[" counter(h2) "]";
        padding-right: 0.25in;
      }

      h3:before {
        content: "[" counter(h2) "." counter(h3) "]";
        padding-right: 0.25in;
      }

      h4:before {
        content: "[" counter(h2) "." counter(h3) "." counter(h4) "]";
        padding-right: 0.25in;
      }

      h2.annex:before, h2.annex ~ h2:before {
        content: "[" counter(h2, upper-alpha) "]";
        padding-right: 0.25in;
      }

      h2.annex ~ h3:before, h2.annex ~ ins h3:before {
        content: "[" counter(h2, upper-alpha) "." counter(h3) "]";
        padding-right: 0.25in;
      }

      h2.annex ~ h4:before, h2.annex ~ ins h4:before {
        content: "[" counter(h2, upper-alpha) "." counter(h3) "." counter(h4) "]";
        padding-right: 0.25in;
      }

    h1 {
      counter-reset: h2 -2;
    }

    h2.annex {
      counter-reset: h2;
    }

    h2 {
      page-break-after: avoid;
      counter-increment: h2;
      counter-reset: h3 h4 p;
    }

    h3 {
      page-break-after: avoid;
      counter-increment: h3;
      counter-reset: h4 p;
    }

    h4 {
      page-break-after: avoid;
      counter-increment: h4;
      counter-reset: p;
    }

    ins table {
      border-collapse: collapse;
      border: 1px solid black;
    }
    ins table caption {
      background-color: #CFC;
    }
    ins table td, ins table th {
      border: 1px solid black;
      padding-top: 5px;
      padding-bottom: 5px;
      padding-left: 10px;
      padding-right: 10px;
      text-decoration: none;
    }
    ins table td {
      font-family: monospace;
    }

  </style>
</head>
<body>
  <table border="1">
    <tbody>
      <tr>
	<th>Doc. No.:</th>
	<td>P0941R2</td>
      </tr>
      <tr>
	<th>Date:</th>
	<td>2018-06-08</td>
      </tr>
      <tr>
	<th>Reply to:</th>
	<td><a href="mailto:ville.voutilainen@gmail.com">Ville Voutilainen</a><br/><D/td>
	<a href="mailto:cxx@kayari.org">Jonathan Wakely</a><br/></td>
      </tr>
      <tr>
	<th>Audience:</th>
	<td>CWG, LWG</td>
      </tr>
    </tbody>
  </table>

  <h1>Integrating feature-test macros into the C++ WD (rev. 2)</h1>

  <h2>Preface</h2>
  <p>
    This revision of this paper proposes incorporating feature-testing macros
    into the working draft of the C++ standard.
  </p>

  <h2>Contents</h2>
  <ol>
    <li><a href="#intro">Introduction</a></li>
    <li><a href="#recs">Wording</a>
      <ol>
	<li><a href="#recs.hasattr">Testing for the presence of an attribute: <code>__has_cpp_attribute</code></a></li>
	<li><a href="#recs.cpp11">Feature-testing macros</a></li>
      </ol>
    </li>
    <li><a href="#recs.cpp98">Feedback question on RTTI and exceptions</a></li>
    <li><a href="#hist">Revision history</a></li>
  </ol>

  <h2 id="intro">Introduction</h2>
  <p>
    At the November 2017 (Albuquerque) meeting of WG21, there was a five-way poll of
		all of the C++ experts in attendance concerning
		their support for "Feature macros should be standardized in the IS, and we want to invite a proposal to be reviewed by EWG to discss the rationale and granularity." The
		results of the poll:
  </p>
  <table border="1">
    <thead>
      <tr>
	<th>Strongly favor</th>
	<th>Favor</th>
	<th>Neutral</th>
	<th>Oppose</th>
	<th>Strongly oppose</th>
      </tr>
    </thead>
    <tbody>
      <tr>
	<td>27</td>
	<td>21</td>
	<td>9</td>
	<td>4</td>
	<td>1</td>
      </tr>
    </tbody>
  </table>

  <p>
    The approach taken here is as follows:
    <ul>
      <li>For the macros incorporated, use the latest value from SD-6, and
	do not bump the numbers. This is done in order to avoid pointless breakage of existing code that uses the SD-6 macros.</li>
      <li>Library macros are defined both in the corresponding header for
	the library facility and in &lt;version&gt;.</li>
    </ul>
  </p>
  <h2>Wording</h2>
  <h3 id="recs.hasattr">Testing for the presence of an attribute: <code>__has_cpp_attribute</code></h3>
  <p>
    In Clause [cpp.cond] add the following content:
  </p>

  <blockquote>
  <p>
  <dl class="grammar">
    <dt><dfn>has-include-expression</dfn>:</dt>
    <dd><code>__has_include ( &lt;</code>
      <var>h-char-sequence</var>
      <code>&gt; )</code></dd>
    <dd><code>__has_include ( "</code>
      <var>q-char-sequence</var>
      <code>" )</code></dd>
    <dd><code>__has_include ( </code>
      <var>string-literal</var>
      <code> )</code></dd>
    <dd><code>__has_include ( &lt;</code>
      <var>h-pp-tokens</var>
      <code>&gt; )</code></dd>
    <dt class="ins"><dfn>has-attribute-expression</dfn>:</dt>
    <dd class="ins"><code>__has_cpp_attribute (</code>
      <var>pp-tokens</var>
      <code>)</code></dd>
  </dl>
  </p>

<p>-1-
The expression that controls conditional inclusion
shall be an integral constant expression except that identifiers
(including those lexically identical to keywords)
are interpreted as described below
and it may contain zero or more
<em>defined-macro-expressions</em> and/or <em>has-include-expressions</em>
<ins>and/or <em>has-attribute-expressions</em> </ins>
as unary operator expressions.
</p>

<p>-2-
A <var>defined-macro-expression</var> evaluates to <code>1</code> if the identifier is currently defined as a macro name (that is, if it is predefined or if it has been the subject of a <code>#define</code> preprocessing directive without an intervening <code>#undef</code> directive with the same subject identifier), <code>0</code> if it is not.
</p>

<p>-3-
The third and fourth forms of <var>has-include-expression</var> are considered only if neither of the first or second forms matches, in which case the preprocessing tokens are processed just as in normal text.
</p>

<p>-4-
The header or source file identified by the parenthesized preprocessing token sequence in each contained <var>has-include-expression</var> is searched for as if that preprocessing token sequence were the <var>pp-tokens</var> in a <code>#include</code> directive, except that no further macro expansion is performed. If such a directive would not satisfy the syntactic requirements of a <code>#include</code> directive, the program is ill-formed. The <var>has-include-expression</var> evaluates to <code>1</code> if the search for the source file succeeds, and to <code>0</code> if the search fails.
</p>

<p><ins>-?-
Each <var>has-attribute-expression</var>
is replaced by a non-zero <var>pp-number</var>
matching the form of an <var>integer-literal</var>
if the implementation supports an attribute with the name specified
by interpreting the <var>pp-tokens</var> as an <var>attribute-token</var>,
and by <code>0</code> otherwise.
The program is ill-formed if the <var>pp-tokens</var> do not match the form of an <var>attribute-token</var>.
</ins></p>

  <p><ins>-?-
For an attribute specified in this document,
the value of the <var>has-attribute-expression</var>
is given by Table ?.
For other attributes recognized by the implementation,
the value is implementation-defined.
<em>[Note:</em>
It is expected that the availability of an attribute can
be detected by any non-zero result. <em>&mdash;end note]</em>
</ins></p>

<p>
The <code>#ifdef</code> and <code>#ifndef</code> directives,
and the <code>defined</code> conditional inclusion operator,
shall treat <code>__has_include</code>
<ins>and <code>__has_cpp_attribute</code></ins>
as if <del>it</del> <ins>they</ins> were the name<ins>s</ins> of <del>a</del> defined macro<ins>s</ins>.
The identifier<ins>s</ins> <code>__has_include</code>
<ins> and <code>__has_cpp_attribute</code> </ins>
shall not appear in any context not mentioned in this subclause.
</p>

<ins>
<table class="allcode">
<caption>Table ? - <code>__has_cpp_attribute</code> values</caption>
<tr><th>Attribute</th><th>Value</th></tr>
<tr> <td> carries_dependency </td><td> 200809L </td> </tr>
<tr> <td> deprecated </td><td> 201309L </td> </tr>
<tr> <td> fallthrough </td><td> 201603L </td> </tr>
<tr> <td> likely </td><td> 201803L </td> </tr>
<tr> <td> maybe_unused </td><td> 201603L </td> </tr>
<tr> <td> no_unique_address </td><td> 201803L </td> </tr>
<tr> <td> nodiscard </td><td> 201603L </td> </tr>
<tr> <td> noreturn </td><td> 200809L </td> </tr>
<tr> <td> unlikely </td><td> 201803L </td> </tr>
</table>
</ins>

</blockquote>

  <p>
    Adjust the example at the end of [cpp.cond] and add a new example:
  </p>

<blockquote>
<p><em>[Example:</em>
This demonstrates a way to include a library <code>optional</code> facility only if it is available:
</p>

<pre>#if __has_include(&lt;optional&gt;)
# include &lt;optional&gt;
<ins># if __cpp_lib_optional &gt;= 201603</ins>
#<ins> </ins> define have_optional 1
<ins># endif</ins>
#elif __has_include(&lt;experimental/optional&gt;)
# include &lt;experimental/optional&gt;
<ins># if __cpp_lib_experimental_optional &gt;= 201411</ins>
#<ins> </ins> define have_optional 1
#<ins> </ins> define experimental_optional 1
<ins># endif</ins>
<ins>#endif</ins>
#<del>else</del><ins>#ifndef have_optional</ins>
# define have_optional 0
#endif
</pre>

<p><em>&mdash;end example]</em></p>

<ins>
<p><em>[Example:</em>
This demonstrates a way to use the attribute <code>[[acme::deprecated]]</code>
only if it is available.
</p>
<pre>#if __has_cpp_attribute(acme::deprecated)
# define ATTR_DEPRECATED(msg) [[acme::deprecated(msg)]]
#else
# define ATTR_DEPRECATED(msg) [[deprecated(msg)]]
#endif
ATTR_DEPRECATED("This function is deprecated") void anvil();
</pre>
<p><em>&mdash;end example]</em></p>
</ins>

</blockquote>

  <h3 id="recs.cpp11">Feature-testing macros</h3>

  <p class="draftingnote">Drafting note: these are intended to match the latest
  values in SD-6. Wording review should check that that is indeed so.</p>
  <p>
    In [cpp.predefined] add the following content and table:
  </p>
  <blockquote>
  <p>-1-The following macro names shall be defined by the implementation:
  <dl>
    <dt>&mdash; <code>__cplusplus</code></dt><dd>...</dd>
    <dt>&mdash; <code>__DATE__</code></dt><dd>...</dd>
    <dt>&mdash; <code>__FILE__</code></dt><dd>...</dd>
    <dt>&mdash; <code>__LINE__</code></dt><dd>...</dd>
    <dt>&mdash; <code>__STDC_HOSTED__</code></dt><dd>...</dd>
    <dt>&mdash; <code>__STDCPP_DEFAULT_NEW_ALIGNMENT__</code></dt><dd>...</dd>
    <dt>&mdash; <code>__TIME__</code></dt><dd>...</dd>
    <dt><ins>&mdash; The names listed in Table ??.</ins> </dt><dd></dd>
  </dl>
  <ins>
  <p>The macros defined in Table ?? shall be defined to the corresponding integer literal.
<em>[Note:</em>
Future versions of this International Standard
might replace the values of these macros with greater values.
<em>&mdash;end note]</em>
  </p>
  </ins>

  <ins>
  <table>
    <caption>Table ?? - Feature-test macros</caption>
    <thead>
      <tr>
	<th>Name</th>
	<th>Value</th>
      </tr>
    </thead>
    <tbody>
      <tr> <td> __cpp_aggregate_bases </td><td> 201603L </td> </tr>
      <tr> <td> __cpp_aggregate_nsdmi </td><td> 201304L </td> </tr>
      <tr> <td> __cpp_alias_templates </td><td> 200704L </td> </tr>
      <tr> <td> __cpp_aligned_new </td><td> 201606L </td> </tr>
      <tr> <td> __cpp_attributes </td><td> 200809L </td> </tr>
      <tr> <td> __cpp_binary_literals </td><td> 201304L </td> </tr>
      <tr> <td> __cpp_capture_star_this </td><td> 201603L </td> </tr>
      <tr> <td> __cpp_constexpr </td><td> 201603L </td> </tr>
      <tr> <td> __cpp_decltype </td><td> 200707L </td> </tr>
      <tr> <td> __cpp_decltype_auto </td><td> 201304L </td> </tr>
      <tr> <td> __cpp_deduction_guides </td><td> 201703L </td> </tr>
      <tr> <td> __cpp_delegating_constructors </td><td> 200604L </td> </tr>
      <tr> <td> __cpp_enumerator_attributes </td><td> 201411L </td> </tr>
      <tr> <td> __cpp_fold_expressions </td><td> 201603L </td> </tr>
      <tr> <td> __cpp_generic_lambdas </td><td> 201304L </td> </tr>
      <tr> <td> __cpp_guaranteed_copy_elision </td><td> 201606L </td> </tr>
      <tr> <td> __cpp_hex_float </td><td> 201603L </td> </tr>
      <tr> <td> __cpp_if_constexpr </td><td> 201606L </td> </tr>
      <tr> <td> __cpp_inheriting_constructors </td><td> 201511L </td> </tr>
      <tr> <td> __cpp_init_captures </td><td> 201304L </td> </tr>
      <tr> <td> __cpp_initializer_lists </td><td> 200806L </td> </tr>
      <tr> <td> __cpp_inline_variables </td><td> 201606L </td> </tr>
      <tr> <td> __cpp_lambdas </td><td> 200907L </td> </tr>
      <tr> <td> __cpp_namespace_attributes </td><td> 201411L </td> </tr>
      <tr> <td> __cpp_noexcept_function_type </td><td> 201510L </td> </tr>
      <tr> <td> __cpp_nontype_template_args </td><td> 201411L </td> </tr>
      <tr> <td> __cpp_nontype_template_parameter_auto </td><td> 201606L </td> </tr>
      <tr> <td> __cpp_nsdmi </td><td> 200809L </td> </tr>
      <tr> <td> __cpp_range_based_for </td><td> 201603L </td> </tr>
      <tr> <td> __cpp_raw_strings </td><td> 200710L </td> </tr>
      <tr> <td> __cpp_ref_qualifiers </td><td> 200710L </td> </tr>
      <tr> <td> __cpp_return_type_deduction </td><td> 201304L </td> </tr>
      <tr> <td> __cpp_rvalue_references </td><td> 200610L </td> </tr>
      <tr> <td> __cpp_sized_deallocation </td><td> 201309L </td> </tr>
      <tr> <td> __cpp_static_assert </td><td> 201411L </td> </tr>
      <tr> <td> __cpp_structured_bindings </td><td> 201606L </td> </tr>
      <tr> <td> __cpp_template_template_args </td><td> 201611L </td> </tr>
      <tr> <td> __cpp_threadsafe_static_init </td><td> 200806L </td> </tr>
      <tr> <td> __cpp_unicode_characters </td><td> 200704L </td> </tr>
      <tr> <td> __cpp_unicode_literals </td><td> 200710L </td> </tr>
      <tr> <td> __cpp_user_defined_literals </td><td> 200809L </td> </tr>
      <tr> <td> __cpp_variable_templates </td><td> 201304L </td> </tr>
      <tr> <td> __cpp_variadic_templates </td><td> 200704L </td> </tr>
      <tr> <td> __cpp_variadic_using </td><td> 201611L </td> </tr>
    </tbody>
  </table>
  </ins>

  </blockquote>

<p> Add the following content to [support.limits.general]: </p>

  <blockquote>
  <ins>
  <p>
    The macros in Table ??? are defined after inclusion of
    the header <code>&lt;version&gt;</code>
    or one of the corresponding headers specified in the table.
<em>[Note:</em>
Future versions of this International Standard
might replace the values of these macros with greater values.
<em>&mdash;end note]</em>
  </p>
  <table>
    <caption>Table ??? - Standard library feature-test macros</caption>
    <thead>
      <tr>
	<th>Macro name</th>
	<th>Value</th>
	<th>Headers</th>
      </tr>
      <tr>
	<td> __cpp_lib_addressof_constexpr </td>
	<td> 201603L </td>
	<td> &lt;memory&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_allocator_traits_is_always_equal </td>
	<td> 201411L </td>
	<td> &lt;memory&gt;   &lt;scoped_allocator&gt; <br />
	   &lt;string&gt;   &lt;deque&gt; <br />
	   &lt;forward_list&gt;   &lt;list&gt; <br />
	   &lt;vector&gt;   &lt;map&gt; <br />
	   &lt;set&gt;   &lt;unordered_map&gt; <br />
	   &lt;unordered_set&gt; 
	</td>
      </tr>
      <tr>
	<td> __cpp_lib_any </td>
	<td> 201606L </td>
	<td> &lt;any&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_apply </td>
	<td> 201603L </td>
	<td> &lt;tuple&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_array_constexpr </td>
	<td> 201603L </td>
	<td>&lt;iterator&gt; &lt;array&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_as_const </td>
	<td> 201510L </td>
	<td> &lt;utility&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_atomic_is_always_lock_free </td>
	<td> 201603L </td>
	<td> &lt;atomic&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_bool_constant </td>
	<td> 201505L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_boyer_moore_searcher </td>
	<td> 201603L </td>
	<td> &lt;functional&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_byte </td>
	<td> 201603L </td>
	<td> &lt;cstddef&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_chrono </td>
	<td> 201611L </td>
	<td> &lt;chrono&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_clamp </td>
	<td> 201603L </td>
	<td> &lt;algorithm&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_complex_udls </td>
	<td> 201309L </td>
	<td> &lt;complex&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_enable_shared_from_this </td>
	<td> 201603L </td>
	<td> &lt;memory&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_exchange_function </td>
	<td> 201304L </td>
	<td> &lt;utility&gt; </td>
      </tr>
      <tr>
	<td>
	   __cpp_lib_execution </td>
	<td> 201603L </td>
	<td> &lt;execution&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_filesystem </td>
	<td> 201703L </td>
	<td> &lt;filesystem&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_gcd_lcm </td>
	<td> 201606L </td>
	<td> &lt;numeric&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_generic_associative_lookup </td>
	<td> 201304L </td>
	<td> &lt;map&gt; <br />
	   &lt;set&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_hardware_interference_size </td>
	<td> 201703L </td>
	<td> &lt;new&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_has_unique_object_representations </td>
	<td> 201606L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_hypot </td>
	<td> 201603L </td>
	<td> &lt;cmath&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_incomplete_container_elements </td>
	<td> 201505L </td>
	<td> &lt;forwardlist&gt<br />
	  &lt;list&gt; &lt;vector&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_integer_sequence </td>
	<td> 201304L </td>
	<td> &lt;utility&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_integral_constant_callable </td>
	<td> 201304L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_invoke </td>
	<td> 201411L </td>
	<td> &lt;functional&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_is_aggregate </td>
	<td> 201703L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_is_final </td>
	<td> 201402L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_is_invocable </td>
	<td> 201703L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_is_null_pointer </td>
	<td> 201309L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_is_swappable </td>
	<td> 201603L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_launder </td>
	<td> 201606L </td>
	<td> &lt;new&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_logical_traits </td>
	<td> 201510L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_make_from_tuple </td>
	<td> 201606L </td>
	<td> &lt;tuple&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_make_reverse_iterator </td>
	<td> 201402L </td>
	<td> &lt;iterator&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_make_unique </td>
	<td> 201304L </td>
	<td> &lt;memory&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_map_try_emplace </td>
	<td> 201411L </td>
	<td> &lt;map&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_math_special_functions </td>
	<td> 201603L </td>
	<td> &lt;cmath&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_memory_resource </td>
	<td> 201603L </td>
	<td> &lt;memory_resource&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_node_extract </td>
	<td> 201606L </td>
	<td> &lt;map&gt; &lt;set&gt; &lt;unordered_map&gt; &lt;unordered_set&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_nonmember_container_access </td>
	<td> 201411L </td>
	<td> &lt;iterator&gt; &lt;array&gt; &lt;deque&gt; &lt;forward_list&gt;<br />
	  &lt;list&gt; &lt;map&gt; &lt;regex&gt; &lt;set&gt; &lt;string&gt;<br />
	  &lt;unordered_map&gt; &lt;unordered_set&gt; &lt;vector&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_not_fn </td>
	<td> 201603L </td>
	<td> &lt;functional&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_null_iterators </td>
	<td> 201304L </td>
	<td> &lt;iterator&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_optional </td>
	<td> 201606L </td>
	<td> &lt;optional&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_parallel_algorithm </td>
	<td> 201603L </td>
	<td> &lt;algorithm&gt;   &lt;numeric&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_quoted_string_io </td>
	<td> 201304L </td>
	<td> &lt;iomanip&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_raw_memory_algorithms </td>
	<td> 201606L </td>
	<td> &lt;memory&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_result_of_sfinae </td>
	<td> 201210L </td>
	<td> &lt;functional&gt; <br />
	   &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_robust_nonmodifying_seq_ops </td>
	<td> 201304L </td>
	<td> &lt;algorithm&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_sample </td>
	<td> 201603L </td>
	<td> &lt;algorithm&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_scoped_lock </td>
	<td> 201703L </td>
	<td> &lt;mutex&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_shared_mutex </td>
	<td> 201505L </td>
	<td> &lt;shared_mutex&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_shared_ptr_arrays </td>
	<td> 201611L </td>
	<td> &lt;memory&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_shared_ptr_weak_type </td>
	<td> 201606L </td>
	<td> &lt;memory&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_shared_timed_mutex </td>
	<td> 201402L </td>
	<td> &lt;shared_mutex&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_string_udls </td>
	<td> 201304L </td>
	<td> &lt;string&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_string_view </td>
	<td> 201606L </td>
	<td>&lt;string&gt; &lt;string_view&gt;</td>
      </tr>
      <tr>
	<td> __cpp_lib_to_chars </td>
	<td> 201611L </td>
	<td> &lt;utility&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_transformation_trait_aliases </td>
	<td> 201304L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_transparent_operators </td>
	<td> 201510L </td>
	<td> &lt;memory&gt;  &lt;functional&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_tuple_element_t </td>
	<td> 201402L </td>
	<td> &lt;tuple&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_tuples_by_type </td>
	<td> 201304L </td>
	<td> &lt;utility&gt; &lt;tuple&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_type_trait_variable_templates </td>
	<td> 201510L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_uncaught_exceptions </td>
	<td> 201411L </td>
	<td> &lt;exception&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_unordered_map_try_emplace </td>
	<td> 201411L </td>
	<td> &lt;unordered_map&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_variant </td>
	<td> 201606L </td>
	<td> &lt;variant&gt; </td>
      </tr>
      <tr>
	<td> __cpp_lib_void_t </td>
	<td> 201411L </td>
	<td> &lt;type_traits&gt; </td>
      </tr>
    </tbody>
  </table>
  </blockquote>

  <h2 id="hist">Revision history</h2>
  <table border="1">
    <thead>
      <tr>
	<th>Date</th>
	<th>Document</th>
	<th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
	<td>2018-02-09</td>
	<td>P0941R0</td>
	<td>Initial draft</td>
      </tr>
      <tr>
	<td>2018-05-04</td>
	<td>P0941R1</td>
	<td>Draft wording, with non-standard content removed
	and rtti/exception macros made a separate point looking for feedback.</td>
      </tr>
      <tr>
	<td>2018-06-08</td>
	<td>P0941R2</td>
	<td>
	Removed <code>__cpp_rtti</code> and <code>__cpp_exceptions</code>.
        Moved and rewrote proposed wording.
        Used separate tables for attributes, core macros, and library macros.
        Sorted tables by attribute/macro name.
        Added new attributes approved in Jacksonville meeting.
        Removed duplicate entries for macros.
        Fixed header for <code>__cpp_lib_tuple_element_t</code>.
        Added <code>&lt;tuple&gt;</code> header for <code>__cpp_lib_tuples_by_type</code>.
        Updated value for <code>__cpp_deduction_guides</code>.
        </td>
      </tr>
    </tbody>
  </table>
  </ins>
</body>
</html>
