© Dmitri Nesteruk 2022
D. NesterukDesign Patterns in Modern C++20https://doi.org/10.1007/978-1-4842-7295-4_7

7. Bridge

Dmitri Nesteruk1  
(1)
St. Petersburg, Russia
 

If you’ve been paying attention to the latest advances in C++ compilers (GCC, Clang, and MSVC in particular), you might have noticed that compilation speeds are improving. In particular, compilers are getting more and more incremental, so that instead of rebuilding the entire translation unit, the compiler can actually only rebuild the definitions that have changed and reuse the rest.

The reason I’m bringing up C++ compilation is because “one weird trick” has been consistently used by developers in an attempt to speed up compilation in the past.

I am, of course, talking about…

The Pimpl Idiom ...

Get Design Patterns in Modern C++20: Reusable Approaches for Object-Oriented Software Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.