[C++-sig] [boost.python] Interoperability with boost.bind

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Sat Jul 2 01:20:42 CEST 2005


I don't know where David is...
Until he replies a potentially silly suggestion (since I don't understand
boost::bind very much): is it besides the point to make a thin wrapper

int
bound_foo(int bar)
{
  boost::bind(foo, _1)(bar);
}

and to

.def("foo", bound_foo);

?

--- Markus Schöpflin <markus.schoepflin at comsoft.de> wrote:

> Is boost.python compatible with boost.bind (see example below)? If yes, 
> what am I doing wrong? The compiler used is g++ 3.2.3, boost version is 1.32.
> 
> Example:
> 
> int foo(int bar) { return bar; }
> ...
> def("foo", foo); // compiles ok
> def("foo", boost::bind(foo, _1)); // gives error
> 
> The error message boils down to:
> 
> boost/python/make_function.hpp:103: error: no matching function for call to 
> `get_signature(boost::_bi::bind_t<int, int (*)(int), 
> boost::_bi::list1<boost::arg<1> > >&)'
> 
> TIA, Markus



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com



More information about the Cplusplus-sig mailing list