Title
exception-specifications and non-type template parameters
Status
cd4
Section
14.5 [except.spec]
Submitter
Gabriel Dos Reis

Created on 2014-09-03.00:00:00 last changed 94 months ago

Messages

Date: 2015-10-15.00:00:00

[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.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: accepted -> cd4
2015-11-10 00:00:00adminsetstatus: open -> accepted
2014-09-03 00:00:00admincreate