http://eel.is/c++draft/class.mem#20
In addition, if class T has a user-declared constructor, every non-static data member of class T shall have a name different from T.
i.e
In addition, if class T has a user-declared constructor, every non-static data member of class T shall have a name different from T.
struct foo {
~foo();
int foo; // OK
};
struct bar {
bar();
int bar; // Error
};
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.