[C++-sig] Overloading member function problem

troy d. straszheim troy at resophonic.com
Fri Aug 15 16:04:33 CEST 2008


Stefan Seefeld wrote:
> Simon Pickles wrote:
>>
>> How come I am getting these errors:
>>
>> /boost/python/class.hpp:536: error: no matching function for call to
>> ‘get_signature(void (CLog::**&)(const std::string&), CLog*)’
>> /boost/python/class.hpp:536: error: no matching function for call to
>> ‘get_signature(void (CLog::**&)(const std::string&), CLog*)’
> 
> While boost.python knows (defines) how to convert std::string, it 
> doesn't seem to know about boost::format. Try wrapping boost::format 
> first, then your overload should be resolvable.

boost.python won't complain about the inability to convert things
until *runtime*.  The needed converters could easily be someplace
that this compilation unit cannot see (like in a completely different
python wrapper library).

Looks to me like OP just forgot to pass a type argument to class_<>

> class_("logInterface")
> .def("Log", &LogS)
> .def("Log", &LogF)

-t



More information about the Cplusplus-sig mailing list