Skip to Content
C++ Templates: The Complete Guide, 2nd Edition
book

C++ Templates: The Complete Guide, 2nd Edition

by David Vandevoorde, Nicolai M. Josuttis, Douglas Gregor
September 2017
Intermediate to advanced
822 pages
26h 51m
English
Addison-Wesley Professional
Content preview from C++ Templates: The Complete Guide, 2nd Edition

Chapter 28

Debugging Templates

Templates raise two classes of challenges when it comes to debugging them. One set of challenges is definitely a problem for writers of templates: How can we ensure that the templates we write will function for any template arguments that satisfy the conditions we document? The other class of problems is almost exactly the opposite: How can a user of a template find out which of the template parameter requirements it violated when the template does not behave as documented?

Before we discuss these issues in depth, it is useful to contemplate the kinds of constraints that may be imposed on template parameters. In this chapter, we deal mostly with the constraints that lead to compilation errors when violated, and ...

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

C++ Software Design

C++ Software Design

Klaus Iglberger

Publisher Resources

ISBN: 9780134778808