Followup: Weakref - details

ATS asteinarson at gmail.com
Tue Feb 12 07:15:20 PST 2008


> A> It seems the #pragmas would do the same job as the compiler options. 
> A> Better than updating the project files? Probably so since we depend
> A> on it. 
> 
>  Yes. But I still think that __multiple_inheritance would be the best.
> People who don't use wxWeakRef shouldn't pay for its existence.
> 

How about: 

  #if defined(__WXWINCE__) && wxUSE_WEAKREF==1
      #pragma pointers_to_members(full_generality,multiple_inheritance)
  #endif

That isolates the case. 

It's worth to note here that for all compilers in the GCC family, 
the size of a member function pointer is always 2 words (8 bytes). 

With the pragma above, the Microsoft compilers generates a pointer
with the same size. It seems that this isze is needed to implement 
this part of C++ fully.

Regards
// ATS


>  Regards,
> VZ
> 








More information about the wx-dev mailing list