Followup: Weakref - details

ATS asteinarson at gmail.com
Sun Feb 10 07:52:14 PST 2008


> A> >  From eVC help file it does support these options and it also supports
> A> > #pragma pointers_to_members(multiple_inheritance) and
> A> > __multiple_inheritance keyword.
> A> 
>
>  My point is that this is probably wasteful. If using larger member pointer
> size just for wxEvtHandler members (using __multiple_inheritance) is enough
> then it would be better to do this IMO.

Maybe it's possible and worth a try. But we have wxEvtHandler member:

  wxEvtHandler::Connect( ... wxOjectEventFunction function ... )

At this point, class wxObject is defined. Questions is, will VC stick 
to its forward declartion (__multiple_inheritence) or look at the  actual
class declaration? 

You would have to say:

  class __multiple_inheritance wxObject;

which contradicts its class definition. 


It seems the #pragmas would do the same job as the compiler options. 
Better than updating the project files? Probably so since we depend
on it. 

Given that it's a clear bug we're working around, the solution cannot
make things optimal.


I didn't know all of this had been merged into main line VC++. 


When back on Windows I can give it a try. 


Regards
// ATS.







More information about the wx-dev mailing list