Created on 2012-03-20.00:00:00 last changed 131 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (December, 2012):
Change 6.8 [basic.types] paragraph 5 as follows:
A class that has been declared but not defined, an enumeration type in certain contexts (9.7.1 [dcl.enum]), or an array of unknown size or of incomplete element type, is an incompletely-defined object type.43 Incompletely-defined object types...
Add the following as a new paragraph preceding 9.7.1 [dcl.enum] paragraph 6:
An enumeration whose underlying type is fixed is an incomplete type from its point of declaration (6.4.2 [basic.scope.pdecl]) to immediately after its enum-base (if any), at which point it becomes a complete type. An enumeration whose underlying type is not fixed is an incomplete type from its point of declaration to immediately after the closing } of its enum-specifier, at which point it becomes a complete type.
For an enumeration whose underlying type is not fixed...
This resolution also resolves issue 977.
According to 6.4.2 [basic.scope.pdecl] paragraph 2,
The point of declaration for an enumeration is immediately after the identifier (if any) in either its enum-specifier (9.7.1 [dcl.enum]) or its first opaque-enum-declaration (9.7.1 [dcl.enum]), whichever comes first.
This would make the following example well-formed:
template<typename T> struct S { typedef char I; }; enum E: S<E>::I { e };
Presumably that would make E an incomplete enumeration type for the instantiation of S<E> (a concept not otherwise found in the Standard). However, some implementations reject this example, presumably making the point of declaration after the enum-base. We either need to make it ill-formed or describe incomplete enumeration types.
See also issue 977.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-05-03 00:00:00 | admin | set | messages: + msg4369 |
2013-05-03 00:00:00 | admin | set | status: tentatively ready -> dr |
2013-01-14 00:00:00 | admin | set | messages: + msg4195 |
2013-01-14 00:00:00 | admin | set | status: drafting -> tentatively ready |
2012-11-03 00:00:00 | admin | set | status: open -> drafting |
2012-03-20 00:00:00 | admin | create |