Modify

#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
}

Attachments (0)

Change History (2)

comment:1 Changed 16 months ago by Antony Polukhin

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 Changed 11 months ago by Antony Polukhin

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Antony Polukhin.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.