From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2007-10-15 12:54:53
Has anyone looked into a 'FastPimpl'? (ie see
http://www.gotw.ca/publications/mill05.htm, including the list of
reasons not to).
I wrote a generic FastPimpl once that looked something like this:
// forward declare:
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.