<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8" />
  <title>SD-6 additions from Jacksonville meeting</title>
  <style type="text/css">
    strong {
      background-color: yellow;
    }
  </style>
</head>
<body>
  <h1>SD-6 additions from Jacksonville meeting</h1>
  <p>Here is what I have done to try to capture the changes
    to C++17 from Jacksonville.</p>
  <p>The vast majority of the library proposals
    include a proposed name for the feature-test macro. (Yay!)
    They are all included in the table.
    But none of the language proposals did, and a few of the library proposals didn't say anything.</p>
  <p>I have added some proposals of my own,
    marked with a question mark.
    Note that for range-based &quot;for&quot;, constexpr lambdas,
    and fold expressions, the proposal is to bump an existing macro.
    (The target of the link from the new value is in SD-6;
    it dangles in this document.)
  </p>
  <p>For the enum class value change, the "design mistake",
    and non-const data for string,
    the proposal is that no macro is needed;
    rationale is included.</p>
  <p>The fundamentals TS (and to a lesser degree the parallelism TS)
    make it not obvious what to do about
    keeping the table sorted by primary section number.</p>
  <p>Most of the document links are broken now,
    but should start working
    when the post-meeting mailing is posted.</p>
  <ins>
    <table border="1">
      <caption>Significant changes to C++17</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/2016/p0245r1.html">P0245R1</a></td>
          <td>Hexadecimal floating literals for C++</td>
          <td>2.13</td>
          <td><a href="#detail.cpp17.p0245"><code>__cpp_hex_float</code></a></td>
          <td>201603</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0018r3.html">P0018R3</a></td>
          <td>Lambda Capture of *this by Value as [=,*this]</td>
          <td>5.1</td>
          <td><a href="#detail.cpp17.p0018"><code>__cpp_capture_this</code></a> <strong>?</strong><br />
            <a href="#detail.cpp17.p0018"><code>__cpp_capture_star_this</code></a> <strong>?</strong></td>
          <td>201603</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0170r1.pdf">P0170R1</a></td>
          <td>Wording for Constexpr Lambda</td>
          <td>5.1</td>
          <td><a href="#detail.cpp17.p0170"><code>__cpp_constexpr</code></a></td>
          <td><a href="#__cpp_constexpr_201304">201603</a></td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0184r0.pdf">P0184R0</a></td>
          <td>Generalizing the Range-Based For Loop</td>
          <td>6.5</td>
          <td><a href="#detail.cpp17.p0184"><code>__cpp_range_based_for</code></a></td>
          <td><a href="#__cpp_range_for_200907">201603</a></td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0188r1.pdf">P0188R1</a></td>
          <td>Wording for [[fallthrough]] attribute</td>
          <td>7.6</td>
          <td><code>__has_cpp_attribute(fallthrough)</code></td>
          <td>201603</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0189r1.pdf">P0189R1</a></td>
          <td>Wording for [[nodiscard]] attribute</td>
          <td>7.6</td>
          <td><code>__has_cpp_attribute(nodiscard)</code></td>
          <td>201603</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0212r1.pdf">P0212R1</a></td>
          <td>Wording for [[maybe_unused]] attribute</td>
          <td>7.6</td>
          <td><code>__has_cpp_attribute(maybe_unused)</code></td>
          <td>201603</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0017r1.pdf">P0017R1</a></td>
          <td>Extension to aggregate initialization</td>
          <td>8.5</td>
          <td><a href="#detail.cpp17.p0017"><code>__cpp_aggregate_bases</code></a></td>
          <td>201603</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0138r2.pdf">P0138R2</a></td>
          <td>Construction Rules for enum class Values</td>
          <td>8.5</td>
          <td colspan="3"><a href="#detail.cpp17.p0138"><em>none</em></a> <strong>?</strong></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0036r0.pdf">P0036R0</a></td>
          <td>Unary Folds and Empty Parameter Packs</td>
          <td>14.5</td>
          <td><a href="#detail.cpp17.p0036"><code>__cpp_fold_expressions</code></a></td>
          <td><a href="#__cpp_fold_expressions_201411">201603</a></td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html">P0154R1</a></td>
          <td>constexpr std::hardware_{constructive,destructive}_interference_size</td>
          <td>18.6</td>
          <td><a href="#detail.cpp17.p0154"><code>__cpp_lib_hardware_interference_size</code></a></td>
          <td>201603</td>
          <td><code>&lt;new&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0304r0.html">LWG2296</a></td>
          <td>std::addressof should be constexpr</td>
          <td>20.7</td>
          <td><a href="#detail.cpp17.lwg2296"><code>__cpp_lib_addressof_constexpr</code></a> <strong>?</strong></td>
          <td>201603</td>
          <td><code>&lt;memory&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0033r1.html">P0033R1</a></td>
          <td>Re-enabling shared_from_this</td>
          <td>20.8</td>
          <td><a href="#detail.cpp17.p0033"><code>__cpp_lib_enable_shared_from_this</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;memory&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0005r4.html">P0005R4</a></td>
          <td>Adopt not_fn from Library Fundamentals 2 for C++17</td>
          <td>20.9</td>
          <td><a href="#detail.cpp17.p0005"><code>__cpp_lib_not_fn</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;function&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0253r1.pdf">P0253R1</a></td>
          <td>Fixing a design mistake in the searchers interface
          in Library Fundamentals</td>
          <td>20.9</td>
          <td colspan="3"><a href="#detail.cpp17.p0253"><em>none</em></a></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0185r1.html">P0185R1</a></td>
          <td>Adding [nothrow-]swappable traits</td>
          <td>20.10</td>
          <td><a href="#detail.cpp17.p0185"><code>__cpp_lib_is_swappable</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;type_traits&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0077r2.html">P0077R2</a></td>
          <td>is_callable, the missing INVOKE related trait</td>
          <td>20.10</td>
          <td><a href="#detail.cpp17.p0077"><code>__cpp_lib_is_callable</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;type_traits&gt;</code></td>
        </tr>
        <tr>
          <td rowspan="4"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0220r1.html">P0220R1</a></td>
          <td rowspan="4">Adopt Library Fundamentals V1 TS Components
          for C++17</td>
          <td>20.4</td>
          <td><a href="#detail.cpp17.p0220"><code>__cpp_lib_apply</code></a></td>
          <td>201603</td>
          <td><code>&lt;tuple&gt;</code></td>
        </tr>
        <tr>
          <td>20.8</td>
          <td><code>__cpp_lib_shared_ptr_arrays</code></td>
          <td>201603</td>
          <td><code>&lt;memory&gt;</code></td>
        </tr>
        <tr>
          <td>20.9</td>
          <td><code>__cpp_lib_boyer_moore_searching</code></td>
          <td>201603</td>
          <td><code>&lt;functional&gt;</code></td>
        </tr>
        <tr>
          <td>20</td>
          <td>
            <code>__has_include(&lt;optional&gt;)</code><br />
            <code>__has_include(&lt;any&gt;)</code><br />
            <code>__has_include(&lt;string_view&gt;)</code><br />
            <code>__has_include(&lt;memory_resource&gt;)</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/2016/p0272r1.html">P0272R1</a></td>
          <td>Give 'std::string' a non-const
          '.data()' member function</td>
          <td>21.4</td>
          <td colspan="3"><a href="#detail.cpp17.p0272"><em>none</em></a> <strong>?</strong></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0031r0.html">P0031R0</a></td>
          <td>A Proposal to Add Constexpr Modifiers
          to reverse_iterator, move_iterator, array
          and Range Access</td>
          <td>24.3</td>
          <td><a href="#detail.cpp17.p0031"><code>__cpp_lib_array_constexpr</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;iterator&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0025r0.pdf">P0025R0</a></td>
          <td>An algorithm to "clamp" a value
          between a pair of boundary values</td>
          <td>25.4</td>
          <td><a href="#detail.cpp17.p0025"><code>__cpp_lib_clamp</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;algorithm&gt;</code></td>
        </tr>
        <tr>
          <td rowspan="3"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0024r2.pdf">P0024R2</a></td>
          <td rowspan="3">The Parallelism TS Should be Standardized</td>
          <td>25, 26</td>
          <td><a href="#detail.cpp17.p0024"><code>__cpp_lib_parallel_algorithm</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;algorithm&gt;</code> <code>&lt;numeric&gt;</code></td>
        </tr>
        <tr>
          <td>18</td>
          <td><code>__has_include(&lt;exception_list&gt;)</code></td>
          <td>1</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td>20</td>
          <td><code>__has_include(&lt;execution_policy&gt;)</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/2015/p0030r1.pdf">P0030R1</a></td>
          <td>Proposal to Introduce a 3-Argument Overload
          to std::hypot</td>
          <td>26.8</td>
          <td><a href="#detail.cpp17.p0030"><code>__cpp_lib_hypot</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;cmath&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0226r1.pdf">P0226R1</a></td>
          <td>Mathematical Special Functions for C++17</td>
          <td>26.8</td>
          <td><a href="#detail.cpp17.p0226"><code>__cpp_lib_math_special_functions</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;cmath&gt;</code></td>
        </tr>
        <tr>
          <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0218r1.pdf">P0218R1</a></td>
          <td rowspan="2">Adopt the File System TS for C++17</td>
          <td rowspan="2">27.10</td>
          <td><code>__has_include(&lt;filesystem&gt;)</code></td>
          <td>1</td>
          <td><em>predefined</em></td>
        </tr>
        <tr>
          <td><a href="#detail.cpp17.p0218"><code>__cpp_lib_filesystem</code></a>
          </td>
          <td>201603</td>
          <td><code>&lt;filesystem&gt;</code></td>
        </tr>
        <tr>
          <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0152r1.html">P0152R1</a></td>
          <td>constexpr atomic&lt;T&gt;::is_always_lock_free</td>
          <td>29.5</td>
          <td><a href="#detail.cpp17.p0152"><code>__cpp_lib_atomic_is_always_lock_free</code></a></td>
          <td>201603</td>
          <td><code>&lt;atomic&gt;</code></td>
        </tr>
      </tbody>
    </table>
  </ins>
  <ins>
    <h4><a id="detail.cpp17.p0005">P0005R4:</a> Adopt not_fn
    from Library Fundamentals 2 for C++17</h4>
    <!--Author: Meredith, Lavavej -->
    <h4><a id="detail.cpp17.p0017">P0017R1:</a> Extension to
    aggregate initialization</h4>
    <!--Author: Smolsky -->
    <h4><a id="detail.cpp17.p0018">P0018R3:</a> Lambda Capture
    of *this by Value as [=,*this]</h4>
    <!--Author: Edwards, Vandevoorde -->
    <h4><a id="detail.cpp17.p0024">P0024R2: The Parallelism TS
    Should be Standardized</a></h4>
    <!--Author: Hoberock -->
    <h4><a id="detail.cpp17.p0025">P0025R0: An algorithm to "clamp"
    a value between a pair of boundary values</a></h4>
    <!--Author: Moene, Dekker -->
    <h4><a id="detail.cpp17.p0030">P0030R1:</a> Proposal to Introduce
    a 3-Argument Overload to std::hypot</h4>
    <!--Author: Ma -->
    <h4><a id="detail.cpp17.p0031">P0031R0:</a> A Proposal to Add
    Constexpr Modifiers to reverse_iterator, move_iterator, array
    and Range Access</h4>
    <!--Author: Polukhin -->
    <h4><a id="detail.cpp17.p0033">P0033R1:</a> Re-enabling
    shared_from_this</h4>
    <!--Author: Wakely, Dimov -->
    <h4><a id="detail.cpp17.p0036">P0036R0:</a> Unary Folds
    and Empty Parameter Packs</h4>
    <!--Author: Le Jehan, Maurer -->
    <!--Contributor: -->
    <h4><a id="detail.cpp17.p0077">P0077R2:</a> is_callable,
    the missing INVOKE related trait</h4>
    <!--Author: Berge -->
    <h4><a id="detail.cpp17.p0138">P0138R2:</a> Construction Rules
    for enum class Values</h4>
    <!--Author: Dos Reis -->
    <!--Contributor: Nelson -->
    <p>This doesn't provide any new functionality;
      it just makes some kinds of code simpler to write.
      Code that needs to be portable to implementations
      lacking this feature would be still more complicated
      if it tried to use the new feature when available.
      So a macro for this feature would not seem to be justified.</p>
    <h4><a id="detail.cpp17.p0152">P0152R1:</a> constexpr
    atomic&lt;T&gt;::is_always_lock_free</h4>
    <!--Author: Giroux, Bastien-->
    <h4><a id="detail.cpp17.p0154">P0154R1:</a> constexpr
    std::hardware_{constructive,destructive}_interference_size</h4>
    <!--Author: Giroux, Bastien -->
    <h4><a id="detail.cpp17.p0170">P0170R1:</a> Wording for
    Constexpr Lambda</h4>
    <!--Author: Vali, Maurer -->
    <h4><a id="detail.cpp17.p0184">P0184R0:</a> Generalizing
    the Range-Based For Loop</h4>
    <!--Author: Niebler -->
    <h4><a id="detail.cpp17.p0185">P0185R0:</a> Adding
    [nothrow-]swappable traits</h4>
    <!--Author: Krugler-->
    <!--Contributor: Krugler -->
    <p><strong>Many thanks to Daniel for sending me this example
    &ndash; unsolicited!</strong></p>
    <p>Example:</p>
    <pre>template&lt;class T>
  void my_swap(T& x, T& y)
