diff --git a/include/boost/python/detail/wrapper_base.hpp b/include/boost/python/detail/wrapper_base.hpp index 99d23b29..658db5d9 100755 --- a/include/boost/python/detail/wrapper_base.hpp +++ b/include/boost/python/detail/wrapper_base.hpp @@ -28,14 +28,7 @@ namespace detail template inline PyObject* - owner_impl(T const volatile* x, mpl::true_) - { - if (wrapper_base const volatile* w = dynamic_cast(x)) - { - return wrapper_base_::get_owner(*w); - } - return 0; - } + owner_impl(T const volatile* x, mpl::true_); template inline PyObject* @@ -64,6 +57,17 @@ namespace detail namespace wrapper_base_ // ADL disabler { + template + inline PyObject* + owner_impl(T const volatile* x, mpl::true_) + { + if (wrapper_base const volatile* w = dynamic_cast(x)) + { + return wrapper_base_::get_owner(*w); + } + return 0; + } + inline PyObject* get_owner(wrapper_base const volatile& w) { return w.m_self;