Concepts were expected to be the next big thing in C++. Concepts are a reasonable development of generic programming in that they allow the imposition of constraints on templates, which results in better error messages, faster compilation, and more efficient programming. But, in July 2009, the C++ Standards Committee voted not to include concepts in a major revision of C++ 2003. Although this paper was motivated in part by the expected adoption of concepts, its usefulness in understanding the feature and its benefits is not diminished by the committee’s action; however, some treatment of the deficits of concepts would help readers understand the rationale for the committee’s decision.
Writing for an audience well versed in C++ and generic programming, the authors provide numerous illustrative code fragments to solidify the implementation of concepts in C++. They detail how concepts can complement compile time with runtime polymorphism, how they can improve compiler performance, and how concept maps can be employed. The authors are especially strong in explaining the motivation for extending C++ to include concepts, the logical pathway from C++ 2003 to C++ with concepts, and how generic programming works in C++ with concepts.
Readers will obtain an understanding of both the rationale of concepts and the coding details of some model concepts. Understanding the reasons for the Standards Committee’s exclusion of concepts will require another paper.