
30 Mar
2007
30 Mar
'07
3:03 p.m.
Quoting Daniel Walker:
Is this a substitution failure?
There is no substitution in your code, so a substitution failure cannot happen. Here is a real substitution, that does fail properly: template<class T> struct foo { template<class U> struct bar; }; template<class T, class U> void f(T,U) {} template<class T, class U> void f(T, typename foo<T>::template bar<T,U>) {} int main() { f(0,0); } I am not sure if it will help you though, as I don't know if you can afford to protect the class you want to test (bar) into a dummy template (foo), so that a substitution happens. No template typedef... Best regards, Guillaume