
18 Oct
2007
18 Oct
'07
12:50 a.m.
Marco Costalba wrote:
And it doesn't work with implicit conversions: what if you pass a const char* "test" as argument for a std::string ? It would be erroneusly rejected ?
Use the is_convertible type_traits to know whether your type is convertible to the requested argument type.
Moreover I'm not sure it is valid for the general case of ill formed template expressions due to run-time variables values.
In C++, you can't call a type-specific operator or member if you don't know the type of the variable at compile-time. So I really don't understand what you mean.