[C++-sig] ‘Base’ is an inaccessible base of ‘Derived’ ??

2010-03-14 Thread Anders Wallin
Hi all, I'm trying to expose a base-class with pure virtual functions, and a derived class. Following the example here: http://www.boost.org/doc/libs/1_42_0/libs/python/doc/tutorial/doc/html/python/exposing.html#python.class_virtual_functions both in my real code, and in a minimal test-case, I get

Re: [C++-sig] ‘Base’ is an inaccessible base of ‘Derived’ ??

2010-03-14 Thread Stefan Seefeld
On 03/14/2010 04:28 PM, Anders Wallin wrote: Hi all, I'm trying to expose a base-class with pure virtual functions, and a derived class. Following the example here: http://www.boost.org/doc/libs/1_42_0/libs/python/doc/tutorial/doc/html/python/exposing.html#python.class_virtual_functions both in

Re: [C++-sig] ‘Base’ is an inaccessible base of ‘Derived’ ??

2010-03-14 Thread Anders Wallin
Thanks, inserting a few "public" keywords here and there makes this compile: class Base { public: virtual int f(int x) = 0; }; class Derived : public Base { public: int f(int x) {return 2*x;} }; class BaseWrap : public Base, public boost::python::wrapper { public:

Re: [C++-sig] ‘Base’ is an inaccessible base of ‘Derived’ ??

2010-03-14 Thread Stefan Seefeld
On 03/14/2010 05:37 PM, Anders Wallin wrote: not sure if this is worth mentioning in the documentation, or is it very obvious to everyone except newbies like myself... :) Knowing that access to base classes and members defaults to 'public' for structs and 'private' for classes is basic C++