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

2024-07-24


1964. opaque-enum-declaration in alias-declaration?

Section: 9.2.4  [dcl.typedef]     Status: NAD     Submitter: Fedor Sergeev     Date: 2014-07-07

The grammar does not allow for a declaration of the form

  using T = enum class E : int;

However, it is widely accepted by current implementations. Should the rules be changed to accommodate this usage?

Rationale (November, 2014):

A type-id is intended as a reference to a type, but the opaque enumeration syntax is intended as a declaration, not a reference like an elaborated-type-specifier, so the current rules are as intended.