Boost logo

Boost :

From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2007-10-15 12:54:53

Has anyone looked into a 'FastPimpl'? (ie see, including the list of
reasons not to).

I wrote a generic FastPimpl once that looked something like this:

//h file

// forward declare:
class MyImplementation;

class Wrapper
   FastPimpl<MyImplementation, 24> m_Impl;
   // m_Impl works like a pointer, but isn't. It is embedded.

The '24' above is a guess at the required size of MyImplementation.
If the size is wrong, the cpp doesn't compile.

My version overloaded copy, assign, etc, to 'do the right thing' ie
pass it on the underlying MyImplementation.

Just a thought.

Boost list run by bdawes at, gregod at, cpdaniel at, john at