Reputation: 1027
If I create a default parameter in my ctor then how will the compiler know which ctor to call the default ctor or the ctor with a default parameter.
Upvotes: 0
Views: 68
Reputation: 355059
It won't. If you have the following class:
struct S {
S();
S(int = 0);
};
Then the compiler will report that the following is ambiguous:
S x;
Upvotes: 6