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

2024-12-19


2213. Forward declaration of partial specializations

Section: 9.2.9.5  [dcl.type.elab]     Status: CD6     Submitter: Richard Smith     Date: 2015-12-11

[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:

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

Notes from the November, 2016 meeting:

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