You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The decl-specifier-seq 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-specifierthat is not a cv-qualifier. The member-declarator-list can be omitted only after a class-specifier or an enum-specifier or in a friend declaration. A pure-specifier shall be used only in the declaration of a virtual function that is not a friend declaration.
The highlighted statement above is obviously wrong. The struct below is a perfectly valid class:
struct A{
const int i = 1;
};
The text was updated successfully, but these errors were encountered:
[class.mem.general]/12:
The highlighted statement above is obviously wrong. The
struct
below is a perfectly valid class:The text was updated successfully, but these errors were encountered: