CWG Issue 1639 (original) (raw)
This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-11-05
1639._exception-specification_s and pointer/pointer-to-member expressions
Section: 14.5 [except.spec]Status: CD4Submitter: Steve AdamczykDate: 2013-02-12
[Moved to DR at the November, 2014 meeting.]
The current specification is not clear whether the_exception-specification_ for a function is propagated to the result of taking its address. For example:
template struct A { void f() noexcept(false) {} void g() noexcept(true) {} };
int main() { if (noexcept((A().*(&A::f))())) return 1;
if (!noexcept((A<long>().*(&A<long>::g))()))
return 1;
return 0;}
There is implementation variance on whether main returns 0 or 1 for this example. (It also appears that taking the address of a member function of a class template requires instantiating its_exception-specification_, but it is not clear whether the Standard currently specifies this or not.)
Proposed resolution (June, 2013):
This issue is resolved by the proposed resolution ofissue 1351.