Why is it possible to compile the class definition?
-> Because compiler do not check for ambiguous calls during function declaration.
Why is there no error?
-> Same, compiler considers these two generators to be different.
Why is there not at least a warning? There is not even anything with -Wall
.
-> Default arguments are not taken into account when determining function overloading.