2014-05-01 21:54 GMT+04:00 Andrey Semashev
On Thursday 01 May 2014 21:02:14 Antony Polukhin wrote:
<...>
How about a following workaround for those compilers:
typename boost::mpl::if_< boost::is_signed
, boost::make_signed , boost::mpl::identity ::type::type res_t;
And then use typeid(res_t)? Yes, that'd be ok, but it's better to do it like this:
typename mpl::eval_if< mpl::and_< is_integral
, is_signed >, make_signed , mpl::identity ::type res_t;
At least MSVC 7.1 has problems applying is_signed to non-integral types, not sure about those EDG compilers, but it's better to be on the safe side.
This must be fixed in Boost.TypeTraits. It's better to fix it once instead of puttung workarounds all around the Boost. -- Best regards, Antony Polukhin