
23 Jun
2005
23 Jun
'05
1:06 a.m.
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
"Alexander Nasonov" <alnsn-boost@yandex.ru> wrote in message news:CGEAJCADLHHFBJBADMJFAEDBCCAA.alnsn-boost@yandex.ru... 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