summaryrefslogtreecommitdiff
path: root/boost/type_erasure/call.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/type_erasure/call.hpp')
-rw-r--r--boost/type_erasure/call.hpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/boost/type_erasure/call.hpp b/boost/type_erasure/call.hpp
index 2a8ee2c580..8234862cae 100644
--- a/boost/type_erasure/call.hpp
+++ b/boost/type_erasure/call.hpp
@@ -42,12 +42,16 @@
namespace boost {
namespace type_erasure {
+#ifndef BOOST_TYPE_ERASURE_DOXYGEN
+
template<class Concept, class Placeholder>
class any;
template<class Concept>
class binding;
+#endif
+
namespace detail {
template<class T>
@@ -293,6 +297,8 @@ namespace detail {
template<class... T>
void ignore(const T&...) {}
+#ifndef BOOST_TYPE_ERASURE_USE_MP11
+
template<class R, class... T, class... U>
const ::boost::type_erasure::binding<
typename ::boost::type_erasure::detail::extract_concept<void(T...), U...>::type>*
@@ -312,6 +318,29 @@ extract_table(R(*)(T...), const U&... arg)
return result;
}
+#else
+
+template<class R, class... T, class... U>
+const ::boost::type_erasure::binding<
+ ::boost::type_erasure::detail::extract_concept_t< ::boost::mp11::mp_list<T...>, ::boost::mp11::mp_list<U...> > >*
+extract_table(R(*)(T...), const U&... arg)
+{
+ const ::boost::type_erasure::binding<
+ ::boost::type_erasure::detail::extract_concept_t<
+ ::boost::mp11::mp_list<T...>, ::boost::mp11::mp_list<U...> > >* result = 0;
+
+ // the order that we run maybe_get_table in doesn't matter
+ ignore(::boost::type_erasure::detail::maybe_get_table(
+ arg,
+ result,
+ ::boost::type_erasure::detail::is_placeholder_arg<T>())...);
+
+ BOOST_ASSERT(result != 0);
+ return result;
+}
+
+#endif
+
template<class Sig, class Args, class Concept, bool ReturnsAny>
struct call_impl_dispatch;
@@ -354,6 +383,8 @@ struct call_impl<R(T...), void(U...), Concept, true> :
{
};
+#ifndef BOOST_TYPE_ERASURE_USE_MP11
+
template<class R, class... T, class... U>
struct call_impl<R(T...), void(U...), void, true> :
::boost::type_erasure::detail::call_impl_dispatch<
@@ -368,6 +399,24 @@ struct call_impl<R(T...), void(U...), void, true> :
{
};
+#else
+
+template<class R, class... T, class... U>
+struct call_impl<R(T...), void(U...), void, true> :
+ ::boost::type_erasure::detail::call_impl_dispatch<
+ R(T...),
+ void(U...),
+ ::boost::type_erasure::detail::extract_concept_t<
+ ::boost::mp11::mp_list<T...>,
+ ::boost::mp11::mp_list< ::boost::remove_reference_t<U>...>
+ >,
+ ::boost::type_erasure::detail::is_placeholder_arg<R>::value
+ >
+{
+};
+
+#endif
+
}
template<