We use cookies to enhance your experience on our website. By continuing to use our website, you are agreeing to our use of cookies. You can change your cookie settings at any time. Find out more
Oxford University Press
  OUP Worldwide
Search:
Advanced Search
Printer-Friendly View
You are here: Home > Academic, Professional, & General > Boudreau and Swanson: Applied Computational Physics > Chapter 17: Templates, the Standard C++ Library, and Modern C++

Companion Website

Boudreau and Swanson: Applied Computational Physics

Chapter 17: Templates, the Standard C++ Library, and Modern C++

example code (.tgz)

  • COMPARE0 and COMPARE1: examine two functions for comparison of two values, written without the use of templates, while the program in COMPARE2 demonstrates how the same functionality can be implemented with templates.
  • GETMIN0, GETMIN1, and GETMAX: illustrate function overload resolution involving template functions.
  • CONTAINERS: demonstrates the use of many c++ containers and some algorithms, all in one example program.
  • VARIADIC: demonstrates the use of variadic templates.
  • MODERN: demonstrates the use of the auto keyword, smart pointers, lambda functions, nonmember begin and end, initializer lists, and several other important components new to c++11.
  • MODERN14: illustrates auto return type, only available with c++14.

About this book
Price, bibliographic details, and more information on the book