[C++-sig] Virtual Functions with Default Implementations code sample

Alex alex at glumol.com
Mon Jul 28 13:49:00 CEST 2003


I can't build the "Virtual Functions with Default Implementations" code
sample from the online tutorial :

struct Base
    {
        virtual int f() { return 0; }
    };

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

-------

class_<Base, BaseWrap>("Base")
        .def("f", &Base::f, &BaseWrap::default_f)


--> get the error "value_holder.hpp(131) : error C2661: 'BaseWrap::BaseWrap'
: no overloaded function takes 2 parameters"

???

(btw I can build all the other code samples from the tutorial)

-------

other newbie questions :

Is there a place on the web where all the c++-sig at python mails are archived
?

Does pyste can convert C++ function arguments to python keyword arguments ?






More information about the Cplusplus-sig mailing list