Title
exception-specifications and pointer/pointer-to-member expressions
Status
cd4
Section
14.5 [except.spec]
Submitter
Steve Adamczyk

Created on 2013-02-12.00:00:00 last changed 87 months ago

Messages

Date: 2014-11-15.00:00:00

[Moved to DR at the November, 2014 meeting.]

Date: 2013-06-15.00:00:00

Proposed resolution (June, 2013):

This issue is resolved by the proposed resolution of issue 1351.

Date: 2013-05-03.00:00:00

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<class T> struct A {
    void f() noexcept(false) {}
    void g() noexcept(true) {}
  };

  int main() {
    if (noexcept((A<short>().*(&A<short>::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.)

(See also issues 92 and 1351.)

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-05-25 00:00:00adminsetstatus: dr -> drwp
2015-04-13 00:00:00adminsetmessages: + msg5425
2014-11-24 00:00:00adminsetstatus: ready -> dr
2014-07-07 00:00:00adminsetstatus: review -> ready
2014-05-27 00:00:00adminsetstatus: ready -> review
2014-03-03 00:00:00adminsetstatus: review -> ready
2013-05-03 00:00:00adminsetmessages: + msg4327
2013-05-03 00:00:00adminsetstatus: open -> review
2013-02-12 00:00:00admincreate