<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=us-ascii" />
    <title>Feature-testing recommendations for C++</title>
    <style type="text/css">
        tr {
            page-break-inside: avoid;
        }

        .editornote {
            font-family: Cursive;
            background-color: Yellow;
        }

        .note {
            font-style: italic;
        }

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

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

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

            h2:before {
                content: "[" counter(h2) "]\A0\A0\A0";
            }

            h3:before {
                content: "[" counter(h2) "." counter(h3) "]\A0\A0\A0";
            }

            h4:before {
                content: "[" counter(h2) "." counter(h3) "." counter(h4) "]\A0\A0\A0";
            }

        h1 {
            counter-reset: h2 -2;
        }

        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;
        }

        body > p:before {
            content: "[" counter(p) "]\A0\A0\A0";
        }

        body > p {
            counter-increment: p;
        }
    </style>
</head>
<body>
    <table border="1" summary="This table provides identifying information for this document.">
        <tbody>
            <tr>
                <th>Doc. No.:</th>
                <td>[draft of SD-6]</td>
            </tr>
            <tr>
                <th>Date:</th>
                <td>2014-10-08</td>
            </tr>
            <tr>
                <th>Reply to:</th>
                <td>Clark Nelson</td>
            </tr>
            <tr>
                <th>Title:</th>
                <td>Feature-testing recommendations for C++</td>
            </tr>
        </tbody>
    </table>
    <h1>Feature-testing recommendations for C++</h1>
    <h2>Preface</h2>
    <p>Changes are indicated relative to SD-6 as published in 2013. The preface is informative;
                changes are not marked.</p>
    <p class="note">This revision of this document contains STUBS for sections expected
                to be filled in later.</p>
    <h2>Contents</h2>
    <ol>
        <li><ins><a href="#intro">Introduction</a></ins></li>
        <li><a href="#expl">Explanation and rationale for the approach</a> <ol>
            <li><a href="#expl.prob">Problem statement</a></li>
            <li><a href="#expl.status">Status quo</a></li>
            <li><a href="#expl.soln">Characteristics of the proposed solution</a></li>
        </ol></li>
        <li><a href="#recs">Recommendations</a> <ol>
            <li><a href="#recs.intro">Introduction</a></li>
            <li><a href="#recs.hasinc">Testing for the presence of a header: <code>__has_include</code></a></li>
            <li><a href="#recs.hasattr"><ins>Testing for the presence of an attribute: <code>__has_cpp_attribute</code></ins></a></li>
            <li><a href="#recs.cpp14">C++14 features</a></li>
            <li><a href="#recs.cpp11">C++11 features</a> <del><em>(STUB)</em></del></li>
            <li><a href="#recs.condsupp">Conditionally-supported constructs</a> <em>(STUB)</em></li>
            <li><a href="#recs.cpp98">C++98 features</a> <em>(STUB)</em></li>
            <li><a href="#recs.removed"><ins>Features published and later removed</ins></a></li>
        </ol></li>
        <li><a href="#detail">Detailed explanation and rationale</a> <ol>
            <li><a href="#detail.cpp14">C++14 features</a></li>
        </ol></li>
        <li><a href="#hist"><ins>Revision history</ins></a></li>
    </ol>
    <h2 id="intro"><ins>Introduction</ins></h2>
    <p><ins>At the September 2013 (Chicago) meeting of WG21, there was a five-way poll of
                all of the C++ experts in attendance &ndash; approximately 80 &ndash; concerning
                their support for the approach described herein for feature-testing in C++. The
                results of the poll:</ins></p>
    <table border="1">
        <tr class="ins">
            <th>Strongly favor</th>
            <th>Favor</th>
            <th>Neutral</th>
            <th>Oppose</th>
            <th>Strongly oppose</th>
        </tr>
        <tr class="ins">
            <td>lots</td>
            <td>lots</td>
            <td>1</td>
            <td>0</td>
            <td>0</td>
        </tr>
    </table>
    <p><ins>This document was subsequently designated WG21's SD-6 (sixth standing document),
                which will continue to be maintained by SG10.</ins></p>
    <h2 id="expl">Explanation and rationale for the approach</h2>
    <h3 id="expl.prob">Problem statement</h3>
    <p>The pace of innovation in the standardization of C++ makes long-term stability of
                implementations unlikely. Features are added to the language because programmers
                want to use those features. Features are added to (the working draft of) the standard
                as the features become well-specified. In many cases a feature is added to an implementation
                well before or well after the standard officially introducing it is approved.</p>
    <p>This process makes it difficult for programmers who want to use a feature to know
                whether it is available in any given implementation. Implementations rarely leap
                from one formal revision of the standard directly to the next; the implementation
                process generally proceeds by smaller steps. As a result, testing for a specific
                revision of the standard (e.g. by examining the value of the <code>__cplusplus</code>
        macro) often gives the wrong answer. Implementers generally don't want to appear
                to be claiming full conformance to a standard revision until all of its features
                are implemented. That leaves programmers with no portable way to determine which
                features are actually available to them.</p>
    <p>It is often possible for a program to determine, in a manner specific to a single
                implementation, what features are supported by that implementation; but the means
                are often poorly documented and ad hoc, and sometimes complex &ndash; especially
                when the availability of a feature is controlled by an invocation option. To make
                this determination for a variety of implementations in a single source base is complex
                and error-prone.</p>
    <h3 id="expl.status">Status quo</h3>
    <p>Here is some code that attempts to determine whether rvalue references are available
                in the implementation in use:</p>
    <pre>#ifndef __USE_RVALUE_REFERENCES
  #if (__GNUC__ &gt; 4 || __GNUC__ == 4 &amp;&amp; __GNUC_MINOR__ &gt;= 3) || \
      _MSC_VER &gt;= 1600
    #if __EDG_VERSION__ &gt; 0
      #define __USE_RVALUE_REFERENCES (__EDG_VERSION__ &gt;= 410)
    #else
      #define __USE_RVALUE_REFERENCES 1
    #endif
  #elif __clang__
    #define __USE_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
  #else
    #define __USE_RVALUE_REFERENCES 0
  #endif
