From ead8d0aba50ff5e697a97a68a2c2eb58819dacdc Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 25 Sep 2013 07:55:31 +0000 Subject: [PATCH] Python: Simplify object and BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS macro. The macro no longer needs an implementation for old MSVC. [SVN r85881] --- include/boost/python/object_core.hpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/include/boost/python/object_core.hpp b/include/boost/python/object_core.hpp index 9c9dc10b..5c6eb7ca 100644 --- a/include/boost/python/object_core.hpp +++ b/include/boost/python/object_core.hpp @@ -348,7 +348,7 @@ namespace api // Macros for forwarding constructors in classes derived from // object. Derived classes will usually want these as an // implementation detail -# define BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS_(derived, base) \ +# define BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(derived, base) \ inline explicit derived(::boost::python::detail::borrowed_reference p) \ : base(p) {} \ inline explicit derived(::boost::python::detail::new_reference p) \ @@ -356,23 +356,6 @@ namespace api inline explicit derived(::boost::python::detail::new_non_null_reference p) \ : base(p) {} -# if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 -# define BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS_ -# else - // MSVC6 has a bug which causes an explicit template constructor to - // be preferred over an appropriate implicit conversion operator - // declared on the argument type. Normally, that would cause a - // runtime failure when using extract to extract a type with a - // templated constructor. This additional constructor will turn that - // runtime failure into an ambiguity error at compile-time due to - // the lack of partial ordering, or at least a link-time error if no - // generalized template constructor is declared. -# define BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(derived, base) \ - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS_(derived, base) \ - template \ - explicit derived(extract const&); -# endif - // // object_initializer -- get the handle to construct the object with, // based on whether T is a proxy or derived from object