diff options
Diffstat (limited to 'boost/type_erasure/detail/null.hpp')
-rw-r--r-- | boost/type_erasure/detail/null.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/boost/type_erasure/detail/null.hpp b/boost/type_erasure/detail/null.hpp index ef977f4254..e0c3173704 100644 --- a/boost/type_erasure/detail/null.hpp +++ b/boost/type_erasure/detail/null.hpp @@ -13,6 +13,7 @@ #ifndef BOOST_TYPE_ERASURE_DETAIL_NULL_HPP_INCLUDED #define BOOST_TYPE_ERASURE_DETAIL_NULL_HPP_INCLUDED +#include <boost/config.hpp> #include <boost/throw_exception.hpp> #include <boost/type_traits/remove_pointer.hpp> #include <boost/preprocessor/iteration/iterate.hpp> @@ -34,10 +35,23 @@ struct get_null_vtable_entry { typename ::boost::remove_pointer<typename Concept::type>::type> type; }; +#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES + #define BOOST_PP_FILENAME_1 <boost/type_erasure/detail/null.hpp> #define BOOST_PP_ITERATION_LIMITS (0, BOOST_TYPE_ERASURE_MAX_ARITY) #include BOOST_PP_ITERATE() +#else + +template<class R, class... T> +struct null_throw<R(T...)> { + static R value(T...) { + BOOST_THROW_EXCEPTION(::boost::type_erasure::bad_function_call()); + } +}; + +#endif + } } } |