Boost logo

Boost :

Subject: Re: [boost] [typeindex v3.0] Peer review begins Mon 21st ends Wed 30th
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-05-02 02:16:39


2014-05-01 21:54 GMT+04:00 Andrey Semashev <andrey.semashev_at_[hidden]>:

> 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<no_cvr_t>,
> > boost::make_signed<no_cvr_t>,
> > boost::mpl::identity<no_cvr_t>
> >
> > >::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<no_cvr_t>,
> is_signed<no_cvr_t>
> >,
> make_signed<no_cvr_t>,
> mpl::identity<no_cvr_t>
> >::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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk