Title
exception-specifications vs pointer dereference
Status
cd4
Section
14.5 [except.spec]
Submitter
Mike Miller

Created on 2014-06-21.00:00:00 last changed 49 months ago

Messages

Date: 2015-05-25.00:00:00

Additional note, May, 2015:

See also issue 92 and EWG issue 169.

Date: 2015-10-15.00:00:00

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

The resolution of issue 1351 results in the following:

  void (*p)() throw(int);
  void (&r)() throw(int) = *p;  // ill-formed

The reason is that the set of potential exceptions for an indirection is “any” instead of maintaining the known potential exceptions of the operand. It would seem to be reasonable to propagate the set in such cases.

A similar issue arises with function template argument deduction:

  template<typename T> T& f(T* p);
  void (*p)() throw(int);
  void (&r)() throw(int) = f(p);  // ill-formed

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

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: accepted -> cd4
2015-11-10 00:00:00adminsetstatus: open -> accepted
2015-05-25 00:00:00adminsetmessages: + msg5564
2014-06-21 00:00:00admincreate