[C++-sig] Boost function call error

David Abrahams dave at boost-consulting.com
Wed Aug 17 23:04:23 CEST 2005

"Dirgesh Patel" <dirgesh.patel at hp.com> writes:

> I have made a .cpp file with boost_python_module inside it and a function 
> call. which looks a little like this:
>     def("copy", copy, imageMorph_copy() 
My guess is that this is ambiguous and needs to be cast to a
particular function pointer type, or better yet assigned to a function pointer
of the correct type before passing it.  See

> [return_value_policy<manage_new_object>()] );
> with a overloading operator which looks a little like this:
> BOOST_PYTHON_FUNCTION_OVERLOADS(imageMorph_copy, copy, 1, 7)
> the overloader is correct in terms of syntax because i have other functions 
> i am using in same syntax and it works..just fails on this one.
> here is the error i get:
> ../python/imageMorph_boost.cpp: In function `void init_module_imageMorph()':
> ../python/imageMorph_boost.cpp:107: error: no matching function for call to 
> `def(const char[5], <unknown type>, 
> boost::python::detail::overloads_proxy<boost::python::return_value_policy<boost::python::manage_new_object, 
> boost::python::default_call_policies>, imageMorph_copy>)'
> Any suggestions? i have tried to update my GCC to the latest and greatest.

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list