Understanding the pImpl pattern
The pImpl pattern (pointer to Implementation idiom) is a structural design pattern that separates the implementation of a class from its public interface. This pattern was originally known as the Bridge pattern by the Gang of Four (GofF) and is also known as the Cheshire Cat, compiler-firewall idiom, d-pointer, opaque pointer, or Handle pattern.
The primary purpose of this pattern is to minimize compile-time dependencies. The result of reducing compile-time dependencies is that changes in a class definition (most notably, the private access region) will not send a wave of timely recompilations throughout a developing or deployed application. Instead, the necessary recompiled code can be isolated to the implementation of the class itself. The other pieces of the application that depend on the class definition will no longer be affected by recompilation.
Private members within a class definition can affect a class with respect to recompilation. This...