Boost logo

Boost Users :

From: Bruce Lowery bruce_lowery_at_[hidden])
Date: 2003-01-14 10:18:48


Using Boost/Python, how does one overload methods? For instance:

struct Bar
{
     void func( const std::string& s );
     void func( int i );
};

BOOST_PYTHON_MODULE( Foo )
{
class_<Bar>( "Bar" )
     .def( "func", &Bar::func )
     .def( ??? )
     ;
}

The reference documentation discusses the
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS macro, but it only seems to
apply to methods with default arguments.

--bruce


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net