it’s well knows that compiler implicitly creates an constructor but
if we have a code like this:
class A
{
public:
A(int = 0) {}
};
this constructor is default one and conversion operator in same time.
Question:
will compiler generate “empty” default constructor A() {} anyway as well?
No. A default constructor is one that has no arguments or arguments with default values.
So, basically, you already defined the default constructor.
Section
12.1.5fromC++03states this:As you can call your constructor without an argument, it is a default one. Ergo, the compiler doesn’t need to declare another.