The solution to the latest GotW problem is now available.
by Herb Sutter
From the article:
Now that the unnecessary headers have been removed, it’s time for Phase 2: How can you limit dependencies on the internals of a class?
...Guideline: For widely-included classes whose implementations may change, or to provide ABI-safety or binary compatibility, consider using the compiler-firewall idiom (Pimpl Idiom) to hide implementation details. Use an opaque pointer (a pointer to a declared but undefined class) declared as
struct impl; std::unique_ptr<impl> pimpl;to store private nonvirtual members.