Check out the new USENIX Web site. Conference on Object-Oriented Technologies and Systems
 
Click underlined text to go directly to that area COOTS'97 Table of Contents
M4PM   Advanced C++ Template Examples
Andrew Koenig, AT&T Research

Who should attend: Experienced C++ programmers who know how to use templates in well-known ways, such as for writing container classes. It is not necessary to understand the language features in minute detail, but it is necessary to be completely fluent in the fundamentals.

What you will learn: Less well-known applications for templates.

The first uses of templates were for writing container classes, but templates are good for a lot more than that. For example, the STL (Standard Template Library) uses them for expressing generic algorithms as well as data structures, by exploiting the elegant notion of iterators to connect the algorithms with the data structures.

This course explores less well-known uses of templates in a wide range of applications. For example, you can use templates to create function objects that represent higher-order functions, which allow you to write efficient programs in a functional style. You can also use templates to represent imaginary data structures: data structures that do not actually exist in storage, but are created, an element at a time, as needed.

Andrew Koenig is a member of the Large-Scale Programming Research Department at AT&T Research, formerly Bell Laboratories. He has been working on C++ since 1986, and was one of the authors of the first commercially distributed C++ class libraries. Besides C++, his work includes programming language design and implementation, security, automatic software distribution, online transaction processing, and computer chess. He is the author of more than 100 articles and C Traps and Pitfalls, and co-author of Ruminations on C++.

Back to Tutorial Overview

 


Conference & Hotel InfoProgram at a GlanceTutorialsRegistration Advanced Topics WorkshopTechnical SessionsKeynote AddressCOOTS 97