- Please explain how and why the conversion operator of the type used as an argument for
t.set
in therequires
expression is evaluated during the instantiation of the concept.
Like normal. The expression needs to be check to see if its valid so it goes through the normal overload resolution steps and it converts s
to a type that works.
- Please explain why the overload set of
Bazzz
yields a build failure for the concept
You have an ambiguous conversion as both void set(char *);
and void set(std::string);
are viable since s
can be converted to a char*
or a std::string
. Non of these conversions is better than the other so you get an error.