In C ++ 03, and in this particular case, it makes no sense to highlight two explicit parameter constructors. But this may make sense here:
explicit X(int i, int j=42);
So, marking two parameter constructors with explicit should not be an error.
In C ++ 11, this use of explicit is not allowed for you:
X x = {1,2};
juanchopanza
source share