Boost logo

Boost :

From: Guillaume Melquiond (guillaume.melquiond_at_[hidden])
Date: 2007-03-30 11:03:32

Quoting Daniel Walker:

> Is this a substitution failure?

There is no substitution in your code, so a substitution failure cannot
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()

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,


Boost list run by bdawes at, gregod at, cpdaniel at, john at