Index: recursive_variant.hpp =================================================================== --- recursive_variant.hpp (revision 43416) +++ recursive_variant.hpp (working copy) @@ -22,10 +22,13 @@ #include "boost/mpl/aux_/lambda_arity_param.hpp" #if !defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT) +# include "boost/mpl/equal.hpp" # include "boost/mpl/eval_if.hpp" # include "boost/mpl/identity.hpp" +# include "boost/mpl/if.hpp" # include "boost/mpl/protect.hpp" # include "boost/mpl/transform.hpp" +# include "boost/type_traits/is_same.hpp" #else # include "boost/preprocessor/cat.hpp" # include "boost/preprocessor/repeat.hpp" @@ -98,7 +101,11 @@ public: // metafunction result - typedef ::boost::variant< types > type; + typedef typename mpl::if_< + mpl::equal > + , ::boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) > + , ::boost::variant< over_sequence > + >::type type; #else // defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT)