Boost logo

Boost :

From: ¿ÂÃÍ (k.meng_at_[hidden])
Date: 2002-11-11 21:23:56


I have a question, if my base class has a clone pure virtual function,what can I do to write
the wrap class?

   struct Base
        virtual int f() = 0;
        virtual Base* clone() = 0;

    struct BaseWrap : Base
        BaseWrap(PyObject* self_)
            : self(self_) {}
        int f() { return call_method<int>(self, "f"); }
        Base* clone(){ return call_method<Base*>(self, "clone");}
        PyObject* self;

If I write it like this,it report compile error.


Boost list run by bdawes at, gregod at, cpdaniel at, john at