[C++-sig] operators

David Abrahams dave at boost-consulting.com
Fri Oct 11 17:28:15 CEST 2002


David Abrahams <dave at boost-consulting.com> writes:

> There are of course other ways to define a '__str__' method. 

Meaning that you can write:

std::string str_my_thing(MyThing const&);

   class<MyThing>("MyThing)
      .def("__str__", str_my_thing)
      ;


-- 
           David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com





More information about the Cplusplus-sig mailing list