Book description
Advanced Metaprogramming in Classic C++ aims to be both an introduction and a reference to C++ template metaprogramming (TMP); TMP is presented in the book as a set of techniques that will bring a new style in C++ and make code exceptionally clear and efficient. The book deals with language aspects, design patterns, examples and applications (seen as case studies). Special emphasis is put on small reusable techniques that will improve the quality of daily work.
What makes the book exceptional is the level of understanding of the concepts involved imparted by the author. This is not just a rote overview of metaprogramming. You will truly understand difficult topics like static assertions, how to write metafunctions, overload resolution, lambda expressions, and many others. More than that, you will work through them with practical examples guided by the author's frank explanations. This book requires you to think and to learn and to understand the language so that you can program at a higher level.
Table of contents
- Cover
- Title
- Copyright
- Dedication 1
- Dedication 2
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Preface
-
Part I: #include <prerequisites>
-
Chapter 1: Templates
- 1.1. C++ Templates
- 1.2. Specialization and Argument Deduction
- 1.3. Style Conventions
-
1.4. Classic Patterns
- 1.4.1. size_t and ptrdiff_t
- 1.4.2. void T::swap(T&)
- 1.4.3. bool T::empty() const; void T::clear()
- 1.4.4. X T::get() const; X T::base() const
- 1.4.5. X T::property() const; void T::property(X)
- 1.4.6. Action(Value); Action(Range)
- 1.4.7. Manipulators
- 1.4.8. Position of Operators
- 1.4.9. Secret Inheritance
- 1.4.10. Literal Zero
- 1.4.11. Boolean Type
- 1.4.12. Default and Value Initialization
- 1.5. Code Safety
- 1.6. Compiler Assumptions
- 1.7. Preprocessor
- Chapter 2: Small Object Toolkit
-
Chapter 1: Templates
-
Part 2: #include <techniques>
- Chapter 3: Static Programming
- Chapter 4: Overload Resolution
- Chapter 5: Interfaces
- Chapter 6: Algorithms
- Chapter 7: Code Generators
- Chapter 8: Functors
- Chapter 9: The Opaque Type Principle
- Part 3: #include <applications>
- Index
Product information
- Title: Advanced Metaprogramming in Classic C++
- Author(s):
- Release date: May 2015
- Publisher(s): Apress
- ISBN: 9781484210109
You might also like
book
Practical C++ Metaprogramming
To say that C++ programmers embrace metaprogramming is a real stretch. Outright rejection is probably more …
book
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond
Abrahams and Gurtovoy have written something close to a classic… marvelous fun to read… Read the …
book
Optimized C++
In today’s fast and competitive world, a program’s performance is just as important to customers as …
book
C++ Reactive Programming
Learn how to implement the reactive programming paradigm with C++ and build asynchronous and concurrent applications …