j
k
j a
j l
Hi, This is the simplest possible repro I could get: #include class A {}; class B : private A {}; typedef boost::variant variant_t; int main() { B b; variant_t v (b); } This used to work with Boost 1.59.0 but fails with 1.64.0 Using wandbox I've found that: - it started failing in 1.62.0 - clang does not have this problem - newer and older versions of gcc do have the same problem The error is miles long. I think the important parts are: boost/type_traits/is_convertible.hpp:149:53: error: 'A' is an inaccessible base of 'B' error: no matching function for call to 'boost::variant::variant(B&)' It seems the metaprogramming messes up due to the private inheritance, and decides that the variant is *not* constructible from B Workarounds are very welcome! Switching to C++14 is not an option (yet). Regards
Attachments:
Back to the thread
Back to the list