Boost logo

Boost Users :

Subject: Re: [Boost-users] Regression in Boost.Variant with gcc6.3 in C++03 mode
From: d25fe0be_at_[hidden]
Date: 2017-06-27 18:05:41


> On 28 Jun 2017, at 01:30, d25fe0be--- via Boost-users <boost-users_at_[hidden]> wrote:
>
>
>> On 28 Jun 2017, at 01:27, d25fe0be_at_[hidden] wrote:
>>
>> And I believe this finding gives us an easier workaround: Just defining our own `BOOST_IS_CONVERTIBLE` before including `boost/variant.hpp`, and the compilation error should disappear.
>>
>> ```
>> #include <type_traits>
>> #define BOOST_IS_CONVERTIBLE(T,U) std::is_convertible<T, U>::value
>>
>> #include <boost/variant.hpp>
>> [...]
>> ```
>
> Oh sorry I forgot you're using C++03.
>
> Maybe you could write your own `is_convertible` in C++03 and redirect boost's to there.

Sorry I missed John's reply..

I believe John is right, without C++11 a fully conforming is_convertible seems not to be implementable (I didn't find a way to remove `_m_check` taking the inaccessible base as a parameter from the overload set.), hence 'your own `is_convertible`' seems not to be feasible either.

Thank you John for pointing this out, and sorry for the noise.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net