How can I disambiguate a constructor call with parameter from a named instance creation?
In this example, the last line fails to compile. I understand why, but I wonder how I can make the compiler understand that I want to call Class(const int &)
to create an unnamed instance, instead of trying to call the undefined default constructor and creating an instance named i
: