diff options
Diffstat (limited to 'boost/spirit/home/x3/operator/detail/alternative.hpp')
-rw-r--r-- | boost/spirit/home/x3/operator/detail/alternative.hpp | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/boost/spirit/home/x3/operator/detail/alternative.hpp b/boost/spirit/home/x3/operator/detail/alternative.hpp index 54f86e00df..9fbc4f4dc4 100644 --- a/boost/spirit/home/x3/operator/detail/alternative.hpp +++ b/boost/spirit/home/x3/operator/detail/alternative.hpp @@ -7,10 +7,6 @@ #if !defined(SPIRIT_ALTERNATIVE_DETAIL_JAN_07_2013_1245PM) #define SPIRIT_ALTERNATIVE_DETAIL_JAN_07_2013_1245PM -#if defined(_MSC_VER) -#pragma once -#endif - #include <boost/spirit/home/x3/support/traits/attribute_of.hpp> #include <boost/spirit/home/x3/support/traits/is_variant.hpp> #include <boost/spirit/home/x3/support/traits/tuple_traits.hpp> @@ -23,9 +19,9 @@ #include <boost/mpl/copy_if.hpp> #include <boost/mpl/not.hpp> #include <boost/mpl/if.hpp> +#include <boost/mpl/insert_range.hpp> #include <boost/mpl/eval_if.hpp> #include <boost/mpl/vector.hpp> -#include <boost/mpl/joint_view.hpp> #include <boost/fusion/include/front.hpp> @@ -182,34 +178,21 @@ namespace boost { namespace spirit { namespace x3 { namespace detail template <typename LL, typename LR, typename R, typename C> struct get_alternative_types<alternative<LL, LR>, R, C> - { - typedef typename - mpl::push_back< - typename get_alternative_types<LL, LR, C>::type - , typename traits::attribute_of<R, C>::type - >::type - type; - }; + : mpl::push_back< typename get_alternative_types<LL, LR, C>::type + , typename traits::attribute_of<R, C>::type> {}; template <typename L, typename RL, typename RR, typename C> struct get_alternative_types<L, alternative<RL, RR>, C> - { - typedef typename - mpl::push_front< - typename get_alternative_types<RL, RR, C>::type - , typename traits::attribute_of<L, C>::type - >::type - type; - }; + : mpl::push_front< typename get_alternative_types<RL, RR, C>::type + , typename traits::attribute_of<L, C>::type> {}; template <typename LL, typename LR, typename RL, typename RR, typename C> struct get_alternative_types<alternative<LL, LR>, alternative<RL, RR>, C> { - typedef - mpl::joint_view< - typename get_alternative_types<LL, LR, C>::type - , typename get_alternative_types<RL, RR, C>::type - > + typedef typename get_alternative_types<LL, LR, C>::type left; + typedef typename get_alternative_types<RL, RR, C>::type right; + typedef typename + mpl::insert_range<left, typename mpl::end<left>::type, right>::type type; }; |