diff options
Diffstat (limited to 'boost/spirit/home/support/attributes.hpp')
-rw-r--r-- | boost/spirit/home/support/attributes.hpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/boost/spirit/home/support/attributes.hpp b/boost/spirit/home/support/attributes.hpp index dd89521404..ceba157fcf 100644 --- a/boost/spirit/home/support/attributes.hpp +++ b/boost/spirit/home/support/attributes.hpp @@ -28,7 +28,6 @@ #include <boost/fusion/include/for_each.hpp> #include <boost/fusion/include/is_view.hpp> #include <boost/fusion/include/mpl.hpp> -#include <boost/foreach.hpp> #include <boost/utility/value_init.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/type_traits/is_convertible.hpp> @@ -279,11 +278,6 @@ namespace boost { namespace spirit { namespace traits : mpl::false_ {}; - template <typename T, typename Domain> - struct not_is_variant<boost::optional<T>, Domain> - : not_is_variant<T, Domain> - {}; - // we treat every type as if it where the variant (as this meta function is // invoked for variant types only) template <typename T> @@ -296,6 +290,11 @@ namespace boost { namespace spirit { namespace traits : variant_type<T> {}; + template <typename T, typename Domain> + struct not_is_variant_or_variant_in_optional + : not_is_variant<typename variant_type<T>::type, Domain> + {}; + /////////////////////////////////////////////////////////////////////////// // The compute_compatible_component_variant /////////////////////////////////////////////////////////////////////////// @@ -339,7 +338,7 @@ namespace boost { namespace spirit { namespace traits template <typename Variant, typename Expected> struct compute_compatible_component_variant<Variant, Expected, mpl::false_ - , typename enable_if<detail::has_types<Variant> >::type> + , typename enable_if<detail::has_types<typename variant_type<Variant>::type> >::type> { typedef typename traits::variant_type<Variant>::type variant_type; typedef typename variant_type::types types; @@ -372,7 +371,7 @@ namespace boost { namespace spirit { namespace traits template <typename Expected, typename Attribute, typename Domain> struct compute_compatible_component : compute_compatible_component_variant<Attribute, Expected - , typename spirit::traits::not_is_variant<Attribute, Domain>::type> {}; + , typename not_is_variant_or_variant_in_optional<Attribute, Domain>::type> {}; template <typename Expected, typename Domain> struct compute_compatible_component<Expected, unused_type, Domain> |