Advanced Metaprogramming in Classic C++ - PDF
Скачать полную версию книги "Advanced Metaprogramming in Classic C++ - PDF"
Template Metaprogramming (TMP from here on) is a new way of using C++:
- It has a scope: a known set of problems where it proves useful.
- It has a philosophy: a peculiar way of thinking about problems.
- It has a language: idioms and patterns.
This book, according to the 80-20 law, aims to be an introduction to the first 20% of metaprogramming—its philosophy, scope, and language—that can improve 80% of daily programming activities. All the chapters are driven by some simple ideas:
- With modern compilers, most practical benefits come from simple techniques, when correctly applied.
- TMP indeed produces better software. “Better” is simply a placeholder for faster, safer, more maintainable, more expressive, or a combination of these features.
- State-of-the-art TMP libraries usually offer a huge set of features. Unfortunately, documentation is either too large or too small. While reuse is a long-term winning strategy, mastering the basic principles may suffice.
- Getting gradually accustomed with elementary techniques, the reader will develop a deeper comprehension of the problems and eventually, if necessary, look for more advanced tools.
The reader is assumed at ease with classic C++ programming, including STL concepts and conventions.
A systematic study of TMP exceeds the capacity (in C++ sense) of any single book. With over five years invested in creating this book, I hope you will find it more than a useful starting point. For comprehensive and robust training, the interested reader may want to see the bibliography.