C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond
©2005 |Addison-Wesley Professional | Available
©2005 |Addison-Wesley Professional | Available
Simply put, a metaprogram is a program which generates or manipulates
program code. The ability to programmatically create software allows
programmers to work at a higher level of abstraction appropriate to the
problem domain, and allows the resulting code to be reconfigured without loss
of efficiency. Ever since generic programming was introduced to C++,
programmers have discovered myriad "template tricks" for manipulating
programs *as they are compiled*, effectively eliminating the barrier between
program and metaprogram. While the excitement generated by these
capabilities among C++ experts has reached the community at large, their
practical application remains out-of-reach for most programmers. This book
provides the neccessary foundation to make template metaprogramming
practical for everyone.
This product is part of the following series. Click on a series title to see the full list of products in the series.
At long last, this much-awaited book delivers practical metaprogramming into the hands of the everyday C++ programmer.
° Presents the C++ Metaprogramming Library (MPL), a framework of powerful tools providing unprecedented new capability to the C++ power-user.
° Bjarne Stroustrup gave the equivalent of a blank check to the authors--meaning that he would accept anything they wrote into his Series, given their overwhelming expertise in this domain.
° CD-ROM contains the entire Boost Library.
Making the Most of This Book.
So What's a Metaprogram?
Metaprogramming in the Host Language.
Metaprogramming in C++.
Why a Metaprogramming Library?
2. Traits and Type Manipulation.
Making Choices at Compile Time.
A Brief Tour of the Boost Type Traits Library.
3. A Deeper Look at Metafunctions.
More Lambda Capabilities.
4. Integral Type Wrappers and Operations.
Boolean Wrappers and Operations.
Integer Wrappers and Operations.
5. Sequences and Iterators.
Sequences and Algorithms.
Intrinsic Sequence Operations.
Integral Sequence Wrappers.
Writing Your Own Sequence.
Algorithms, Idioms, Reuse, and Abstraction.
Algorithms in the MPL.
Fundamental Sequence Algorithms.
Sequence Building Algorithms.
Writing Your Own Algorithms.
7. Views and Iterator Adaptors.
A Few Examples.
Writing Your Own View.
Debugging the Error Novel.
Using Tools for Diagnostic Analysis.
Intentional Diagnostic Generation.
9. Crossing the Compile-Time/Runtime Boundary.
(Member) Function Pointers as Template Arguments.
The Curiously Recurring Template Pattern.
Explicitly Managing the Overload Set.
The "sizeof Trick".
10. Domain-Specific Embedded Languages.
A Little Language.
Goes a Long Way.
DSLs, Inside Out.
C++ as the Host Language.
Blitz++ and Expression Templates.
The Boost Spirit Library.
11. A DSEL DesignWalkthrough.
Finite State Machines.
Framework Design Goals.
Framework Interface Basics.
Choosing a DSL.
Appendix A. An Introduction to Preprocessor Metaprogramming.
Fundamental Abstractions of the Preprocessor.
Preprocessor Library Structure.
Preprocessor Library Abstractions.
Appendix B. The typename and template Keywords.
Appendix C. Compile-Time Performance.
The Computational Model.
Managing Compilation Time.
Appendix D. MPL Portability Summary.
Pearson offers affordable and accessible purchase options to meet the needs of your students. Connect with us to learn more.
K12 Educators: Contact your Savvas Learning Company Account General Manager for purchase options. Instant Access ISBNs are for individuals purchasing with credit cards or PayPal.
Savvas Learning Company is a trademark of Savvas Learning Company LLC.
|Format||Paper Bound w/CD-ROM|
|Suggested retail price||$59.99|
David Abrahams is a founding member and moderator of the Boost C++ library development group. Dave has been an ANSI/ISO C++ committee member since 1996, where he is best known for contributing a theory, specification, and implementation of exception handling for the C++ standard library. His company, Boost Consulting, provides Boost-related support and development services and professional training in the art of software construction.
Aleksey Gurtovoy is a technical lead for MetaCommunications and a contributing member of the Boost C++ community. Aleksey is the original author of the Boost Metaprogramming Library. He has been working with C++ since 1993, and holds a M.S. degree in computer science from Krasnoyarsk Technical State University, Russia.
We're sorry! We don't recognize your username or password. Please try again.
The work is protected by local and international copyright laws and is provided solely for the use of instructors in teaching their courses and assessing student learning.
You have successfully signed out and will be required to sign back in should you need to download more resources.