Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-05-19 07:03:55


Jaakko Järvi writes:
> make_variant_over<Seq>::type
>
> creates a variant type from an MPL Sequence.
>
> Is there an operation that would do the opposite, create an MPL
> sequence from a variant?
>
> I cannot just use the type parameter list as such because the types
> that stand for an empty type are different in both libraries:
> boost::detail::variant::void_ in variant, and something else in MPL.

Shouldn't matter. The variant docs say:

    The bounded types of the variant are exposed via the nested
    typedef types, which is an MPL-compatible Sequence containing the
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    set of types that must be handled by any visitor to the variant.

If that's not the case, it's a bug in the variant code.

-- 
Aleksey Gurtovoy
MetaCommunications Engineering

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk