This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Moved to DR at the October, 2015 meeting.]
N3690 comment CA 12The specification of std::current_exception() in 17.9.7 [propagation] allows either referring to the exception object itself or to a copy thereof, implying that the exception object must be copyable. However, the specification of throw-expression allows throwing objects that cannot be copied, only moved. Presumably the requirements should include a non-deleted accessible copy constructor that is odr-used by a throw-expression, even if the object being thrown is moved to the exception object.
Additional note, February, 2014:
This issue was referred to CWG by EWG at the September, 2013 meeting but was overlooked at that time.
Proposed resolution (May, 2015):
Change 11.4.7 [class.dtor] paragraph 11 as follows:
...A destructor is potentially invoked if it is invoked or as specified in 7.6.2.8 [expr.new]and, 11.9.3 [class.base.init], and 14.2 [except.throw]. A program is ill-formed if...
Change 14.2 [except.throw] paragraph 5 as follows:
When the thrown object is a class object, the constructor selected for the copy-initialization as well as the constructor selected for a copy-initialization considering the thrown object as an lvalueand the destructorshall be non-deleted and accessible, even if the copy/move operation is elided (11.4.5.3 [class.copy.ctor]). The destructor is potentially invoked (11.4.7 [class.dtor]).