Grant Jenks Logo

C++ Training

C++ Course Outline

Copyright © 2018 Grant Jenks. All Rights Reserved.

Warning

I’m available for hire! Connect with me on LinkedIn.

Day 1

C++ is Awesome Presentation

  • Success factors context

  • History of the language

  • Modern features

Grand Tour of Modern C++11

  • Uniform initialization syntax and automatic type deduction

  • Defaulted, delegated, and deleted special member functions

  • Move semantics, rvalue references, and value categories

  • Convenient syntax: lambda functions and range-based for-loops

  • Type-safety: typed-nullptr, typed-enums, and variadic templates

  • Compile-time features: “constexpr” keyword and static_assert

  • STL features: multi-threading, smart pointers, chrono, regex

Day 2

Object-Oriented Programming

  • Characterizing “has a” and “is a” relationships

  • Inheritance, “virtual” keyword, and vtable implementation

  • Special member functions and the rule of 3/5/0

  • Constructors and member initializer lists

  • Base and derived class construction and destruction

  • Access modifiers – public, protected, and private

Resource-Safe C++ Basics

  • Exceptions: “try/catch”, “throw”, “noexcept”, std::exception hierarchy

  • RAII – Resource Acquisition Is Initialization

  • Error codes – benefits and drawbacks

  • Swap operation, “friend” keyword, and copy-and-swap idiom

  • Exceptions thrown from constructors and destructors

Operator Overloading

  • Commonly overloaded operators

  • Operator overloading best practices

  • Prefix vs. postfix increment operators

  • Member functions vs non-member functions

  • Type conversions and the “explicit” keyword

Day 3

Resource-Safe C++ in Practice

  • Exception-safety levels, guarantees, and neutrality

  • Member initialization order

  • Allocations, copies, and exceptions

  • Delegating constructors

  • Move-and-swap idiom

Smart Pointers

  • Value Categories – lvalue, rvalue, prvalue, xvalue, glvalue

  • Value categories and argument passing overloads

  • Move semantics, copies, and copy elision optimization

  • Argument-dependent name lookup (Koenig Lookup)

  • Function call argument evaluation order

  • Unique-pointer and shared-pointer semantics

Day 4

Initialization

  • Braces initialization, type narrowing, and the “most vexing parse”

  • Benefits and drawbacks of the “auto” and “decltype” keywords

  • User defined literals

STL Containers

  • Basics: array, vector, deque, forward_list, and list

  • Container adaptors: stack, queue, and priority_queue

  • Trees and hashes: set and map with multi-* and unordered_* variants

  • Iterators: traversal, insertion, output, and utilities

STL Algorithms

  • Basics: fill, for_each, copy, transform, rotate, accumulate, iota

  • Variations: policy functors, *_if variants, *_n variants

  • Range-based for-loop semantics

  • Utilities: bind, operators, hash, pair, tuple

Performance

  • Challenge and science of benchmarking

  • Understanding profiles and flame graphs

  • Timing language features: new/delete, exceptions, smart pointers, etc.

  • Timing STL features: vector vs. list, map vs. unordered_map, etc.