Created on 2011-05-03.00:00:00 last changed 25 months ago
[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
Note:
This change was subsequently removed by the resolution of issue 1330.
Proposed resolution (August, 2011):
Change 11.4 [class.mem] paragraph 2 as follows:
A class is considered a completely-defined object type (6.8 [basic.types]) (or complete type) at the closing } of the class-specifier. Within the class member-specification, the class is regarded as complete within function bodies, default arguments,exception-specifications,and brace-or-equal-initializers for non-static data members (including such things in nested classes). Otherwise it is regarded as incomplete within its own class member-specification.
Change 14.5 [except.spec] paragraph 2 as follows:
...A type denoted in an exception-specification shall not denote an incomplete type other than a class currently being defined. A type denoted in an exception-specification shall not denote a pointer or reference to an incomplete type, other than cv void*, const void*, volatile void*, or const volatile void*or a pointer or reference to a class currently being defined. A type cv T, “array of T”, or “function returning T” denoted in an exception-specification is adjusted to type T, “pointer to T”, or “pointer to function returning T”, respectively.
According to 11.4 [class.mem] paragraph 2,
A class is considered a completely-defined object type (6.8 [basic.types]) (or complete type) at the closing } of the class-specifier. Within the class member-specification, the class is regarded as complete within function bodies, default arguments, exception-specifications, and brace-or-equal-initializers for non-static data members (including such things in nested classes). Otherwise it is regarded as incomplete within its own class member-specification.
With the advent of the noexcept operator, treating the class type as complete in exception-specifications is obviously not possible, e.g.,
struct X { // should X be considered as complete here? static void create() noexcept(noexcept(X())); X() noexcept(!noexcept(X::create())); };
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-20 07:54:16 | admin | set | messages: + msg7029 |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2012-11-03 00:00:00 | admin | set | status: dr -> drwp |
2012-09-24 00:00:00 | admin | set | messages: + msg4010 |
2012-02-27 00:00:00 | admin | set | messages: + msg3820 |
2012-02-27 00:00:00 | admin | set | status: ready -> dr |
2011-05-03 00:00:00 | admin | create |