Chapter 2. Generic Programming in C++

2.1 Introduction

Generic programming (GP) is a methodology for program design and implementation that separates data structures and algorithms through the use of abstract requirement specifications. In C++, generic programming is characterized by the use of parametric polymorphism through the use of templates, with an emphasis on efficiency.

Generic programming is the methodology that we used in the construction of the Boost Graph Library. To understand the organization and structure of the BGL, the reader needs a good understanding of generic programming. Because generic programming is a relatively new methodology (at least in the C++ community), we give an introduction to generic programming in this chapter. ...

Get The Boost Graph Library: User Guide and Reference Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.