Skip to content

Commit 2937962

Browse files
committed
Apply LWG2409 from N4079: "SFINAE-friendly common_type/iterator_traits should be removed from the fundamental-ts"
1 parent f06f897 commit 2937962

File tree

2 files changed

+0
-64
lines changed

2 files changed

+0
-64
lines changed

general.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -262,22 +262,6 @@ <h1>Feature-testing recommendations (Informative)</h1>
262262
<td>201402</td>
263263
<td><code>&lt;functional></code></td>
264264
</tr>
265-
<tr>
266-
<td>N3843</td>
267-
<td>A SFINAE-Friendly <code>common_type</code></td>
268-
<td><cxx-ref to="mods.meta.trans.other"></cxx-ref></td>
269-
<td><code>common_type_sfinae</code></td>
270-
<td>201402</td>
271-
<td><code>&lt;type_traits></code></td>
272-
</tr>
273-
<tr>
274-
<td>N3923</td>
275-
<td>A SFINAE-Friendly <code>iterator_traits</code></td>
276-
<td><cxx-ref to="mods.iterator.traits"></cxx-ref></td>
277-
<td><code>iterator_traits_sfinae</code></td>
278-
<td>201402</td>
279-
<td><code>&lt;iterator></code></td>
280-
</tr>
281265
<tr>
282266
<td>N3916</td>
283267
<td>Type-erased allocator for std::promise</td>

mods.html

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -407,54 +407,6 @@ <h1>Additions to <code>std::function</code></h1>
407407
</cxx-function>
408408
</cxx-section>
409409

410-
<cxx-section id="mods.meta.trans.other">
411-
<h1>Changes to <code>std::common_type</code></h1>
412-
413-
<p>In <cxx-ref in="cxx" to="meta.trans.other"></cxx-ref>, the definition of <code>common_type::type</code> in paragraph 3 is removed and replaced with:</p>
414-
<blockquote>
415-
<p>
416-
<ins>For the <code>common_type</code> trait applied to a parameter pack <code>T</code> of types,
417-
the member <code>type</code> shall be either defined or not present as follows:</ins>
418-
</p>
419-
<ins><ul>
420-
<li>If <code>sizeof...(T)</code> is zero, there shall be no member <code>type</code>.</li>
421-
<li>If <code>sizeof...(T)</code> is one, let <code>T0</code> denote the sole type comprising <code>T</code>. The member typedef <code>type</code> shall denote the same type as <code>decay_t&lt;T0></code>.</li>
422-
<li>
423-
If <code>sizeof...(T)</code> is greater than one,
424-
let <code>T1</code>, <code>T2</code>, and <code>R</code> respectively denote the first, second, and (pack of) remaining types comprising <code>T</code>.
425-
<cxx-note><code>sizeof...(R)</code> may be zero.</cxx-note>
426-
Finally, let <code>C</code> denote the type, if any, of an unevaluated conditional expression (<cxx-ref in="cxx" to="expr.cond"></cxx-ref>)
427-
whose first operand is an arbitrary value of type <code>bool</code>,
428-
whose second operand is an xvalue of type <code>T1</code>,
429-
and whose third operand is an xvalue of type <code>T2</code>.
430-
If there is such a type <code>C</code>, the member typedef <code>type</code> shall denote the same type, if any, as <code>common_type_t&lt;C,R...></code>.
431-
Otherwise, there shall be no member <code>type</code>.
432-
</li>
433-
</ul></ins>
434-
</blockquote>
435-
</cxx-section>
436-
437-
<cxx-section id="mods.iterator.traits">
438-
<h1>Changes to <code>std::iterator_traits</code></h1>
439-
440-
<p>In <cxx-ref in="cxx" to="iterator.traits"></cxx-ref>, the definition of <code>iterator_traits</code> is changed as follows:</p>
441-
<blockquote>
442-
<p>
443-
The template <code>iterator_traits&lt;Iterator></code><del> is defined as</del>
444-
<ins> shall have the following as publicly accessible members, and have no other members, if and only if <code>Iterator</code> has valid (<cxx-ref in="cxx" to="temp.deduct"></cxx-ref>) member types <code>difference_type</code>, <code>value_type</code>, <code>pointer</code>, <code>reference</code>, and <code>iterator_category</code>; otherwise, the template shall have no members:</ins>
445-
</p>
446-
<pre><code><del>namespace std {
447-
template&lt;class Iterator> struct iterator_traits {</del>
448-
typedef typename Iterator::difference_type difference_type;
449-
typedef typename Iterator::value_type value_type;
450-
typedef typename Iterator::pointer pointer;
451-
typedef typename Iterator::reference reference;
452-
typedef typename Iterator::iterator_category iterator_category;
453-
<del> };
454-
}</del></code></pre>
455-
</blockquote>
456-
</cxx-section>
457-
458410
<cxx-section id="mods.futures.promise">
459411
<h1>Additions to <code>std::promise</code></h1>
460412

0 commit comments

Comments
 (0)