Title
Clarify constexpr for defaulted functions
Status
ready
Section
9.5.2 [dcl.fct.def.default]
Submitter
Gabriel dos Reis

Created on 2022-04-18.00:00:00 last changed 2 weeks ago

Messages

Date: 2023-06-20.19:34:52

Proposed resolution (approved by CWG 2023-06-17):

A function explicitly defaulted on its first declaration is implicitly inline (9.2.8 [dcl.inline]), and is implicitly constexpr (9.2.6 [dcl.constexpr]) if it satisfies the requirements for a constexpr function. [Note: Other defaulted functions are not implicitly constexpr. -- end note ]
Date: 2022-04-18.00:00:00

After the application of P2448R2, 9.5.2 [dcl.fct.def.default] paragraph 3 reads:

A function explicitly defaulted on its first declaration is implicitly inline (9.2.8 [dcl.inline]), and is implicitly constexpr (9.2.6 [dcl.constexpr]) if it satisfies the requirements for a constexpr function.

It is unclear that no other such defaulted function is implicitly constexpr.

History
Date User Action Args
2023-11-10 14:27:11adminsetstatus: tentatively ready -> ready
2023-06-20 19:34:52adminsetstatus: open -> tentatively ready
2022-04-18 19:35:48adminsetmessages: + msg6802
2022-04-18 00:00:00admincreate