Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-06-22 20:06:04


"Alexander Nasonov" <alnsn-boost_at_[hidden]> wrote in message
news:CGEAJCADLHHFBJBADMJFAEDBCCAA.alnsn-boost_at_yandex.ru...
> > FWIW, something like this:
> > template<class T>
> > struct promoted
> > {
> > typedef BOOST_TYPEOF_TPL(T()+T()) type;
> > };
>
> Unary plus is slightly shorter then binary plus: BOOST_TYPEOF_TPL(+T())
> :)
>
> > Would work on any integral type without registration.
> > Enums can't be the result of a promotion, so no need to worry about
their
> > registration.
>
> My code is very lightweight typeof simulation with only four types:
> 1 - int
> 2 - unsigned int
> 3 - long
> 4 - unsigned long

One thing I can say for sure -- this will be much easier to port :)

Regards,
Arkadiy


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