Skip to Content
C++ High Performance - Second Edition
book

C++ High Performance - Second Edition

by Björn Andrist, Viktor Sehr
December 2020
Intermediate to advanced
544 pages
12h 45m
English
Packt Publishing
Content preview from C++ High Performance - Second Edition

9

Essential Utilities

This chapter will introduce some essential classes from the C++ Utility library. Some of the metaprogramming techniques presented in the previous chapter will be used in order to work effectively with collections that contain elements of different types.

C++ containers are homogenous, meaning that they can only store elements of one single type. A std::vector<int> stores a collection of integers and all objects stored in a std::list<Boat> are of type Boat. But sometimes, we need to keep track of a collection of elements of different types. I will refer to these collections as heterogenous collections. In a heterogeneous collection, the elements may have different types. The following figure shows an example of a homogenous ...

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++ High Performance

C++ High Performance

Viktor Sehr, Björn Andrist

Publisher Resources

ISBN: 9781839216541Supplemental Content