This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114b. See for the official list.


1995. exception-specifications and non-type template parameters

Section: 14.5  [except.spec]     Status: CD4     Submitter: Gabriel Dos Reis     Date: 2014-09-03

[Adopted at the October, 2015 meeting as P0012R1.]

In the following example,

   struct A {
     template<class T>
       T foo(T t) noexcept { return t; }

     template<class T, int (T::*fptr)(int)> struct S {
       A a;
       S() noexcept(noexcept((a.*fptr)(1))) {}

     int foo() {
       return noexcept(S<A,&A::foo>());

what should foo return? The question hinges upon whether the noexcept property of the template argument is preserved or lost in the process of substitution.

See also issues 2010, 1975, 1946, and 1798.