Today's Topics:
1. Re: pimpl and boost (Gennadiy Rozental) 2. Re: Re: Re: pimpl and boost (David Gruener) 3. Re: Re: Re: pimpl and boost (Jeff Flinn)
----------------------------------------------------------------------
I so wish that pimpl was somehow part of the language. ie you don't worry about or see the pointer at all, nor do you have to forward all the function calls. I don't see why the compiler couldn't implement pimpl for me. (Of course, for cases where you want multiple implementations at run time, etc, you still do that yourself, but the typical case the compiler could do). Maybe: // h file class Foo interface { void GetX(); }; // cpp file: class Foo continue // some keyword { int x; }; Foo::GetX() { return x; } And just like implementing the same function twice, the linker could warn about 2 implementations of the same class. P.S. this could also allow you to keep some members defined in the h file, (and others in the cpp impl) if you wanted the speed of inlines for some variables, or public/protected variables, etc. Just a thought. Maybe I should complain elsewhere...