[C++-sig] boost python doc problem? (return_self)
David Abrahams
dave at boost-consulting.com
Thu Aug 31 04:41:09 CEST 2006
Neal Becker <ndbecker2 at gmail.com> writes:
> The example in ref man for return_self, shows:
> class_<widget>("Widget")
> .def("sensitive", &Widget::get_sensitive)
> .def("sensitive", &Widget::set_sensitive, return_self<>())
> ;
>
> But Widget::set_sensitive is void, it doesn't return anything. What am I
> missing here?
That's the whole point of return_self: to give the wrapped function a
return value other than None.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list