diff options
Diffstat (limited to 'boost/spirit/home/qi/detail/alternative_function.hpp')
-rw-r--r-- | boost/spirit/home/qi/detail/alternative_function.hpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/boost/spirit/home/qi/detail/alternative_function.hpp b/boost/spirit/home/qi/detail/alternative_function.hpp index 4c0113b5a7..480a11fd6d 100644 --- a/boost/spirit/home/qi/detail/alternative_function.hpp +++ b/boost/spirit/home/qi/detail/alternative_function.hpp @@ -20,22 +20,22 @@ namespace boost { namespace spirit { namespace qi { namespace detail { - template <typename Variant, typename Expected> + template <typename Variant, typename T> struct find_substitute { - // Get the type from the variant that can be a substitute for Expected. - // If none is found, just return Expected + // Get the type from the Variant that can be a substitute for T. + // If none is found, just return T typedef Variant variant_type; typedef typename variant_type::types types; typedef typename mpl::end<types>::type end; - typedef typename mpl::find<types, Expected>::type iter_1; + typedef typename mpl::find<types, T>::type iter_1; typedef typename mpl::eval_if< is_same<iter_1, end>, - mpl::find_if<types, traits::is_substitute<mpl::_1, Expected> >, + mpl::find_if<types, traits::is_substitute<T, mpl::_1> >, mpl::identity<iter_1> >::type iter; @@ -43,12 +43,16 @@ namespace boost { namespace spirit { namespace qi { namespace detail typedef typename mpl::eval_if< is_same<iter, end>, - mpl::identity<Expected>, + mpl::identity<T>, mpl::deref<iter> >::type type; }; +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif template <typename Iterator, typename Context, typename Skipper, typename Attribute> struct alternative_function @@ -173,9 +177,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail Context& context; Skipper const& skipper; Attribute& attr; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(alternative_function& operator= (alternative_function const&)) }; template <typename Iterator, typename Context, typename Skipper> @@ -200,10 +201,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail Iterator const& last; Context& context; Skipper const& skipper; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(alternative_function& operator= (alternative_function const&)) }; +#ifdef _MSC_VER +# pragma warning(pop) +#endif }}}} |