Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Use the Pimpl Idiom to Reduce Compilation Time and Enhance Encapsulation

Changes in the implementation details of a single infrastructure class don't have to trigger a wholesale recompilation of the numerous classes referring to the modified class. Find out how applying the Pimpl idiom can help you reduce compilation time and enhance encapsulation.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

ong compilation time is an issue of concern for many large-scale C++ projects. In some cases, a typical build cycle takes up a whole night or an entire weekend. This problem is aggravated by the fact that changes in the implementation details of a single infrastructure class trigger a wholesale recompilation of numerous classes that refer to the modified class. This solution will show you how to apply the Pimpl idiom to reduce compile-time dependencies, and thus reduce compilation time. Another benefit of using this technique is a higher level of encapsulation.

How can you avoid a wholesale recompilation when a change in the implementation details of a frequently-used class has taken place?

Use the Pimpl idiom, also known as the compiler-firewall idiom.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date