Is there any difference between a default user-defined constructor
class Simple
{
public:
Simple() {}
};
and a user-defined constructor that takes multiple arguments but has defaults for each of these
class WithDefaults
{
public:
WithDefaults(int i = 1) {}
};
other than that WithDefaults
can also be constructed with an explicit value for i
?
Specifically, I am wondering, as far as the language is concerned, if these two constructors play the exact same roll of default constructor for both, or if there are subtle differences between the properties of the classes?
In other words, is a constructor which has default values for all of its arguments a default constructor in every way?