<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [accepts-invalid] Member template inside a local class"
   href="https://llvm.org/bugs/show_bug.cgi?id=26841">26841</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[accepts-invalid] Member template inside a local class
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ldionne.2@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following code compiles successfully on Clang trunk, but it is invalid 
according to the C++14 standard:

    int main() {
        struct foo { template <typename ...> using nested = void; };
    }

The relevant part of the standard is in [temp.mem], ยง14.5.2/2:

    A local class of non-closure type shall not have member templates.

Live example: <a href="http://melpon.org/wandbox/permlink/6iFYFG3gcgzOYftp">http://melpon.org/wandbox/permlink/6iFYFG3gcgzOYftp</a>


Surprisingly, this bug is marked as fixed in bug [16947], so I guess this
is a regression.

[16947]: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Diagnose local class with template member"
   href="show_bug.cgi?id=16947">https://llvm.org/bugs/show_bug.cgi?id=16947</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>