This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 113d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-03-20


1846. Declaring explicitly-defaulted implicitly-deleted functions

Section: 9.5.2  [dcl.fct.def.default]     Status: CD4     Submitter: Richard Smith     Date: 2014-01-30

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

According to 9.5.2 [dcl.fct.def.default] paragraph 2,

An explicitly-defaulted function may be declared constexpr only if it would have been implicitly declared as constexpr.

However, the rules for determining whether a function is constexpr and its exception-specification depend on the definition of function and do not apply to deleted functions. Can an explicitly-defaulted implicitly-deleted function be declared constexpr or have an exception-specification, and if so, how is its correctness to be determined?

Proposed resolution (February, 2014):

Change 9.5.2 [dcl.fct.def.default] paragraph 2 as follows:

An explicitly-defaulted function that is not defined as deleted may be declared constexpr only if it would have been implicitly declared as constexpr.