Some days ago, while reading Standard C++ news I've read the post about Defaulted functions in C++11, in that article is mentioned that the user-defined constructor is less efficient than the one generated by the compiler:
The user-defined default constructor is less efficient than the compiler implicitly defined default constructor.
Continuing the reading, there's an example where an user-defined constructor is marked as default, and then says:
the explicitly defaulted constructor is more efficient than a manually programmed default constructor.
I don't understand these assertions, so I was wondering:
- Why a user-default constructor (or special member function) would be less efficient than the compiler implicitly defined one?
- How is the efficiency improved by explicitly defaulting a constructor (or special member function)?
- What guidelines I must follow to choose to default a constructor (or special member function) and how the efficiency affects this decision?