How can I make the compiler create the default constructors in C++? -


is there way make compiler create default constructors if provide explicit constructor of own?

sometimes find them useful, , find waste of time write e.g. copy constructor, large classes.

the copy constructor provided whether define other constructors or not. long don't declare copy constructor, one.

the no-arg constructor provided if declare no constructors. don't have problem unless want no-arg constructor, consider waste of time writing one.

iirc, c++0x has way of delegating construction constructor. can't remember details, allow define no-arg constructor specifying constructor, plus argument(s) pass it. might save typing data member initializers in cases. default no-arg constructor wouldn't have provided initializers either.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -