Title
Forward declaration of partial specializations
Status
cd6
Section
9.2.9.5 [dcl.type.elab]
Submitter
Richard Smith

Created on 2015-12-11.00:00:00 last changed 20 months ago

Messages

Date: 2016-11-15.00:00:00

Notes from the November, 2016 meeting:

CWG felt that forward declarations of partial specializations should be allowed.

Date: 2020-11-15.00:00:00

[Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]

According to 9.2.9.5 [dcl.type.elab] paragraph 1,

If an elaborated-type-specifier is the sole constituent of a declaration, the declaration is ill-formed unless it is an explicit specialization (13.9.4 [temp.expl.spec]), an explicit instantiation (13.9.3 [temp.explicit]) or it has one of the following forms:

    class-key attribute-specifier-seqopt identifier ;
    friend class-key ::opt identifier ;
    friend class-key ::opt simple-template-id ;
    friend class-key nested-name-specifier identifier ;
    friend class-key nested-name-specifier templateopt simple-template-id ;

This implies that class template partial specializations cannot be forward-declared, which is probably unintentional.

History
Date User Action Args
2022-08-19 07:54:33adminsetstatus: drwp -> cd6
2021-02-24 00:00:00adminsetstatus: accepted -> drwp
2020-12-15 00:00:00adminsetstatus: drafting -> accepted
2018-02-27 00:00:00adminsetmessages: + msg5903
2018-02-27 00:00:00adminsetstatus: open -> drafting
2015-12-11 00:00:00admincreate