diff options
Diffstat (limited to 'boost/type_erasure/detail/adapt_to_vtable.hpp')
-rw-r--r-- | boost/type_erasure/detail/adapt_to_vtable.hpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/boost/type_erasure/detail/adapt_to_vtable.hpp b/boost/type_erasure/detail/adapt_to_vtable.hpp index e58ddc8599..f842dc3985 100644 --- a/boost/type_erasure/detail/adapt_to_vtable.hpp +++ b/boost/type_erasure/detail/adapt_to_vtable.hpp @@ -39,24 +39,9 @@ namespace detail { template<class T, class Out> struct get_placeholders; -template<class T, class Bindings> -struct rebind_placeholders; - -template<class T, class Bindings> -struct rebind_placeholders_in_argument; - template<class PrimitiveConcept, class Sig> struct vtable_adapter; -template<class PrimitiveConcept, class Sig, class Bindings> -struct rebind_placeholders<vtable_adapter<PrimitiveConcept, Sig>, Bindings> -{ - typedef vtable_adapter< - typename rebind_placeholders<PrimitiveConcept, Bindings>::type, - typename rebind_placeholders_in_argument<Sig, Bindings>::type - > type; -}; - template<class PrimitiveConcept, class Sig, class Out> struct get_placeholders<vtable_adapter<PrimitiveConcept, Sig>, Out> { @@ -308,11 +293,13 @@ struct vtable_adapter<PrimitiveConcept, R(BOOST_PP_ENUM_PARAMS(N, T))> typedef R (*type)(BOOST_PP_ENUM_PARAMS(N, T)); static R value(BOOST_PP_ENUM_BINARY_PARAMS(N, T, arg)) { +#if N > 0 typedef typename ::boost::function_traits< typename ::boost::type_erasure::detail::get_signature< PrimitiveConcept >::type > traits; +#endif return PrimitiveConcept::apply( BOOST_PP_ENUM(N, BOOST_TYPE_ERASURE_EXTRACT, ~)); } @@ -325,11 +312,13 @@ struct vtable_adapter<PrimitiveConcept, ::boost::type_erasure::detail::storage(B typedef ::boost::type_erasure::detail::storage (*type)(BOOST_PP_ENUM_PARAMS(N, T)); static ::boost::type_erasure::detail::storage value(BOOST_PP_ENUM_BINARY_PARAMS(N, T, arg)) { +#if N > 0 typedef typename ::boost::function_traits< typename ::boost::type_erasure::detail::get_signature< PrimitiveConcept >::type > traits; +#endif return ::boost::type_erasure::detail::storage( PrimitiveConcept::apply( BOOST_PP_ENUM(N, BOOST_TYPE_ERASURE_EXTRACT, ~))); |