
21 Dec
2012
21 Dec
'12
1:14 p.m.
Hi, I have found some surprising behaviour with boost type traits using MSVC2012 (v11). I used boost::is_signed<T>::value where T is double and it evaluates to false, but I expected true as double can hold negative numbers. More surprisingly, I found that, for double, is_unsigned is not the inverse of is_signed, and hence this static assert produces a compiler error. BOOST_STATIC_ASSERT(boost::is_unsigned<double>::value == !boost::is_signed<double>::value); I am missing a rationale for this, or it is a bug? Thanks -- Craig -- View this message in context: http://boost.2283326.n4.nabble.com/Is-double-a-signed-type-boost-type-traits... Sent from the Boost - Users mailing list archive at Nabble.com.