id summary reporter owner description type status milestone component version severity resolution keywords cc 11337 implicit_cast in python/include/boost/python/opaque_pointer_converter.hpp should be boost:: qualified Paul Pluzhnikov Ralf W. Grosse-Kunstleve "The following test case fails to compile: {{{ template inline T implicit_cast (void *) { // In reality there is an actual ::implicit_cast implementation in a header file return 0; } #include int main() { return 0; } }}} The error is: {{{ In file included from ./python/include/boost/python.hpp:49:0, from /tmp/implicit_cast.cc:6: ./python/include/boost/python/opaque_pointer_converter.hpp: In static member function ‘static void* boost::python::opaque::extract(PyObject*)’: ./python/include/boost/python/opaque_pointer_converter.hpp:66:68: error: call of overloaded ‘implicit_cast(PyObject*&)’ is ambiguous ? static_cast(implicit_cast(op))->x ^ ./python/include/boost/python/opaque_pointer_converter.hpp:66:68: note: candidates are: In file included from ./python/include/boost/python/converter/builtin_converters.hpp:11:0, from ./python/include/boost/python/converter/arg_to_python.hpp:17, from ./python/include/boost/python/call.hpp:15, from ./python/include/boost/python/object_core.hpp:14, from ./python/include/boost/python/args.hpp:25, from ./python/include/boost/python.hpp:11, from /tmp/implicit_cast.cc:6: ./conversion/include/boost/implicit_cast.hpp:25:10: note: T boost::implicit_cast(typename boost::detail::icast_identity::type) [with T = void*; typename boost::detail::icast_identity::type = void*] inline T implicit_cast (typename boost::detail::icast_identity::type x) { ^ /tmp/implicit_cast.cc:2:10: note: T implicit_cast(void*) [with T = void*] inline T implicit_cast (void *) { ^ }}} Proposed fix: {{{ diff --git a/include/boost/python/opaque_pointer_converter.hpp b/include/boost/python/opaque_pointer_converter.hpp index 10eb423..70ab1fe 100644 --- a/include/boost/python/opaque_pointer_converter.hpp +++ b/include/boost/python/opaque_pointer_converter.hpp @@ -63,7 +63,7 @@ private: static void* extract(PyObject* op) { return PyObject_TypeCheck(op, &type_object) - ? static_cast(implicit_cast(op))->x + ? static_cast(boost::implicit_cast(op))->x : 0 ; } }}} " Bugs new To Be Determined python USE GITHUB Boost Development Trunk Problem gromer@…