
John Maddock wrote:
Typeof works, but I'm wondering if it's overkill and that perhaps common_type is much more lightweight and appropriate. promote_args doesn't do quite what I need here, but thank you for pointing that facility out to me.
The only version of common_type I've seen uses typeof internally, so doesn't actually differ from your existing implementation - other than having a cute interface.
Just my 2c, John.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Hi, IMO the typeof of X() * X() + Y() * Y() use the declarations of the operators * and +. These operator could need common_type if the operators * and + are able to combine different types. Thus the uses of typeof and comon_type are orthogonal. Best, Vicente -- View this message in context: http://old.nabble.com/-chrono--type_traits-common_type-and-integer-ratio-tp2... Sent from the Boost - Dev mailing list archive at Nabble.com.