Skip to Content
The C++ Programming Language, 4th Edition
book

The C++ Programming Language, 4th Edition

by Bjarne Stroustrup
May 2013
Intermediate to advanced
1376 pages
47h 26m
English
Addison-Wesley Professional
Content preview from The C++ Programming Language, 4th Edition

24. Generic Programming

Now is a good time to put your work on a firm theoretical basis.

– Sam Morgan

Introduction

Algorithms and Lifting

Concepts

Discovering a Concept; Concepts and Constraints

Making Concepts Concrete

Axioms; Multi-argument Concepts; Value Concepts; Constraints Checks; Template Definition Checking

Advice

24.1. Introduction

What are templates for? In other words, what programming techniques are effective when you use templates? Templates offer:

• The ability to pass types (as well as values and templates) as arguments without loss of information. This implies excellent opportunities for inlining, of which current implementations take great advantage.

• Delayed type checking (done at instantiation time). This implies ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming: Principles and Practice Using C++, 3rd Edition

Programming: Principles and Practice Using C++, 3rd Edition

Bjarne Stroustrup

Publisher Resources

ISBN: 9780133522884Purchase Link