
Arkadiy Vertleyb wrote:
However, when I use the native support, I run into a different problem that can be illustrated by the following code:
template<class T, class U> typeof(T() + U()) sum(const T& t, const U& u) { return t + u; }
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(...) {} Regards, Daniel -- Daniel Frey aixigo AG - financial solutions & technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: daniel.frey@aixigo.de, web: http://www.aixigo.de The hacks that we write today become the bugs of tomorrow.