This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
1308. Completeness of class type within an exception-specificationSection: 11.4 [class.mem] Status: CD3 Submitter: Nikolay Ivchenkov Date: 2011-05-03[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
According to 11.4 [class.mem] paragraph 2,
A class is considered a completely-defined object type (6.9 [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())); };
Proposed resolution (August, 2011):
Change 11.4 [class.mem] paragraph 2 as follows:
A class is considered a completely-defined object type (6.9 [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 cvvoid* , 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.
Note:
This change was subsequently removed by the resolution of issue 1330.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4