Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C.20: define a ctor to not imply we're forbidding all ctors
closes #2212
- Loading branch information
dd57964
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this solution is confusing, as the term default operation is not well defined.
Is a default constructor a default operation?
I think that C.20 should have more details. It should show the inverse of C.21:
If there's no need to define any copy, move, or destructor function, then don't.
This explicitly leaves out constructors!
In the example I would like to see a constructor with a parameter:
Named_map(string mapName) : name(mapName) {}
dd57964
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, two constructors? (the example demonstrates the use of default and copy, so I gave it a default)
I think I agree about that "default operations" should be copy/move/dtor
dd57964
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edited again (with 1 ctor, and explanded 'default ops')