Introduction
In the previous chapter, we learned how to implement classes to properly manage resources even when the exceptions occurred using RAII. We also learned about ADL (Argument Dependent Lookup) and how it determines the function to be called. Finally, we talked about how the explicit keyword can be used to prevent automatic conversion between types by the compiler, known as implicit conversion
In this chapter, we will look into dependencies, both physical and logical, and see how they can affect build times adversely. We'll also learn how to separate the visible interface class from the implementation details to increase the speed of the build times. We will then learn to capture functions and contexts so that we can call them later using functors, std::function and lambda expressions. Finally, we will implement a variadic template to deliver an event-based callback mechanism.
The Pointer to Implementation (PIMPL) Idiom
As projects implemented in C++ get larger and larger, there...