12 Oct
2005
12 Oct
'05
1:15 p.m.
"Karl Meerbergen"
typedef BOOST_TYPEOF_TPL( T1()+T2() ) type;
When I use __typeof__, I get the message: The text "+" is unexpected.
I think it may be confusing a temporary object T1() with a function type -- __typeof__ usually handles both. As a wild guess, you can try to do something like: template<class T> T make(); typedef __typeof__(make<T1>()+make<T2>()) type;
When I do not define BOOST_TYPEOF_NATIVE, all works fine for integral and float and double types.
That means you can handle any custom class (after the registration). So the problem is only related to template registration, which makes it a little easier... Regards, Arkadiy