#endif</pre>
    <p>First, the GNU and Microsoft version numbers are checked to see if they are high
                enough. But then a check is made of the EDG version number, since that front end
                also has compatibility modes for both those compilers, and defines macros indicating
                (claimed) compatibility with them. If the feature wasn't implemented in the indicated
                EDG version, it is assumed that the feature is not available &ndash; even though
                it is possible for a customer of EDG to implement a feature before EDG does.</p>
    <p>Fortunately Clang has ways to test specifically for the presence of specific features.
                But unfortunately, the function-call-like syntax used for such tests won't work
                with a standard preprocessor, so this fine new feature winds up adding its own flavor
                of complexity to the mix.</p>
    <p>Also note that this code is only the beginning of a real-world solution. A complete
                solution would need to take into account more compilers, and also command-line option
                settings specific to various compilers.</p>
    <h3 id="expl.soln">Characteristics of the proposed solution</h3>
    <p>To preserve implementers' freedom to add features in the order that makes the most
                sense for themselves and their customers, implementers should indicate the availability
                of each separate feature by adding a definition of a macro with the name corresponding
                to that feature.</p>
    <p><strong>Important note:</strong> By recommending the use of these macros, WG21 is
                <strong>not</strong> making any feature optional; the absence of a definition for
                the relevant feature-test macro does not make an implementation that lacks a feature
                conform to a standard that requires the feature. However, if implementers and programmers
                follow these recommendations, portability of code between real-world implementations
                should be improved.</p>
    <p>To a first approximation, a feature is identified by the WG21 paper in which it is
                specified, and by which it is introduced into the working draft of the standard.
                Not every paper introduces a new feature worth a feature-test macro, but every paper
                that is not just a collection of issue resolutions is considered a candidate; exceptions
                are explicitly justified.</p>
    <p>For C++14, <del>it is preferred for</del> the feature-test macro <del>to be named
                using</del> <ins>name generally consists of</ins> some combination of words from
                the title of the paper. In the future, it is hoped that every paper will include
                its own recommendations concerning feature-test macro names.</p>
    <p>The value specified for a feature-test macro is based on the year and month in which
                the feature is voted into the working draft. In a case where a feature is subsequently
                changed in a significant way, but arguably remains the same feature, the value of
                the macro <del>can be</del> <ins>is</ins> changed to indicate the &ldquo;revision
                level&rdquo; of the specification of the feature. However, in most cases it is expected
                that the presence of a feature can be determined by the presence of any non-zero
                macro value; for example:</p>
    <pre>#if __cpp_binary_literals
