j
k
j a
j l
Adam Badura wrote:
typedef boost::variant<derived_1, derived_2> variant_type; void f() { variant_type v; v = derived_1(); assert(boost::get<base>(&v)); // This will fail.
typedef boost::variant<derived_1, derived_2> variant_type;
void f() { variant_type v;
v = derived_1(); assert(boost::get<base>(&v)); // This will fail.
You can get the desired behaviour by applying a visitor.
Back to the thread
Back to the list