Created on 2008-02-12.00:00:00 last changed 130 months ago
[Voted into WP at August, 2010 meeting.]
Proposed resolution (March, 2010):
Change 6.2 [basic.def] paragraphs 1-2 as follows:
A declaration (9.1 [dcl.pre]) may introduce
sone or more names into a translation unit or redeclaresnames introduced by previous declarations.AIf so, the declaration specifies the interpretation and attributes of these names. A declaration may also have effects including
a static assertion (9.1 [dcl.pre]),
controlling template instantiation (13.9.3 [temp.explicit],
use of attributes (9.1 [dcl.pre], or
nothing (in the case of an empty-declaration).
A declaration is a definition unless it declares a function without specifying the function's body (9.5 [dcl.fct.def]), it contains the extern specifier (9.2.2 [dcl.stc]) or a linkage-specification25 (9.11 [dcl.link]) and neither an initializer nor a function-body, it declares a static data member in a class definition (11.4.9 [class.static]), it is a class name declaration (11.3 [class.name]), it is an opaque-enum-declaration (9.7.1 [dcl.enum]), or it is a typedef declaration (9.2.4 [dcl.typedef]), a using-declaration (9.9 [namespace.udecl]), a static_assert-declaration (9.1 [dcl.pre]), an attribute-declaration (9.1 [dcl.pre]), an empty-declaration (9.1 [dcl.pre]), or a using-directive (9.8.4 [namespace.udir]). [Example:...
6.2 [basic.def] makes statements about declarations that do not appear to apply to static_assert-declarations. For example, paragraph 1 says,
A declaration (9.1 [dcl.pre]) introduces names into a translation unit or redeclares names introduced by previous declarations. A declaration specifies the interpretation and attributes of these names.
What name is being declared or described by a static_assert-declaration?
Also, paragraph 2 lists the kinds of declarations that are not definitions, and a static_assert-declaration is not among them. Is it intentional that static_assert-declarations are definitions?
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | status: wp -> fdis |
2010-11-29 00:00:00 | admin | set | status: dr -> wp |
2010-08-23 00:00:00 | admin | set | messages: + msg2904 |
2010-08-23 00:00:00 | admin | set | status: ready -> dr |
2010-03-29 00:00:00 | admin | set | status: review -> ready |
2010-02-16 00:00:00 | admin | set | messages: + msg2520 |
2010-02-16 00:00:00 | admin | set | status: drafting -> review |
2008-06-29 00:00:00 | admin | set | status: open -> drafting |
2008-02-12 00:00:00 | admin | create |