[C++-sig] Overloading member function problem
Simon Pickles
sipickles at hotmail.com
Fri Aug 15 17:34:51 CEST 2008
Stefan Seefeld wrote:
> Simon Pickles wrote:
>>
>>
>> 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,
>>
>> What does 'wrapping' mean? :)
> class_ format("format");
>
Sorry, no effect. My module now looks like this:
class CLog
{
public:
void Log(const std::string&);
void Log(const boost::format&);
}
void (CLog::*pLogString)(const std::string&) = &CLog::Log;
void (CLog::*pLogFormat)(const boost::format&) = &CLog::Log;
BOOST_PYTHON_MODULE(Hybrid)
{
using namespace boost::python;
class_ format("format");
class_("CLog")
.def("Log", &pLogString)
.def("Log", &pLogFormat)
;
}
No change in the error tho:
boost/python/class.hpp:536: error: no matching function for call to
‘get_signature(void (CLog::**&)(const std::string&), CLog*)’
Thanks
Si
--
Linux Counter: User# 424693
_________________________________________________________________
Make a mini you on Windows Live Messenger!
http://clk.atdmt.com/UKM/go/107571437/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080815/098114dd/attachment.htm>
More information about the Cplusplus-sig
mailing list