Opened 6 years ago

Closed 6 years ago

#12155 closed Bugs (fixed)

variant does not support a class derived from variant as one of its types

Reported by: Tobias Reh <treh@…> Owned by: Antony Polukhin
Milestone: Boost 1.62.0 Component: variant
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc:

Description

variant does not support a class derived from variant as one of its types. See the following example code:

struct A {};
struct B {};
struct C {};

struct AB : boost::variant<A, B> {};

using AB_C = boost::variant<AB, C>;

void foo() {
    AB ab;
    AB_C ab_c{ab}; // member function convert_construct is abiguous
}

Change History (2)

comment:1 by Antony Polukhin, 6 years ago

Milestone: To Be DeterminedBoost 1.62.0
Owner: changed from ebf to Antony Polukhin
Status: newassigned

Fixed in d23cdd35 develop, will be merged to master branch as soon as the tests will cycle.

comment:2 by Antony Polukhin, 6 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.