Title
Explicit specializations vs constexpr and consteval
Status
c++20
Section
13.9.4 [temp.expl.spec]
Submitter
Mike Miller

Created on 2019-06-07.00:00:00 last changed 48 months ago

Messages

Date: 2019-11-15.00:00:00

Proposed resolution (November, 2019):

Change 13.9.4 [temp.expl.spec] paragraph 14 as follows:

An explicit specialization of a function or variable template is inline only if it is declared with the inline specifier or defined as deleted, and independently of whether its function or variable template is inline. The inline, constexpr, and consteval properties of an explicit specialization of a function or variable template are determined by the explicit specialization and are independent of those properties of the template. [Example:...
Date: 2019-11-15.00:00:00

[Accepted as a DR at the November, 2019 meeting.]

According to 13.9.4 [temp.expl.spec] paragraph 13,

An explicit specialization of a function or variable template is inline only if it is declared with the inline specifier or defined as deleted, and independently of whether its function or variable template is inline.

The current wording does not specify the status of explicit specializations of constexpr and consteval function templates and members of class templates. Should a similar rule apply in those cases?

History
Date User Action Args
2020-12-15 00:00:00adminsetmessages: + msg6480
2019-06-07 00:00:00admincreate