[C++-sig] Overloading member function problem

Simon Pickles sipickles at hotmail.com
Fri Aug 15 12:23:32 CEST 2008


Hi,

Given a class:

///////////////////
class CLog
{
public:
void Log( const boost::format& );
void Log( const std::string& );
};

void (CLog::*LogS)(const std::string&) = &CLog::Log;
void (CLog::*LogF)(const boost::format&) = &CLog::Log;
////////////////////

And this module Macro:

///////////////////

BOOST_PYTHON_MODULE(HybridLog)
{
using namespace boost::python;

class_("logInterface")
.def("Log", &LogS)
.def("Log", &LogF)
;
}
///////////////////

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*)’

I've tried all sorts of variations!

Thanks

Simon

-- 
Linux Counter: User# 424693 



_________________________________________________________________
Get Hotmail on your mobile from Vodafone 
http://clk.atdmt.com/UKM/go/107571435/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080815/807bba1d/attachment.htm>


More information about the Cplusplus-sig mailing list