[C++-sig] Pyplusplus: operators <</>> not supported?

Roman Yakovenko roman.yakovenko at gmail.com
Tue Jun 3 19:43:37 CEST 2008


On Tue, Jun 3, 2008 at 8:20 PM, Hans Meine
<meine at informatik.uni-hamburg.de> wrote:
> Hi Roman,
>
> I have defined a class with shift operators: <<,>>,<<=,>>=
> Only the latter two in-place assignment-shift operators are recognized by
> py++.  I have looked in the test suite and found
> pyplusplus_dev/unittests/data/operators_to_be_exported.hpp with the
> comment "Boost.Python does not support member operator<<", which indicates
> that you left them out for a purpose.
>
> However, it seems to work fine with boost 1.34.1 when I manually add the (self
> << int) def's, so maybe this is an old bug of boost::python which has been
> fixed since 2004?

I think there is small confusion, but it doesn't change the facts.
Py++ doesn't support operators << and >>
which write to some stream.

I did not know that it is possible to define shift operators for
classes. Can you point me to the relevant documentation?

Thanks

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list