- Title
- Omitted and required decl-specifiers
- Status
- c++11
- Section
- 11.4 [class.mem]
- Submitter
- Daveed Vandevoorde
Created on 2010-02-25.00:00:00 last changed 152 months ago
Messages
Date: 2011-03-15.00:00:00
[Voted into the WP at the March, 2011 meeting as part of paper N3262.]
Date: 2011-02-15.00:00:00
Proposed resolution (February, 2011) [SUPERSEDED]: Change 11.4 [class.mem] paragraph 7 as follows: Change C.8.6 [diff.dcl], “Banning implicit
int,” as follows:
The decl-specifier-seq
is may be omitted
in constructor, destructor, and conversion function declarations
only; when declaring another kind of member the
decl-specifier-seq shall contain a type-specifier that
is not a cv-qualifier. The member-declarator-list
can be omitted...
In C++ a decl-specifier-seq must contain a
type-specifier, unless it is followed by a declarator for
a constructor, a destructor, or a conversion function. In the
following example...
Date: 2010-02-25.00:00:00
According to 11.4 [class.mem] paragraph 6, This is incorrect, as some decl-specifiers ( explicit ,
virtual , inline , constexpr ) are permitted
in these declarations. Conversely, C.8.6 [diff.dcl],
“Banning implicit int,” says, This is also incorrect for these declarations.
The decl-specifier-seq is omitted in constructor, destructor,
and conversion function declarations only.
In C++ a decl-specifier-seq must contain a type-specifier.
| 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 | messages: + msg3355 |
| 2011-04-10 00:00:00 | admin | set | status: review -> fdis |
| 2011-02-28 00:00:00 | admin | set | messages: + msg3244 |
| 2011-02-28 00:00:00 | admin | set | status: drafting -> review |
| 2010-08-23 00:00:00 | admin | set | status: open -> drafting |
| 2010-02-25 00:00:00 | admin | create | |