[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] problem with static member function resolution
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2006-03-04 17:56:24
Message-ID: 200603041756.24924.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Saturday 04 March 2006 11:22 am, Gerard Vermeulen wrote:
> Phil, the following header works with SIP-4.3.2, but not with the recent
> SIP snapshots:
>
> class A
> {
> public:
>     A() {}
>     virtual ~A() {}
> protected:
>     static int bar() { return 3; }
> };
>
> class B: public A
> {
> public:
>     B(): A() {}
>     virtual ~B() {}
> private:
>     static int bar(int oops) { return 3*oops; }
> };
>
> The attached tar.gz contains a minimal example.  The output of SIP
> leads to the following compile errors:
>
> g++ -c -pipe -fPIC -O2 -Wall -W -I. -I/home/packer/usr/include/python2.4 -o
> sipsB.o sipsB.cpp sipsB.cpp: In static member function `static int
> sipB::sipProtect_bar()': sipsB.cpp:30: error: no matching function for call
> to `B::bar()'
> ./s.h:19: note: candidates are: static int B::bar(int)
> make: *** [sipsB.o] Error 1

Fixed in tonight's snapshot.

Thanks,
Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic