
29 Jul
2004
29 Jul
'04
1:18 p.m.
Arkadiy Vertleyb wrote:
I am afraid this doesnt help :(
Oops, my fault. But the following works, at least on the 3.3.1 where I tested it 2 minutes ago :) template<class T, class U> struct operator_plus_result { static T t(); static U u(); typedef __typeof__( t() + u() ) type; }; template<class T, class U> typename operator_plus_result<T,U>::type sum(const T& t, const U& u) { return t + u; } int main() { sum(5, 3.14); } 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.