diff --git a/include/boost/python/detail/value_is_xxx.hpp b/include/boost/python/detail/value_is_xxx.hpp index 2b125649..fbb9defd 100644 --- a/include/boost/python/detail/value_is_xxx.hpp +++ b/include/boost/python/detail/value_is_xxx.hpp @@ -9,35 +9,6 @@ # include # include -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# include -# include - -# define BOOST_PYTHON_VALUE_IS_XXX_DEF(name, qualified_name, nargs) \ -template \ -struct value_is_##name \ -{ \ - typedef char yes; \ - typedef char (&no)[2]; \ - \ - static typename add_reference::type dummy; \ - \ - template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class U) > \ - static yes test( \ - qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, U) > const&, int \ - ); \ - \ - template \ - static no test(U&, ...); \ - \ - BOOST_STATIC_CONSTANT( \ - bool, value \ - = (sizeof(test(dummy, 0)) == sizeof(yes))); \ - \ - typedef mpl::bool_ type; \ -}; - -# else # include # include @@ -57,6 +28,5 @@ struct value_is_##name \ \ }; -# endif #endif // VALUE_IS_XXX_DWA2003224_HPP diff --git a/include/boost/python/init.hpp b/include/boost/python/init.hpp index 6598fd35..b82ab01e 100644 --- a/include/boost/python/init.hpp +++ b/include/boost/python/init.hpp @@ -76,27 +76,6 @@ namespace detail // // This metaprogram checks if T is an optional // -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - - template - struct is_optional { - - private: - - template - static boost::type_traits::yes_type f(optional); - static boost::type_traits::no_type f(...); - static T t(); - - public: - - BOOST_STATIC_CONSTANT( - bool, value = - sizeof(f(t())) == sizeof(::boost::type_traits::yes_type)); - typedef mpl::bool_ type; - }; - -#else template struct is_optional @@ -108,7 +87,6 @@ namespace detail : mpl::true_ {}; -#endif template struct define_class_init_helper; diff --git a/include/boost/python/object/iterator.hpp b/include/boost/python/object/iterator.hpp index ab748fe8..db522471 100644 --- a/include/boost/python/object/iterator.hpp +++ b/include/boost/python/object/iterator.hpp @@ -71,35 +71,7 @@ struct iterator_range # endif }; -# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // for compilers which can't deduce the value_type of pointers, we - // have a special implementation of next. This takes advantage of - // the fact that T* results are treated like T& results by - // Boost.Python's function wrappers. - struct next_ptr - { - typedef Iterator result_type; - - result_type - operator()(iterator_range& self) - { - if (self.m_start == self.m_finish) - stop_iteration_error(); - return self.m_start++; - } - }; - - typedef mpl::if_< - is_same< - boost::detail::please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee - , typename traits_t::value_type - > - , next_ptr - , next - >::type next_fn; -# else typedef next next_fn; -# endif object m_sequence; // Keeps the sequence alive while iterating. Iterator m_start; diff --git a/include/boost/python/object_core.hpp b/include/boost/python/object_core.hpp index a730d3d8..61857796 100644 --- a/include/boost/python/object_core.hpp +++ b/include/boost/python/object_core.hpp @@ -206,26 +206,6 @@ namespace api PyObject* m_ptr; }; -# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct is_derived_impl - { - static T x; - template - static X* to_pointer(X const&); - - static char test(U const*); - typedef char (&no)[2]; - static no test(...); - - BOOST_STATIC_CONSTANT(bool, value = sizeof(test(to_pointer(x))) == 1); - }; - - template - struct is_derived - : mpl::bool_::value> - {}; -# else template struct is_derived : is_convertible< @@ -233,7 +213,6 @@ namespace api , U const* > {}; -# endif template typename objects::unforward_cref::type do_unforward_cref(T const& x)