[C++-sig] Pyste and virtual operators.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Jul 3 17:45:30 CEST 2003


Hi,

My experience with Boost.Python and Pyste have so far been superb.
Thanks for the wonderful library and tool!  

I think I've just found a bug with Pyste regarding handling virtual
operators.  Virtual functions seem to be OK but operators cause
trouble.  Consider the following minimal test code:

// -------  file.hpp -------------
namespace test {
class Op {    
public:
    virtual ~Op() {}
    virtual Op& operator ++ () = 0;
};
}
// --------------------

I now wrap this using something like so in a Pyste file.

op = AllFromHeader('file.hpp')

When generating file.cpp everything is fine but when compiling the
file errors are generated since the wrapper code does not generate
wrappers for the operator and this cannot be instantiated.  In the
above case there is no wrapper code generated at all.

The problem also persists with concrete virtual member operators --
since the wrappers are not generated.  The code compiles but there
would be problems since one would not be able to overload it in a
derived class in Python.

I guess this is a bug?

Thanks!

cheers,
prabhu




More information about the Cplusplus-sig mailing list