[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error: address of overloaded function with no contextual type infor
From: |
acemtp |
Subject: |
Re: error: address of overloaded function with no contextual type information |
Date: |
Thu, 21 Aug 2008 12:45:57 -0700 (PDT) |
User-agent: |
G2/1.0 |
Ok,
I found this post and the double cast works:
http://gcc.gnu.org/ml/gcc-bugs/2000-09/msg00537.html
On 21 août, 15:23, acemtp <ace...@gmail.com> wrote:
> Hello,
>
> I have an error when compiling this little program:
>
> --------------
> class CReflectable
> {
>
> };
>
> typedef int(CReflectable::* TGetSInt32) () const;
>
> class A : public CReflectable
> {
> int getW() const { return 1; }
> int getW(bool bTestActive) const { return 0; }
>
> };
>
> main()
> {
> TGetSInt32 p;
> p = (TGetSInt32) &A::getW;}
>
> --------------
>
> The error is:
>
> foo.cpp: In function 'int main()':
> foo.cpp:17: error: address of overloaded function with no contextual
> type information
>
> How to resolve this issue? (except than renaming the getW(bool)
> function)