<!DOCTYPE html>
<!-- saved from url=(0068)http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0340r2.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.6.0">

<title>P0340R3: Making std::underlying_type SFINAE-friendly</title>

<style type="text/css">
  p {text-align:justify}
  li {text-align:justify}
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  del { text-decoration:line-through; background-color:#FFA0A0 }
</style>
</head>
<body>
<h1 id="making-std-underlying_type-sfinae-friendly">Making
<code>std::underlying_type</code> SFINAE-friendly</h1>
<table>
<tbody>
<tr>
<td>Document number:</td>
<td>P0340R3</td>
</tr>
<tr>
<td>Date:</td>
<td>2019-02-21</td>
</tr>
<tr>
<td>Audience:</td>
<td>LWG</td>
</tr>
<tr>
<td>Reply to:</td>
<td>Tim Song &lt;rs2740@gmail.com&gt;</td>
</tr>
</tbody>
</table>
<h2 id="revision-history">Revision history</h2>
<ul>
<li>R3 (2019-02-21): Updated wording per LWG Kona feedback and removed the other sections. See <a href="https://wg21.link/P0340R2">R2</a> for motivation and discussion. </li>
<li>R2 (2018-11-25): Updated wording to current WP and removed alternative wording options per LEWG poll. Elaborated on incomplete enumeration types. </li>
<li>R1 (2018-05-07): Updated wording to current WP and added alternative wording options. </li>
</ul>
<h2 id="proposed-wording">Proposed wording</h2>
<p>This wording is relative to <a href="https://wg21.link/N4800">N4800</a>.
</p><p>Edit Table 55 in [meta.trans.other] as indicated:</p>
<table border="1">
<thead>
<tr>
<th>Template</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td><code>template &lt;class T&gt;</code><br>
<code>struct underlying_type;</code></td>
<td>
<p><ins>If <code>T</code> is an enumeration type, the</ins>
<del>The</del> member typedef <code>type</code> names the
underlying type of <code>T</code><ins> (9.6 [dcl.enum]); otherwise, there is
no member <code>type</code></ins>.</p>
<p><del><i>Requires:</i></del><ins><i>Mandates:</i></ins> <code>T</code> <del>shall be a</del> <ins>is not an in</ins>complete enumeration type<ins>.</ins>
<del>(9.6)</del></p>
</td>
</tr>
<tr>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
</body></html>