Ticket #1654: recursive_variant.hpp.patch
File recursive_variant.hpp.patch, 1.1 KB (added by , 15 years ago) |
---|
-
recursive_variant.hpp
22 22 #include "boost/mpl/aux_/lambda_arity_param.hpp" 23 23 24 24 #if !defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT) 25 # include "boost/mpl/equal.hpp" 25 26 # include "boost/mpl/eval_if.hpp" 26 27 # include "boost/mpl/identity.hpp" 28 # include "boost/mpl/if.hpp" 27 29 # include "boost/mpl/protect.hpp" 28 30 # include "boost/mpl/transform.hpp" 31 # include "boost/type_traits/is_same.hpp" 29 32 #else 30 33 # include "boost/preprocessor/cat.hpp" 31 34 # include "boost/preprocessor/repeat.hpp" … … 98 101 99 102 public: // metafunction result 100 103 101 typedef ::boost::variant< types > type; 104 typedef typename mpl::if_< 105 mpl::equal<initial_types, types, ::boost::is_same<mpl::_1, mpl::_2> > 106 , ::boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) > 107 , ::boost::variant< over_sequence<types> > 108 >::type type; 102 109 103 110 #else // defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT) 104 111