Boost logo

Boost :

Subject: Re: [boost] [chrono] type_traits/common_type and integer/ratio
From: Vicente Botet Escriba (vicente.botet_at_[hidden])
Date: 2009-12-03 17:00:55

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:


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.


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at