C++ pimpl

Martin Nowak dawg at dawgfoto.de
Mon Jan 23 07:26:45 PST 2012


> Ah, good to know. One solution would be to just add some dummy space to  
> the class declaration (private void[256] dummy=void) so that the  
> implementation can use it for private members. (union{void[256] dummy;  
> struct{/*private_members*/}}) Of course, this is potentially wasteful.

This is what I did for the thread pimpl, but it requires you to manually
keep the size in sync with the implementation.


More information about the Digitalmars-d mailing list