This chapter presents a host of C++ techniques that are used throughout the book. Because they are of help in various contexts, the techniques presented tend to be general and reusable, so you might find applications for them in other contexts. Some of the techniques, such as partial template specialization, are language features. Others, such as compile-time assertions, come with some support code.
In this chapter you will get acquainted with the following techniques and tools:
• Compile-time assertions
• Partial template specialization
• Local classes
• Mappings between types and values (the
Type2Type class templates)
Select class template, a tool that chooses a type at compile time based on a Boolean condition ...