31
General discussions / Design and documentation
« on: December 31, 2009, 03:12:50 pm »Quote from: "nullsquared"
I forgot what this technique is called, ...
It is called pimpl, handle-body or compiler firewall idiom.
Quote from: "nullsquared"
No mutables, no const_cast, and no visible implementation details to the user
And a lot of additional possibility for failure, like there is one in your Code. You need to implement your own copy-constructor and operator=.
I would suggest to use this idiom with care and not only because you can avoid const_cast or mutable.
Dravere