int const packed_zero_to_three = 0b00011011;
#else
int const packed_zero_to_three = 0x1B;
#endif</pre>
    <p>To avoid the user's namespace, names of macros for language features are prefixed
                by &ldquo;<code>__cpp_</code>&rdquo;; for library features, by &ldquo;<code>__cpp_lib_</code>&rdquo;.
                A library feature that doesn't introduce a new header is expected to be defined
                by the header(s) that implement the feature.</p>
    <h2 id="recs">Recommendations</h2>
    <h3 id="recs.intro">Introduction</h3>
    <p>For the sake of improved portability between partial implementations of various C++
                standards, WG21 (the ISO technical committee for the C++ programming language) recommends
                that implementers and programmers follow the guidelines in this document concerning
                feature-test macros.</p>
    <p>Implementers who provide a new standard feature should define a macro with the recommended
                name and value, in the same circumstances under which the feature is available (for
                example, taking into account relevant command-line options), to indicate the presence
                of support for that feature.</p>
    <p>Programmers who wish to determine whether a feature is available in an implementation
                should base that determination on the state of the macro with the recommended name.
                (The absence of a tested feature may result in a program with decreased functionality,
                or the relevant functionality may be provided in a different way. A program that
                strictly depends on support for a feature can just try to use the feature unconditionally;
                presumably, on an implementation lacking necessary support, translation will fail.)</p>
    <h3 id="recs.hasinc">Testing for the presence of a header: <code>__has_include</code></h3>
    <p>It is impossible for a C++ program to directly, reliably and portably determine whether
                or not a library header is available for inclusion. Conditionally including a header
                requires the use of a configuration macro, whose setting can be determined by a
                configuration-test process at build time (reliable, but less portable), or by some
                other means (often not reliable or portable).</p>
    <p>To solve this general problem, WG21 recommends that implementers provide, and programmers
                use, the <code>__has_include</code> feature.</p>
    <h4>Syntax</h4>
    <dl class="grammar">
        <dt><dfn>h-preprocessing-token</dfn>:</dt>
        <dd>any <var>preprocessing-token</var> other than <code>&gt;</code></dd>
    </dl>
    <dl class="grammar">
        <dt><dfn>h-pp-tokens</dfn>:</dt>
        <dd><var>h-preprocessing-token</var></dd>
        <dd><var>h-pp-tokens h-preprocessing-token</var></dd>
    </dl>
    <dl class="grammar">
        <dt><dfn>has-include-expression</dfn>:</dt>
        <dd><code>__has_include (</code> <var>header-name</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>
    </dl>
    <h4>Semantics</h4>
    <p>In the first form of the <var>has-include-expression</var>, the parenthesized <var>header-name</var> token is not subject to macro expansion. The second and third
                forms are considered only if the first form does not match, and the preprocessing
                tokens are processed just as in normal text.</p>
    <p>A <var>has-include-expression</var> shall appear only in the controlling constant
                expression of a <code>#if</code> or <code>#elif</code> directive ([cpp.cond] 16.1).
                Prior to the evaluation of such an expression, the 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>
        is replaced by the <var>pp-number</var> <code>1</code> if the search for the source
                file succeeds, and by the <var>pp-number</var> <code>0</code> if the search fails.</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> as if it
                were the name of a defined macro. The identifier <code>__has_include</code> shall
                not appear in any context not mentioned in this section.</p>
    <h4>Example</h4>
    <p>This demonstrates a way to <del>include the header <code>&lt;optional&gt;</code></del>
        <ins>use a library <code>optional</code> facility</ins> only if it is available.</p>
    <pre>
#ifdef __has_include
#  if __has_include(&lt;optional&gt;)
#    include &lt;optional&gt;
#    define have_optional 1
#  <ins>elif __has_include(&lt;experimental/optional&gt;)</ins>
#    <ins>include &lt;experimental/optional&gt;</ins>
#    <ins>define have_optional 1</ins>
#    <ins>define experimental_optional</ins>
#  <ins>else</ins>
#    <ins>define have_optional 0</ins>
#  endif
#endif
</pre>
    <h3 id="recs.hasattr"><ins>Testing for the presence of an attribute: <code>__has_cpp_attribute</code></ins></h3>
    <p><ins>A C++ program cannot directly, reliably, and portably determine whether or not
                a standard or vendor-specific attribute is available for use. Testing for attribute
                support generally requires complex macro logic, as illustrated above for language
                features in general.</ins></p>
    <p><ins>To solve this general problem, WG21 recommends that implementers provide, and
                programmers use, the <code>__has_cpp_attribute</code> feature.</ins></p>
    <h4><ins>Syntax</ins></h4>
    <dl class="grammar">
        <dt><dfn>has-attribute-expression</dfn>:</dt>
        <dd><code>__has_cpp_attribute (</code> <var>attribute-token</var> <code>)</code></dd>
    </dl>
    <h4><ins>Semantics</ins></h4>
    <p><ins>A <var>has-attribute-expression</var> shall appear only in the controlling constant
                expression of a <code>#if</code> or <code>#elif</code> directive ([cpp.cond] 16.1).
                The <var>has-attribute-expression</var> is replaced by a non-zero pp-number if the
                implementation supports an attribute with the specified name, and by the pp-number
                0 otherwise.</ins></p>
    <p><ins>For a standard attribute, the value of the <code>__has_cpp_attribute</code>
        macro is based on the year and month in which the attribute was voted into the working
                draft. In the case where the attribute is vendor-specific, the value is implementation-defined.
                However, in most cases it is expected that the availability of an attribute can
                be detected by any non-zero result.</ins></p>
    <p><ins>The <code>#ifdef</code> and <code>#ifndef</code> directives, and the <code>defined</code>
        conditional inclusion operator, shall treat <code>__has_cpp_attribute</code> as
                if it were the name of a defined macro. The identifier <code>__has_cpp_attribute</code>
        shall not appear in any context not mentioned in this section.</ins></p>
    <h4><ins>Example</ins></h4>
    <p><ins>This demonstrates a way to use the attribute <code>[[deprecated]]</code> only
                if it is available.</ins></p>
    <pre>#ifdef __has_cpp_attribute
#  if __has_cpp_attribute(deprecated)
#    define ATTR_DEPRECATED(msg) [[deprecated(msg)]]
#  else
#    define ATTR_DEPRECATED(msg)
#  endif
#endif
</pre>
    <h3 id="recs.cpp14">C++14 features</h3>
    <p>The following table itemizes all the changes that were made to the working draft
                for C++14 as specified in a WG21 technical document. (Changes that were made as
                specified in a core or library issue are not <ins>generally</ins> included.)</p>
    <p>The table is sorted by the section of the standard primarily affected. The &ldquo;Doc.
                No.&rdquo; column links to the paper itself on the committee web site. The &ldquo;Macro
                Name&rdquo; column links to the relevant portion of the &ldquo;Detailed explanation
                and rationale&rdquo; section of this document.</p>
    <p><ins>For library features, the &ldquo;Header&ldquo; column identifies the header
                that is expected to define the macro, although the macro may also be predefined.
                For language features, the macro must be predefined.</ins></p>
    <table border="1">
        <caption>Significant changes to C++14</caption>
        <thead>
            <tr>
                <th>Doc. No.</th>
                <th>Title</th>
                <th>Primary Section</th>
                <th>Macro Name</th>
                <th>Value</th>
                <th>Header</th>
            </tr>
        </thead>
        <tbody>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3910.html">N3910</a>
                </td>
                <td>What can signal handlers do? (CWG 1441)</td>
                <td>1.9-1.10</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3910">none</a></em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3927.html">N3927</a>
                </td>
                <td>Definition of Lock-Free</td>
                <td>1.10</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3927">none</a></em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf">N3472</a>
                </td>
                <td>Binary Literals in the C++ Core Language</td>
                <td>2.14</td>
                <td><code><a href="#detail.cpp14.n3472">__cpp_binary_literals</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf">N3781</a>
                </td>
                <td>Single-Quotation-Mark as a Digit Separator</td>
                <td>2.14</td>
                <td><code><a href="#detail.cpp14.n3781">__cpp_digit_separators</a></code></td>
                <td>201309</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3323.pdf">N3323</a>
                </td>
                <td>A Proposal to Tweak Certain C++ Contextual Conversions</td>
                <td>4</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3323">none</a></em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3648.html">N3648</a>
                </td>
                <!--feedback-->
                <td>Wording Changes for Generalized Lambda-capture</td>
                <td>5.1</td>
                <td><code><a href="#detail.cpp14.n3648">__cpp_init_captures</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3649.html">N3649</a>
                </td>
                <!--feedback-->
                <td>Generic (Polymorphic) Lambda Expressions</td>
                <td>5.1</td>
                <td><code><a href="#detail.cpp14.n3649">__cpp_generic_lambdas</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html">N3664</a>
                </td>
                <td>Clarifying Memory Allocation</td>
                <td>5.3</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3664">none</a></em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3778.html">N3778</a>
                </td>
                <td>C++ Sized Deallocation</td>
                <td>5.3, 18.6</td>
                <td><code><a href="#detail.cpp14.n3778">__cpp_sized_deallocation</a></code></td>
                <td>201309</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3624.html">N3624</a>
                </td>
                <td>Core Issue 1512: Pointer comparison vs qualification conversions</td>
                <td>5.9, 5.10</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3624">none</a></em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html">N3652</a>
                </td>
                <td>Relaxing constraints on constexpr functions / constexpr member functions and implicit
                                        const</td>
                <td>5.19, 7.1</td>
                <td><code><a href="#detail.cpp14.n3652">__cpp_constexpr</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3638.html">N3638</a></td>
                <!--feedback-->
                <td rowspan="2">Return type deduction for normal functions</td>
                <td rowspan="2">7.1</td>
                <td><code><a href="#detail.cpp14.n3638">__cpp_decltype_auto</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><code><a href="#detail.cpp14.n3638">__cpp_return_type_deduction</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">N3760</a>
                </td>
                <td>[[deprecated]] attribute</td>
                <td>7.6</td>
                <td><code>__has_cpp_attribute(deprecated)</code></td>
                <td>201309</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="del">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html">N3639</a>
                </td>
                <td>Runtime-sized arrays with automatic storage duration</td>
                <td>8.3</td>
                <td><code><a href="#detail.cpp14.n3639">__cpp_runtime_arrays</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">N3653</a>
                </td>
                <td>Member initializers and aggregates</td>
                <td>8.5</td>
                <td><code><a href="#detail.cpp14.n3653">__cpp_aggregate_nsdmi</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3667.html">N3667</a>
                </td>
                <td>Drafting for Core 1402</td>
                <td>12.8</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3667">none</a></em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3651.pdf">N3651</a>
                </td>
                <td>Variable Templates</td>
                <td>14, 14.7</td>
                <td><code><a href="#detail.cpp14.n3651">__cpp_variable_templates</a></code></td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3669.pdf">N3669</a>
                </td>
                <td>Fixing constexpr member functions without const</td>
                <td><em>various</em></td>
                <td colspan="3"><em><a href="#detail.cpp14.n3669">none</a></em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3673.html">N3673</a>
                </td>
                <td>C++ Library Working Group Ready Issues Bristol 2013</td>
                <td><em>various</em></td>
                <td colspan="3"><em><a href="#detail.cpp14.n3673">none</a></em></td>
            </tr>
            <!--
                        <tr>
                                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3471.html">N3471</a>
                                </td>
                                <td>Constexpr Library Additions: utilities</td>
                                <td>20.2-20.4</td>
                                <td rowspan="3"><code><a href="#detail.cpp14.n3471">__cpp_lib_constexpr_functions</a></code>
                                </td>
                                <td rowspan="3">201210</td>
                                <td><code>&lt;utility&gt;</code></td>
                        </tr>
                        <tr>
                                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3469.html">N3469</a>
                                </td>
                                <td>Constexpr Library Additions: chrono</td>
                                <td>20.11</td>
                                <td><code>&lt;chrono&gt;</code></td>
                        </tr>
                        <tr>
                                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3470.html">N3470</a>
                                </td>
                                <td>Constexpr Library Additions: containers</td>
                                <td>23.3</td>
                                <td><code>&lt;array&gt;</code></td>
                        </tr>
-->
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3658.html">N3658</a>
                </td>
                <!--feedback-->
                <td>Compile-time integer sequences</td>
                <td>20</td>
                <td><code><a href="#detail.cpp14.n3658">__cpp_lib_integer_sequence</a></code></td>
                <td>201304</td>
                <td><code>&lt;utility&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3668.html">N3668</a>
                </td>
                <!--feedback-->
                <td>exchange() utility function</td>
                <td>20</td>
                <td><code><a href="#detail.cpp14.n3668">__cpp_lib_exchange_function</a></code></td>
                <td>201304</td>
                <td><code>&lt;utility&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3471.html">N3471</a>
                </td>
                <td>Constexpr Library Additions: utilities</td>
                <td>20.2-20.4</td>
                <td colspan="3"><a href="#detail.cpp14.n3471"><em>none</em></a></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3670.html">N3670</a>
                </td>
                <td>Wording for Addressing Tuples by Type</td>
                <td>20.2-20.4</td>
                <td><code><a href="#detail.cpp14.n3670">__cpp_lib_tuples_by_type</a></code></td>
                <td>201304</td>
                <td><code>&lt;utility&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3887.pdf">N3887</a>
                </td>
                <td>Consistent Metafunction Aliases</td>
                <td>20.3-20.4</td>
                <td><code><a href="#detail.cpp14.n3887">__cpp_lib_tuple_element_t</a></code></td>
                <td>201402</td>
                <td><code>&lt;utility&gt;</code></td>
            </tr>
            <tr class="del">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3672.html">N3672</a>
                </td>
                <td>A proposal to add a utility class to represent optional objects</td>
                <td>20.5</td>
                <td><code><a href="#detail.cpp14.n3672">__has_include(&lt;optional&gt;)</a></code>
                </td>
                <td>1</td>
                <td><em>predefined</em></td>
            </tr>
            <!--<tr>
                                <td><code>__cpp_lib_header_optional</code></td>
                                <td>201304</td>
                                <td><code>&lt;utility&gt;</code></td>
                        </tr>-->
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3656.htm">N3656</a>
                </td>
                <!--feedback-->
                <td>make_unique</td>
                <td>20.7</td>
                <td><code><a href="#detail.cpp14.n3656">__cpp_lib_make_unique</a></code></td>
                <td>201304</td>
                <td><code>&lt;memory&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3421.htm">N3421</a>
                </td>
                <!--feedback-->
                <td>Making Operator Functors greater&lt;&gt;</td>
                <td>20.8</td>
                <td><code><a href="#detail.cpp14.n3421">__cpp_lib_transparent_operators</a></code>
                </td>
                <td>201210</td>
                <td><code>&lt;functional&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3462.html">N3462</a>
                </td>
                <!--feedback-->
                <td>std::result_of and SFINAE</td>
                <td>20.9</td>
                <td><code><a href="#detail.cpp14.n3462">__cpp_lib_result_of_sfinae</a></code></td>
                <td>201210</td>
                <td><code>&lt;functional&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3545.pdf">N3545</a>
                </td>
                <td>An Incremental Improvement to integral_constant</td>
                <td>20.9</td>
                <td><code><a href="#detail.cpp14.n3545">__cpp_lib_integral_constant_callable</a></code>
                </td>
                <td>201304</td>
                <td><code>&lt;type_traits&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3655.pdf">N3655</a>
                </td>
                <td>TransformationTraits Redux</td>
                <td>20.9</td>
                <td><code><a href="#detail.cpp14.n3655">__cpp_lib_transformation_trait_aliases</a></code>
                </td>
                <td>201304</td>
                <td><code>&lt;type_traits&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3789.txt">N3789</a>
                </td>
                <td>Constexpr Library Additions: functional</td>
                <td>20.10</td>
                <td colspan="3"><a href="#detail.cpp14.n3789"><em>none</em></a></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3945.html#2112">LWG 2112</a></td>
                <td>User-defined classes that cannot be derived from</td>
                <td>20.10</td>
                <td><code><a href="#detail.cpp14.lwg2112">__cpp_lib_is_final</a></code></td>
                <td>201402</td>
                <td><code>&lt;type_traits&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3822.html#2247">LWG 2247</a></td>
                <td>Type traits and std::nullptr_t</td>
                <td>20.10</td>
                <td><code><a href="#detail.cpp14.lwg2247">__cpp_lib_is_null_pointer</a></code></td>
                <td>201309</td>
                <td><code>&lt;type_traits&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3469.html">N3469</a>
                </td>
                <td>Constexpr Library Additions: chrono</td>
                <td>20.11</td>
                <td colspan="3"><a href="#detail.cpp14.n3471"><em>none</em></a></td>
            </tr>
            <tr>
                <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3642.pdf">N3642</a></td>
                <td rowspan="2">User-defined Literals for Standard Library Types</td>
                <td>20.11</td>
                <td><code><a href="#detail.cpp14.n3642">__cpp_lib_chrono_udls</a></code></td>
                <td>201304</td>
                <td><code>&lt;chrono&gt;</code></td>
            </tr>
            <tr>
                <td>21.7</td>
                <td><code><a href="#detail.cpp14.n3642">__cpp_lib_string_udls</a></code></td>
                <td>201304</td>
                <td><code>&lt;string&gt;</code></td>
            </tr>
            <tr class="del">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3662.html">N3662</a>
                </td>
                <!--feedback-->
                <td>C++ Dynamic Arrays</td>
                <td>23.2, 23.3</td>
                <td><code><a href="#detail.cpp14.n3662">__has_include(&lt;dynarray&gt;)</a></code>
                </td>
                <td>1</td>
                <td><em>predefined</em></td>
            </tr>
            <!--<tr>
                                <td><code>__cpp_lib_header_dynarray</code></td>
                                <td>201304</td>
                                <td><code>&lt;utility&gt;</code></td>
                        </tr>-->
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3470.html">N3470</a>
                </td>
                <td>Constexpr Library Additions: containers</td>
                <td>23.3</td>
                <td colspan="3"><a href="#detail.cpp14.n3471"><em>none</em></a></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3657.htm">N3657</a>
                </td>
                <!--feedback-->
                <td>Adding heterogeneous comparison lookup to associative containers</td>
                <td>23.4</td>
                <td><code><a href="#detail.cpp14.n3657">__cpp_lib_generic_associative_lookup</a></code>
                </td>
                <td>201304</td>
                <td><code>&lt;map&gt;</code><br />
                    <code>&lt;set&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3644.pdf">N3644</a>
                </td>
                <!--feedback-->
                <td>Null Forward Iterators</td>
                <td>24.2</td>
                <td><code><a href="#detail.cpp14.n3644">__cpp_lib_null_iterators</a></code></td>
                <td>201304</td>
                <td><code>&lt;iterator&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3945.html#2285">LWG 2285</a></td>
                <td>make_reverse_iterator</td>
                <td>24.5</td>
                <td><code><a href="#detail.cpp14.lwg2285">__cpp_lib_make_reverse_iterator</a></code>
                </td>
                <td>201402</td>
                <td><code>&lt;iterator&gt;</code></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3671.html">N3671</a>
                </td>
                <td>Making non-modifying sequence operations more robust</td>
                <td>25.2</td>
                <td><code><a href="#detail.cpp14.n3671">__cpp_lib_robust_nonmodifying_seq_ops</a></code>
                </td>
                <td>201304</td>
                <td><code>&lt;algorithm&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3779.pdf">N3779</a>
                </td>
                <td>User-defined Literals for std::complex</td>
                <td>26.4</td>
                <td><code><a href="#detail.cpp14.n3779">__cpp_lib_complex_udls</a></code></td>
                <td>201309</td>
                <td><code>&lt;complex&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3924.pdf">N3924</a>
                </td>
                <td>Discouraging rand() in C++14</td>
                <td>26.8</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3924">none</a></em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3654.html">N3654</a>
                </td>
                <td>Quoted Strings Library Proposal</td>
                <td>27.7</td>
                <td><code><a href="#detail.cpp14.n3654">__cpp_lib_quoted_string_io</a></code></td>
                <td>201304</td>
                <td><code>&lt;iomanip&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3945.html#2249">LWG 2249</a></td>
                <td>Remove gets from &lt;cstdio&gt;</td>
                <td>27.9</td>
                <td colspan="3"><em><a href="#detail.cpp14.lwg2249">none</a></em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3786.html">N3786</a>
                </td>
                <td>Prohibiting "out of thin air" results in C++14</td>
                <td>29.3</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3786">none</a></em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3659.html">N3659</a>
                </td>
                <td>Shared locking in C++</td>
                <td>30.4</td>
                <td><del><a href="#detail.cpp14.n3659"><code>__cpp_lib_shared_mutex</code></a></del><br />
                    <ins><a href="#detail.cpp14.n3659"><code>__has_include(&lt;shared_mutex&gt;)</code></a></ins>
                </td>
                <td><del>201304</del><br />
                    <ins>1</ins></td>
                <td><del><code>&lt;mutex&gt;</code></del><br />
                    <ins><em>predefined</em></ins></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3891.htm">N3891</a>
                </td>
                <td>A proposal to rename shared_mutex to shared_timed_mutex</td>
                <td>30.4</td>
                <td><code><a href="#detail.cpp14.n3891">__cpp_lib_shared_timed_mutex</a></code></td>
                <td>201402</td>
                <td><code>&lt;shared_mutex&gt;</code></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3776.pdf">N3776</a>
                </td>
                <td>Wording for ~future</td>
                <td>30.6</td>
                <td colspan="3"><em><a href="#detail.cpp14.n3776">none</a></em></td>
            </tr>
        </tbody>
    </table>
    <h3 id="recs.cpp11">C++11 features</h3>
    <del>
        <p class="note">STUB: this table should be considered a very rough, preliminary, incomplete
                draft</p>
    </del>
    <table border="1">
        <caption>Significant features of C++11</caption>
        <thead>
            <tr>
                <th>Doc. No.</th>
                <th>Title</th>
                <th>Primary Section</th>
                <th>Macro name</th>
                <th>Value</th>
                <th>Header</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html">N2249</a></td>
                <td>New Character Types in C++</td>
                <td>2.13</td>
                <td><a><code>__cpp_unicode_characters</code></a></td>
                <td>200704</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td>
                <td rowspan="2">Raw and Unicode String Literals Unified Proposal</td>
                <td rowspan="2">2.13</td>
                <td><a><code>__cpp_raw_strings</code></a></td>
                <td>200710</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a><code>__cpp_unicode_literals</code></a></td>
                <td>200710</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td>
                <td>User-defined Literals</td>
                <td>2.13, 13.5</td>
                <td><a><code>__cpp_user_defined_literals</code></a></td>
                <td>200809</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf">N2927</a></td>
                <td>New wording for C++0x lambdas</td>
                <td>5.1</td>
                <td><a><code>__cpp_lambdas</code></a></td>
                <td>200907</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">N2235</a></td>
                <td>Generalized Constant Expressions</td>
                <td>5.19, 7.1</td>
                <td><a><code>__cpp_constexpr</code></a></td>
                <td>200704</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html">N2930</a></td>
                <td>Range-Based For Loop Wording (Without Concepts)</td>
                <td>6.5</td>
                <td><a><code>__cpp_range_based_for</code></a></td>
                <td>200907</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">N1720</a></td>
                <td>Proposal to Add Static Assertions to the Core Language</td>
                <td>7</td>
                <td><a><code>__cpp_static_assert</code></a></td>
                <td>200410</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">N2343</a></td>
                <td>Decltype</td>
                <td>7.1</td>
                <td><a><code>__cpp_decltype</code></a></td>
                <td>200707</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td rowspan="3"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">N2761</a></td>
                <td rowspan="3">Towards support for attributes in C++</td>
                <td rowspan="3">7.6</td>
                <td><a><code>__cpp_attributes</code></a></td>
                <td>200809</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a><code>__has_cpp_attribute(noreturn)</code></a></td>
                <td>200809</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a><code>__has_cpp_attribute(carries_dependency)</code></a></td>
                <td>200809</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">N2118</a></td>
                <td>A Proposal to Add an Rvalue Reference to the C++ Language</td>
                <td>8.3</td>
                <td><a><code>__cpp_rvalue_references</code></a></td>
                <td>200610</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">N2242</a></td>
                <td>Proposed Wording for Variadic Templates</td>
                <td>8.3, 14</td>
                <td><a><code>__cpp_variadic_templates</code></a></td>
                <td>200704</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.pdf">N2672</a></td>
                <td>Initializer List proposed wording</td>
                <td>8.5</td>
                <td><a><code>__cpp_initializer_lists</code></a></td>
                <td>200806</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf">N1986</a></td>
                <td>Delegating Constructors</td>
                <td>12.6</td>
                <td><a><code>__cpp_delegating_constructors</code></a></td>
                <td>200604</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2756.htm">N2756</a></td>
                <td>Non-static data member initializers</td>
                <td>12.6</td>
                <td><a><code>__cpp_nsdmi</code></a></td>
                <td>200809</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm">N2540</a></td>
                <td>Inheriting Constructors</td>
                <td>12.9</td>
                <td><a><code>__cpp_inheriting_constructors</code></a></td>
                <td>200802</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm">N2439</a></td>
                <td>Extending move semantics to *this</td>
                <td>13.3</td>
                <td><a><code>__cpp_ref_qualifiers</code></a></td>
                <td>200710</td>
                <td><em>predefined</em></td>
            </tr>
            <tr class="ins">
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf">N2258</a></td>
                <td>Template Aliases</td>
                <td>14.5</td>
                <td><a><code>__cpp_alias_templates</code></a></td>
                <td>200704</td>
                <td><em>predefined</em></td>
            </tr>
        </tbody>
    </table>
    <h3 id="recs.condsupp">Conditionally-supported constructs</h3>
    <p class="note">STUB</p>
    <!--
        <p>The standard requires implementations to document the conditionally-supported constructs
                it does <strong>not</strong> support. For consistency, the recommendation is to
                define a macro for each conditionally-supported construct that is diagnosed (not
                supported)</p>
        <table border="1">
                <thead>
                        <tr>
                                <th>Reference</th>
                                <th>Description</th>
                                <th>Macro name</th>
                        </tr>
                </thead>
                <tbody>
                        <tr>
                                <td>2.9p2</td>
                                <td>The appearance of either of the characters <code>'</code> or <code>\</code> or of
                                        either of the character sequences <code>/*</code> or <code>//</code> in a <var>q-char-sequence</var>
                                        or an <var>h-char-sequence</var> is conditionally supported with implementation-defined
                                        semantics, as is the appearance of the character <code>"</code> in an <var>h-char-sequence</var>.
                                </td>
                                <td><code>__cond_no_weird_header_names</code></td>
                        </tr>
                        <tr>
                                <td>2.14.3p1</td>
                                <td>A multicharacter literal, or an ordinary character literal containing a single <var>
                                        c-char</var> not representable in the execution character set, is conditionally-supported,
                                        has type <code>int</code>, and has an implementation-defined value.</td>
                                <td><code>__cond_no_multicharacter_literals</code></td>
                        </tr>
                        <tr>
                                <td>2.14.3p3</td>
                                <td>Escape sequences in which the character following the backslash is not listed in
                                        Table 7 are conditionally-supported, with implementation-defined semantics.</td>
                                <td><em>Probably no single macro would make sense for this.</em></td>
                        </tr>
                        <tr>
                                <td>2.14.5p13</td>
                                <td>Any other concatenations are conditionally supported with implementation-defined
                                        behavior.</td>
                                <td><em>Probably no single macro would make sense for this.</em></td>
                        </tr>
                        <tr>
                                <td>5.2.2p7</td>
                                <td>Passing a potentially-evaluated argument of class type (Clause 9) having a nontrivial
                                        copy constructor, a non-trivial move constructor, or a non-trivial destructor, with
                                        no corresponding parameter, is conditionally-supported with implementation-defined
                                        semantics.</td>
                                <td><code>__cond_no_passing_non_pod_by_ellipsis</code></td>
                        </tr>
                        <tr>
                                <td>5.2.10p8</td>
                                <td>Converting a function pointer to an object pointer type or vice versa is conditionally-supported.
                                </td>
                                <td><code>__cond_no_fun_obj_ptr_conversion</code></td>
                        </tr>
                        <tr>
                                <td>7.4p1</td>
                                <td>The asm declaration is conditionally-supported; its meaning is implementation-defined.
                                </td>
                                <td><code>__cond_no_asm_declaration</code></td>
                        </tr>
                        <tr>
                                <td>7.5p2</td>
                                <td>Use of a <var>string-literal</var> other than <code>"C"</code> or <code>"C++"</code>
                                        is conditionally-supported, with implementation-defined semantics.</td>
                                <td><em>Probably no single macro would make sense for this.</em></td>
                        </tr>
                        <tr>
                                <td>7.6.1p3</td>
                                <td>The use of an <var>attribute-scoped-token</var> is conditionally-supported, with
                                        implementation-defined behavior.</td>
                                <td><code>_cond_no_attribute_scoped_token</code></td>
                        </tr>
                        <tr>
                                <td>14p4</td>
                                <td>Use of a linkage specification other than C or C++ with any of these constructs
                                        is conditionally-supported, with implementation-defined semantics.</td>
                                <td><code>_cond_no_template_linkage_spec</code></td>
                        </tr>
                </tbody>
        </table>
-->
    <h3 id="recs.cpp98">C++98 features</h3>
    <p class="note">STUB: especially for exception handling and RTTI</p>
    <table border="1" class="ins">
        <thead>
            <tr>
                <th>Feature</th>
                <th>Primary section</th>
                <th>Macro name</th>
                <th>Value</th>
                <th>Header</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Run-time type identification</td>
                <td>5.2</td>
                <td><code>__cpp_rtti</code></td>
                <td>199711</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td>Exception handling</td>
                <td>15</td>
                <td><code>__cpp_exceptions</code></td>
                <td>199711</td>
                <td><em>predefined</em></td>
            </tr>
        </tbody>
    </table>
    <h3 id="recs.removed"><ins>Features published and later removed</ins></h3>
    <h4 id="recs.removed.cpp14"><ins>Features femoved from C++14</ins></h4>
    <table border="1" class="ins">
        <caption>Features in the first CD of C++14, subsequently removed to a Technical Specification</caption>
        <thead>
            <tr>
                <th>Doc. No.</th>
                <th>Title</th>
                <th>Primary Section</th>
                <th>Macro Name</th>
                <th>Value</th>
                <th>Header</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html">N3639</a>
                </td>
                <td>Runtime-sized arrays with automatic storage duration</td>
                <td>8.3</td>
                <td><code><a href="#detail.cpp14.n3639">__cpp_runtime_arrays&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></code>
                </td>
                <td>201304</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3672.html">N3672</a>
                </td>
                <td>A proposal to add a utility class to represent optional objects</td>
                <td>20.5</td>
                <td><code><a href="#detail.cpp14.n3672">__has_include(&lt;optional&gt;)</a></code>
                </td>
                <td>1</td>
                <td><em>predefined</em></td>
            </tr>
            <tr>
                <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3662.html">N3662</a>
                </td>
                <!--feedback-->
                <td>C++ Dynamic Arrays</td>
                <td>23.2, 23.3</td>
                <td><code><a href="#detail.cpp14.n3662">__has_include(&lt;dynarray&gt;)</a></code>
                </td>
                <td>1</td>
                <td><em>predefined</em></td>
            </tr>
        </tbody>
    </table>
    <p><ins>The intention is that an implementation which provides runtime-sized arrays
        as specified in the first CD
        should define <code>__cpp_runtime_arrays</code> as 201304.
        The expectation is that a later document specifying runtime-sized arrays
        will specify a different value for <code>__cpp_runtime_arrays</code>.
    </ins></p>
    <h2 id="detail">Detailed explanation and rationale</h2>
    <h3 id="detail.cpp14">C++14 features</h3>
    <p class="note">Many of the examples here have been shamelessly and almost brainlessly
                plagiarized from the cited paper. Assistance with improving examples is solicited.</p>
    <h4 id="detail.cpp14.n3323">N3323: A Proposal to Tweak Certain C++ Contextual Conversions</h4>
    <p>This paper specifies a small change that is considered to be more of a bug fix than
                a new feature, so no macro is considered necessary.</p>
    <h4 id="detail.cpp14.n3421">N3421: Making Operator Functors greater&lt;&gt;</h4>
    <p>Example:</p>
    <pre>#if __cpp_lib_transparent_operators
        sort(v.begin(), v.end(), greater&lt;&gt;());
#else
        sort(v.begin(), v.end(), greater&lt;valueType&gt;());
#endif</pre>
    <h4 id="detail.cpp14.n3462">N3462: std::result_of and SFINAE</h4>
    <p>Example:</p>
    <pre>template&lt;typename A&gt;
#if __cpp_lib_result_of_sfinae
  typename std::result_of&lt;inc(A)&gt;::type
#else
  decltype(std::declval&lt;inc&gt;()(std::declval&lt;A&gt;()))
#endif
try_inc(A a);
</pre>
    <h4 id="detail.cpp14.n3471">N3469: Constexpr Library Additions: chrono<br />
        N3470: Constexpr Library Additions: containers<br />
        N3471: Constexpr Library Additions: utilities</h4>
    <p>These papers just add <code>constexpr</code> to the declarations of several dozen
                library functions in various headers. It is not clear that a macro to test for the
                presence of these changes would be sufficiently useful to be worthwhile.</p>
    <h4 id="detail.cpp14.n3472">N3472: Binary Literals in the C++ Core Language</h4>
    <p>Example:</p>
    <pre>int const packed_zero_to_three =
#if __cpp_binary_literals
        0b00011011;
#else
        0x1B;
#endif</pre>
    <h4 id="detail.cpp14.n3545">N3545: An Incremental Improvement to integral_constant</h4>
    <p>Example:</p>
    <pre>constexpr bool arithmetic =
#if __cpp_lib_integral_constant_callable
        std::is_arithmetic&lt;T&gt;{}();
#else
        static_cast&lt;bool&gt;(std::is_arithmetic&lt;T&gt;{});
#endif</pre>
    <h4 id="detail.cpp14.n3624">N3624: Core Issue 1512: Pointer comparison vs qualification
                conversions</h4>
    <p>This paper contained the wording changes to resolve a core issue. It did not introduce
                a new feature, so no macro is considered necessary.</p>
    <h4 id="detail.cpp14.n3638">N3638: Return type deduction for normal functions</h4>
    <p>This paper describes two separate features: the ability to deduce the return type
                of a function from the return statements contained in its body, and the ability
                to use <code>decltype(auto)</code>. These features can be implemented independently,
                so a macro is recommended for each.</p>
    <p>Examples:</p>
    <pre>template&lt;typename T&gt;
auto abs(T x)
#ifndef __cpp_return_type_deduction
        -> decltype(x &lt; 0 ? -x : x)
#endif
{
        return x &lt; 0 ? -x : x;
}</pre>
    <h4 id="detail.cpp14.n3639">N3639: Runtime-sized arrays with automatic storage duration</h4>
    <p>This was removed from C++14 to TS 19569.</p>
    <p>Example:</p>
    <pre>#if __cpp_runtime_arrays
        T local_buffer[n];        // more efficient than vector
#else
        std::vector&lt;T&gt; local_buffer(n);
#endif</pre>
    <h4 id="detail.cpp14.n3642">N3642: User-defined Literals for Standard Library Types</h4>
    <p>This paper specifies user-defined literal operators for two different standard library
                types, which could be implemented independently. Furthermore, user-defined literal
                operators are expected to be added later for at least one other library type. So
                for consistency and flexibility, each type is given its own macro.</p>
    <p>Examples:</p>
    <h4 id="detail.cpp14.n3644">N3644: Null Forward Iterators</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3648">N3648: Wording Changes for Generalized Lambda-capture</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3649">N3649: Generic (Polymorphic) Lambda Expressions</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3651">N3651: Variable Templates</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3652">N3652: Relaxing constraints on constexpr functions / constexpr
                member functions and implicit const</h4>
    <p>The major change proposed by this paper is considered to be strictly a further development
                of the <code>constexpr</code> feature of C++11. Consequently, the recommendation
                here is to give an increased value to the macro indicating C++11 support for <code>constexpr</code>.</p>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3653">N3653: Member initializers and aggregates</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3654">N3654: Quoted Strings Library Proposal</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3655">N3655: TransformationTraits Redux</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3656">N3656: make_unique</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3657">N3657: Adding heterogeneous comparison lookup to associative
                containers</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3658">N3658: Compile-time integer sequences</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3659">N3659: Shared locking in C++</h4>
    <p><ins>The original recommendation, of a macro defined in header <code>&lt;mutex&gt;</code>,
                was not useful, and has been retracted.</ins></p>
    <p>For new headers, we have a long-term solution that uses <code>__has_include</code>.
                There was not sufficient support and a number of objections against adding macros
                to existing library header files, as there was not consensus on a place to put them.</p>
    <p>There is also a simple workaround for users that are not using libraries that define
                the header file: supplying their own header that is further down the search path
                than the library headers.</p>
    <p>Example:</p>
    <pre>#if __has_include(&lt;shared_mutex&gt;)
#include &lt;shared_mutex&gt;

// <em>code that uses std::shared_mutex</em>
#endif</pre>
    <h4 id="detail.cpp14.n3662">N3662: C++ Dynamic Arrays</h4>
    <p>This was removed from C++14 to TS 19569.</p>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3664">N3664: Clarifying Memory Allocation</h4>
    <p>The substantive change in this paper just relaxes a restriction on implementations.
                There is no new feature for a programmer to use, so no macro is considered necessary.</p>
    <h4 id="detail.cpp14.n3667">N3667: Drafting for Core 1402</h4>
    <p>This paper contained the wording changes to resolve a core issue. It did not introduce
                a new feature, so no macro is considered necessary.</p>
    <h4 id="detail.cpp14.n3668">N3668: exchange() utility function</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3669">N3669: Fixing constexpr member functions without const</h4>
    <p>This paper contained the wording changes to ensure that a minor change proposed by
                N3652 did not impact the standard library. It did not introduce a new feature, so
                no macro is considered necessary.</p>
    <h4 id="detail.cpp14.n3670">N3670: Wording for Addressing Tuples by Type</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3671">N3671: Making non-modifying sequence operations more robust</h4>
    <p>Example:</p>
    <h4 id="detail.cpp14.n3672">N3672: A proposal to add a utility class to represent optional
                objects</h4>
    <p>This was removed from C++14 to TS 19568.</p>
    <p>See <a href="#detail.cpp14.n3659">N3659</a> for rationale.</p>
    <p>Example:</p>
    <pre>#if __has_include(&lt;optional&gt;)
#include &lt;optional&gt;

// <em>code that uses std::optional</em>
#endif</pre>
    <h4 id="detail.cpp14.n3673">N3673: C++ Library Working Group Ready Issues Bristol 2013</h4>
    <p>This paper was just a collection of library issues. It did not introduce a new feature,
                so no macro is considered necessary.</p>
    <ins>
        <h4 id="detail.cpp14.n3760">N3760: [[deprecated]] attribute</h4>
        <p>Differentiating attribute availability based on compiler-specific macros is error-
                        prone. Since vendors are allowed to provide implementation-specific attributes in
                        addition to standards-based attributes, this feature provides a uniform, future-proof
                        way to test the availability of attributes.</p>
        <p>Example:</p>
        <pre>#ifdef __has_cpp_attribute
#  if __has_cpp_attribute(deprecated)
#    define ATTR_DEPRECATED(msg) [[deprecated(msg)]]
#  else
#    define ATTR_DEPRECATED(msg)
#  endif
#endif

ATTR_DEPRECATED("f() has been deprecated") void f();</pre>
        <h4 id="detail.cpp14.n3776">N3776: Wording for ~future</h4>
        <p>The change made by this paper is a bug fix, and no macro is considered necessary.</p>
        <h4 id="detail.cpp14.n3778">N3778: C++ Sized Deallocation</h4>
        <p>Example:</p>
        <h4 id="detail.cpp14.n3779">N3779: User-defined Literals for std::complex</h4>
        <p>Example:</p>
        <h4 id="detail.cpp14.n3781">N3781: Single-Quotation-Mark as a Digit Separator</h4>
        <p>Example:</p>
        <h4 id="detail.cpp14.n3786">N3786: Prohibiting "out of thin air" results in C++14</h4>
        <p>The change made by this paper is a bug fix, and no macro is considered necessary.</p>
        <h4 id="detail.cpp14.n3789">N3789: Constexpr Library Additions: functional</h4>
        <p>See <a href="#detail.cpp14.n3471">N3471</a> for rationale.</p>
        <h4 id="detail.cpp14.n3887">N3887: Consistent Metafunction Aliases</h4>
        <p>Example:</p>
        <h4 id="detail.cpp14.n3891">N3891: A proposal to rename shared_mutex to shared_timed_mutex</h4>
        <p>Example:</p>
        <h4 id="detail.cpp14.n3910">N3910: What can signal handlers do? (CWG 1441)</h4>
        <p>The change made by this paper is a bug fix, and no macro is considered necessary.</p>
        <h4 id="detail.cpp14.n3024">N3924: Discouraging rand() in C++14</h4>
        <p>The change made by this paper is not normative; no macro is necessary.</p>
        <h4 id="detail.cpp14.n3927">N3927: Definition of Lock-Free</h4>
        <p>The change made by this paper is a bug fix, and no macro is considered necessary.</p>
        <h4 id="detail.cpp14.lwg2112">LWG issue 2112: User-defined classes that cannot be derived
                        from</h4>
        <p>Libraries that want to do empty-base optimization could reasonably want to use <code>!is_final &amp;&amp; is_empty</code> if <code>is_final</code> exists, and fall back
                        to just using <code>is_empty</code> otherwise.</p>
        <p>Example:</p>
        <pre>template&lt;typename T&gt;
struct use_empty_base_opt :
        std::integral_constant&lt;bool, 
                std::is_empty&lt;T&gt;::value
#if __cpp_lib_has_is_final
                &amp;&amp; !std::is_final&lt;T&gt;::value
#endif
        &gt;
{ };
</pre>
        <h4 id="detail.cpp14.lwg2247">LWG issue 2247: Type traits and std::nullptr_t</h4>
        <p>Example:</p>
        <h4 id="detail.cpp14.lwg2249">LWG issue 2249: Remove gets from &lt;cstdio&gt;</h4>
        <p>Since portable, well-written code does not use the <code>gets</code> function at
                        all, there is no need for a macro to indicate whether it is available.</p>
        <h4 id="detail.cpp14.lwg2285">LWG issue 2285: make_reverse_iterator</h4>
        <p>Example:</p>
        <h2 id="hist">Revision history</h2>
    </ins>
    <table border="1">
        <thead>
            <tr>
                <th>Date</th>
                <th>Document</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>2014-08-21</td>
                <td>[draft]</td>
                <td></td>
            </tr>
            <tr>
                <td>2014-05-22</td>
                <td>N4030</td>
                <td>Updated for changes from Chicago and Issaquah meetings<br />
                    Added <code>__has_cpp_attribute</code> test</td>
            </tr>
            <tr>
                <td>2013-11-27</td>
                <td>SD-6</td>
                <td>Initial publication<br />
                    No substantive changes from N3745</td>
            </tr>
            <tr>
                <td>2013-08-28</td>
                <td>N3745</td>
                <td>Endorsed by WG21 membership</td>
            </tr>
            <tr>
                <td>2013-06-27</td>
                <td>N3694</td>
                <td>Initial draft</td>
            </tr>
        </tbody>
    </table>
</body>
</html>