Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2005-06-24 04:35:35


"Alexander Nasonov" <alnsn-boost_at_[hidden]> wrote in message
news:loom.20050623T155302-606_at_post.gmane.org...
> Andy Little <andy <at> servocomm.freeserve.co.uk> writes:
>> "Arkadiy Vertleyb" <vertleyb <at> hotmail.com> wrote
>>
>> > FWIW, something like this:
>> >
>> > template<class T>
>> > struct promoted
>> > {
>> > typedef BOOST_TYPEOF_TPL(T()+T()) type;
>> > };
>>
>> But where would you need this ?
>
> To implement int_fast_t?
>
> http://www.boost.org/libs/integer/integer.htm

To check that the result is capable of holding the argument ?

After reading the standard on this I guess that it would be useful to have a
representation of the promotion rules. As you point out the need here.. There
must be other cases too.

Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk