On 28/11/2012, at 3:07 PM, James Dennett wrote: > > On the bright side, decltype/declval make it a one-liner. > > #include <utility> // for declval > > template <typename LHS, typename RHS> > using type_of_sum = decltype(::std::declval<LHS>() + ::std::declval<RHS>()); > > type_of_sum<long long, unsigned long> s = 1LL + 7UL;
Ah, thanks for that! Hadn't thought of it! -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language