
29 Jul
2004
29 Jul
'04
10:49 a.m.
"Daniel Frey" <daniel.frey@aixigo.de> wrote
That's a common problem. You need to declare a function to return the temporaries you need, this usually helps:
template< typename T > T provide();
template< typename T, typename U > typeof( provide<T>() + provide<U>() ) sum(...) {}
I am afraid this doesnt help :( The following code produces the same "internal compiler error": template<class T> T make(); template<class T, class U> typeof(make<T>() + make<U>()) sum(const T& t, const U& u) { return t + u; } main() { sum(5, 3.14); return 0; } Regards, Arkadiy