class test1 { public: void f1( const double a, const double b, const double c ) {} void f2( const int a, const double b ) {} }; class test2 { public: void f1( const double a, const double b, const double c ) {} void f1( const int a, const double b ) {} }; // Includes ==================================================================== #include // Using ======================================================================= using namespace boost::python; // Module ====================================================================== BOOST_PYTHON_MODULE(tt) { class_< test1, boost::noncopyable > c1("test1"); //~ c1.def("f1", &test1::f1); /* ERROR */ c1.def("f1", (void (test1::*)( double, double, double )) &test1::f1); class_< test2, boost::noncopyable > c2("test2"); //~ c2.def("f1", (void (test2::*)( const double, const double, const double )) &test2::f1); /* ERROR */ c2.def("f1", (void (test2::*)( double, double, double )) &test2::f1); } // Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86