diff options
Diffstat (limited to 'boost/type_erasure/require_match.hpp')
-rw-r--r-- | boost/type_erasure/require_match.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/boost/type_erasure/require_match.hpp b/boost/type_erasure/require_match.hpp index eada5eb7e6..8da4c6b827 100644 --- a/boost/type_erasure/require_match.hpp +++ b/boost/type_erasure/require_match.hpp @@ -32,8 +32,10 @@ namespace boost { namespace type_erasure { +#ifndef BOOST_TYPE_ERASURE_DOXYGEN template<class Concept> class binding; +#endif #ifdef BOOST_TYPE_ERASURE_DOXYGEN @@ -114,6 +116,8 @@ void require_match( ::boost::type_erasure::detail::require_match_impl(cond, table, op, ::std::forward<U>(arg)...); } +#ifndef BOOST_TYPE_ERASURE_USE_MP11 + template<class Op, class... U> void require_match( const Op& op, @@ -129,6 +133,25 @@ void require_match( #else +template<class Op, class... U> +void require_match( + const Op& op, + U&&... arg) +{ + ::boost::type_erasure::is_relaxed< + ::boost::type_erasure::detail::extract_concept_t< + ::boost::type_erasure::detail::get_args_t< + typename ::boost::type_erasure::detail::get_signature<Op>::type + >, + ::boost::mp11::mp_list< ::boost::remove_reference_t<U>...> > + > cond; + ::boost::type_erasure::detail::require_match_impl(cond, op, ::std::forward<U>(arg)...); +} + +#endif + +#else + #define BOOST_PP_FILENAME_1 <boost/type_erasure/require_match.hpp> #define BOOST_PP_ITERATION_LIMITS (0, BOOST_TYPE_ERASURE_MAX_ARITY) #include BOOST_PP_ITERATE() |