This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.
COMMON_REF
is unimplementable as specifiedSection: 21.3.8.7 [meta.trans.other] Status: C++20 Submitter: Casey Carter Opened: 2018-07-07 Last modified: 2021-02-25
Priority: 0
View all other issues in [meta.trans.other].
View all issues with C++20 status.
Discussion:
21.3.8.7 [meta.trans.other]/3.2 states:
[Let]which is nonsensical: a specialization of a class template cannot possibly be a cv-qualified type or reference type.XREF(A)
denote a unary class templateT
such thatT<U>
denotes the same type asU
with the addition ofA
’s cv and reference qualifiers, for a non-reference cv-unqualified typeU
,
XREF(A)
must be a unary alias template.
[2018-09-11; Status set to Tentatively Ready after five positive votes on the reflector]
[2018-11, Adopted in San Diego]
Proposed resolution:
This wording is relative to N4762.
Change 21.3.8.7 [meta.trans.other] as indicated:
-3- Let:
(3.1) —
CREF(A)
beadd_lvalue_reference_t<const remove_reference_t<A>>
,(3.2) —
XREF(A)
denote a unaryclassalias templateT
such thatT<U>
denotes the same type asU
with the addition ofA
’s cv and reference qualifiers, for a non-reference cv-unqualified typeU
,(3.3) —
COPYCV(FROM, TO)
be an alias for typeTO
with the addition ofFROM
’s top-level cv-qualifiers. [Example:COPYCV(const int, volatile short)
is an alias forconst volatile short
. —end example]