[C++-sig] Re: __call__?

David Abrahams dave at boost-consulting.com
Thu Jul 15 14:33:13 CEST 2004

"Neal D. Becker" <ndbecker2 at verizon.net> writes:

> How does one overload __call__?  It doesn't seem to be included in
> <boost/python/operators.hpp> or mentioned in the tutorial.

You add your operator() as a method called "__call__" ;-)

    .def("__call__", &Foo::operator())

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list