Go to the Datasim Education BV homepage Datasim Education BV Datasim Education BV Datasim Education BV Datasim Education BV Datasim Education BV
Information request

Follow datasim on Twitter

Share this page

STL Training

Course Category: 

The Standard Template Library with C++ 11 (STL)  - (code CPP-STL)

STL is part of the C++ language and it contains generic (template) functionality for data containers, iterators for navigating in these containers as well as algorithms, functors and more. It is a powerful, efficiency and robust library and it can be used in applications rather than writing the same functionality yourself.

This 3-days hands-on course (theory/practice 70%/30%) introduces each of the categories in STL. We discuss each category in detail and we give integrated examples and examples to consolidate student learning. We also show how to use STL in applications. Finally, we introduce a number of new features in the new C++ 11 standard and we show how it interacts with STL. Full source code is provided.


Course Benefits

  • STL functionality A-Z
  • Overview of templates and how to use them with STL
  • Improvements in the STL in C++ 11
  • New design models in STL
  • Applications and numerous practical examples


Course updated September 2013

Course contents

General Template Background

  • Templates Overview
  • Function and class templates
  • Template parameters
  • Parameter types and constraints
  • Template specialisation

Traits and Policy Classes

  • Categories of traits
  • Policy Classes
  • Comparing traits and policies
  • Multiple traits and policies

Design Issues

  • Dynamic and static polymorphism
  • Generic programming
  • Templates with inheritance and composition
  • Generic design patterns
  • Template template parameters

STL Data Containers

  • Sequential Containers and Adapters
  • Vectors
  • Lists
  • Deques
  • Stack
  • Priority queue

Associative Containers

  • Sets and multisets
  • Maps and multimaps

Other Containers

  • Strings
  • Complex numbers
  • Bitsets

Heap Data Structure and Algorithms

  • What is a heap data structure?
  • Major heap algorithms
  • Heapsort and partial sort
  • STL priority_queue
  • Applications of heaps

Boost Heap

  • Why Boost Heap? Characteristics
  • Basic priority queue interface
  • Priority queue iterators
  • Data structures

Hash Functions

  • What is a hash function?
  • Hash tables and cache
  • Buckets and slots
  • Key collisions and bucket overflow
  • Finding duplicate and similar records
  • Hash function algorithms

STL Unordered Containers

  • Creating and controlling unordered containers
  • Unordered (multi)sets and (multi)maps
  • Layout operations
  • User-defined hash functions
  • The bucket interface
  • Unordered containers as associative arrays
  • Boost Functional/Hash library

STL Iterators

  • Iterator Categories
  • Input and Output iterators
  • Forward iterators
  • Bidirectional iterators
  • Random access iterators

Iterator Adapters

  • Reverse iterators
  • Insert iterators
  • Stream iterators

Iterator Traits

  • Iterator tags
  • Iterators and generic functions
  • User-defined iterators
  • Creating STL-compatible containers

Auxiliary Iterator Functions

  • advance()
  • distance()
  • iter_swap()

STL Algorithms' Overview

  • Using function objects to create families of algorithms
  • Complexity and performance
  • Algorithms and specific data structures

NonModifying Algorithms

  • Performing read operations on the elements of a container
  • Smallest and largest values in a container
  • Counting algorithms
  • Find and search
  • Range comparisons

Modifying Algorithms

  • Performing write operations on the elements of a container
  • Copy a range of elements in a container
  • Merge two ranges; swap two ranges
  • Replace algorithm categories
  • Transformation and combining algorithms

Mutating Algorithms

  • Reverse and rotate
  • Permutations
  • Shuffling
  • Moving elements to the front of the container

Removing Algorithms

  • Removing based on values and on a criterion (function object)
  • Logical removals and physical removals
  • Removing certain values
  • Removing duplicates
  • Removals based on unary predicates

Sorting Algorithms

  • Introduction to heap data structures
  • Categories of sorting algorithms
  • Partial sort
  • Convert a range to a heap
  • Operations on a heap
  • Sort a heap

Numeric Algorithms

  • Overview of numeric processing
  • Combine the elements of a container
  • Inner products
  • Adjacent differences
  • Partial sums

Sorted Range Algorithms

  • Binary search: does a range contain an element?
  • Other algorithms relating to elements and ranges
  • Merge algorithms
  • Set-like operations

STL Function Objects

  • Overview
  • What is a function object?
  • Predicates versus function objects
  • Predefined function objects
  • Function composition in STL

Function Binding

  • Overview of STL Bind
  • Binding function parameters
  • Predefined function objects
  • Function object adapters
  • Disadvantages of STL Bind

C++ 11 and STL, Boost

  • Lambda functions
  • STL Function library
  • Boost Bind library
  • Smart pointers
  • Clocks and timers

Concurrency in C++ 11

  • async and futures
  • Threads and promises
  • Synchronising threads
  • Mutexes, lock, condition variables
  • Atomics

An Introduction to Regular Expressions

  • Regex match and search interface
  • Subexpressions
  • Regex iterators and token iterators
  • Regex flags
  • Regex exceptions

We assume some knowledge of C++, typically to the level of the Datasim CPP Fundamentals course.

Who should attend?
C++-programmers who wish to develop reliable, and efficient software using STL standardised classes.

Duration, price, date, locations
Course duration 3 days
Price Euro 1455.-- ex. VAT
Euro 1760.55 inc. 21% VAT
Date and location Dates available on request

For courses given at a location other than the Datasim office in Amsterdam, you will need to bring your own laptop with a C++ compiler like Visual C++.

It is also possible to organize this course at your company premises (the in-company option). If you have any question, please contact our Datasim office.

Follow-up courses

Share this page

Contact and Profile
Registration form
Course Dates