<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 --- - [c++17] exception-specification in explicit instantiation not required"
   href="https://llvm.org/bugs/show_bug.cgi?id=31081">31081</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[c++17] exception-specification in explicit instantiation not required
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>octoploid@yandex.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>except.spec/5 says:
»In an explicit instantiation an exception-specification may be specified, but
is not required.«

However clang rejects this valid code:

 % cat compat.ii
template <typename T> void foo() noexcept {}
template <typename T> void bar() throw() {}
template void foo<int>();
template void bar<int>();

 % clang++ -std=c++1z -c compat.ii
compat.ii:3:15: error: explicit instantiation of 'foo' does not refer to a
function template, variable template, member function, member class, or static
data member
template void foo<int>();
              ^
compat.ii:1:28: note: candidate template ignored: could not match 'void ()
noexcept' against 'void ()'
template <typename T> void foo() noexcept {}
                           ^
compat.ii:4:15: error: explicit instantiation of 'bar' does not refer to a
function template, variable template, member function, member class, or static
data member
template void bar<int>();
              ^
compat.ii:2:28: note: candidate template ignored: could not match 'void ()
throw()' against 'void ()'
template <typename T> void bar() throw() {}
                           ^
2 errors generated.</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>