#if __cpp_lib_is_swappable
  noexcept(std::is_swappable_v&lt;T>); // Covers all Lvalue Swappable cases
#else
  noexcept(
    std::is_nothrow_move_constructible_v&lt;T> &&
    std::is_nothrow_move_assignable_v&lt;T>
  );
#endif</pre>
    <h4><a id="detail.cpp17.p0188">P0188R1:</a> Wording for
    [[fallthrough]] attribute</h4>
    <!--Author: Tomazos -->
    <h4><a id="detail.cpp17.p0189">P0189R1:</a> Wording for
    [[nodiscard]] attribute</h4>
    <!--Author: Tomazos -->
    <h4><a id="detail.cpp17.p0212">P0212R1:</a> Wording for
    [[maybe_unused]] attribute</h4>
    <!--Author: Tomazos -->
    <h4><a id="detail.cpp17.p0218">P0218R1: Adopt the File System TS
    for C++17</a></h4>
    <!--Author: Dawes -->
    <h4><a id="detail.cpp17.p0220">P0220R1:</a> Adopt
    Library Fundamentals V1 TS Components for C++17</h4>
    <!--Author: Dawes, Meredith-->
    <p><strong>The fundamentals TS proposed a macro
    for each added component declared in a new header,
    but the parallelism TS added new headers,
    with only a single over-arching macro.
    Requiring a version-test macro for every brand-new header
      seems to be a bit excessive.</strong></p>
    <p><strong>This probably doesn't belong here long-term;
    it's just for short-term confirmation.</strong>
      Omitted:</p>
    <ul>
      <li>type_trait_variable_templates</li>
      <li>invocation_type</li>
      <li>function_erased_allocator</li>
      <li>promise_erased_allocator</li>
      <li>packaged_task_erased_allocator</li>
      <li>sample</li>
    </ul>
    <h4><a id="detail.cpp17.p0226">P0226R1: Mathematical Special
    Functions for C++17</a></h4>
    <!--Author: Naumann, Brown -->
    <h4><a id="detail.cpp17.p0235">P0235R1:</a> Fixing a design mistake
    in the searchers interface in Library Fundamentals</h4>
    <!--Author: Clow -->
    <!--Contributor: Nelson -->
    <p>This is a fix that is applied to the searchers interface
    at the same time that it is incorporated into the standard.
    The unfixed state exists only in the TS,
    which has its own macro name and value.
    The new macro for the searchers interface in the standard,
    with its new value,
    will be enough to indicate that this fix is applied.</p>
    <h4><a id="detail.cpp17.p0245">P0245R1:</a> Hexadecimal floating
    literals for C++</h4>
    <!--Author: Koeppe -->
    <h4><a id="detail.cpp17.p0272">P0272R1:</a> Give 'std::string'
    a non-const '.data()' member function</h4>
    <!--Author: Sankel -->
    <p>This doesn't provide any new functionality;
      it just makes some kinds of code simpler to write.
      Code that needs to be portable to implementations
      lacking this feature would be still more complicated
      if it tried to use the new feature when available.
      So a macro for this feature would not seem to be justified.</p>
    <h4><a id="detail.cpp17.lwg2296">LWG2296:</a> std::addressof should be constexpr</h4>
    <!--Author: Clow -->
    <!--Contributor: Smith -->
    <p>Example:</p>
    <pre>struct optional {
  bool b;
  T t;
  constexpr T *get() {
    return b ?
#if __cpp_lib_addressof_constexpr
      std::addressof(t)
#else
      &t
#endif
      : nullptr;
  }
};
</pre>
    <p>It is more important for <code>get</code> to be
      <code>constexpr</code> than for it to work
      if there is an overloaded <code>operator&amp;</code>,
      so <code>addressof</code> is used
      only if it would actually work in a constant expression.</p>
  </ins>
</body>
</html>