Arkadiy Vertleyb wrote:
"Karl Meerbergen"
wrote When BOOST_TYPEOF_NATIVE is defined, the following code does not compile, and this is precisely what I want to do.
template
struct my_struct { typedef BOOST_TYPEOF_TPL( T1()+T2() ) type; }; What is the error message? Do you have the same problem if you use __typeof__ directly?
typeofsample.cpp", line 5.3: 1540-0132 (S) The expression must be a constant expression. Line 5 is: typedef BOOST_TYPEOF_TPL( T1()+T2() ) type; When I use __typeof__, I get the message: The text "+" is unexpected. When I do not define BOOST_TYPEOF_NATIVE, all works fine for integral and float and double types. It is a good basis to start for me, but I would have hoped to be able to get further. Thanks for your help. Karl