Transitioning to C++11

This four-day course introduces the new features of ISO 14882 C++, known as C++11 and how they relate to the previous incarnation, C++98.

AC++11-401
4 days
£1960
pdf download

Dates:

1 - 4 Jul 2014
24 - 27 Nov 2014

Course Outline

 

Constructing objects:

  • Class definition and objects
  • Constructors
  • Default constructors
  • Initialisers

Specialistation:

  • Inheritance
  • Substitution
  • Interfaces
  • Abstract base classes

Creating substitutable objects:

  • Overriding
  • Dynamic polymorphism
  • Safe downcasting

Realising interfaces:

  • Pure virtual functions
  • Cross-casting

Resource Management:

  • Overloading copy constructors
  • Overloading assignment
  • The Rule of the Big Three
  • Disabling copying

Move Semantics:

  • rvalues and lvalues
  • Resource pilfering
  • Move constructors
  • Move assignment

Smart pointers:

  • shared_ptr
  • weak_ptr
  • unique_ptr

Templates:

  • Function templates
  • Class templates
  • The template build mechanism

Advanced templates:

  • Template specialization
  • Partial specialization
  • Template inheritance
  • Traits
  • Meta-programming
  • constexpr

STL containers:

  • Container types
  • Choosing a container

STL iterators:

  • STL iterators
  • The iterator model
  • Special iterators

STL Algorithms:

  • The algorithm concept
  • Functors
  • Adapter functions
  • Unary and binary functors
  • Binding

Function objects:

  • Lambdas
  • std::function

Threading:

  • Thread-Runs-Function
  • Thread-Runs-Functor
  • Waiting for threads to finish

Mutual Exclusion:

  • Race conditions
  • std::mutex
  • scope-locked idiom

Monitors:

  • Signals and Condition objects
  • The Monitor pattern

Futures and Promises:

  • Deferred synchronous calls
  • std::promise
  • std::future
  • Throwing exceptions

Course Overview

 

The C++11 standard marks a fundamental change to the C++ language. Bjarne Stroustrup, originator of C++, refers to it as “feeling like a completely new language”. The course looks at some of the changes to the language and how they affect the way we write C++ code.

Attendees will gain a detailed overview of the new language features and how to apply them. The lectures will be supported by hands-on exercises.

Course Objectives:

  • Provide a background into the C++ features that have changed
  • Provide an overview of the new language features
  • Understand how the new features change C++ programming style
  • Give practical experience of the new features
  • Give the confidence to apply these new concepts to your next project

Delegates Will Learn:

  • The new extensions to the C++ language
  • Some of the performance impacts of the new features
  • The extensions to the Standard Template Library
  • Some of the new Standard Libraries
  • An introduction to the new C++ threading model

Pre-requisites:

This course is not intended to be a comprehensive C++ course and it is expected that students will already have a solid working knowledge of C++98, in particular.

  • Object Oriented design
  • RAII
  • The Standard Template Library

Ideally, attendees would have completed the Feabhas course C++-501 C++ for Embedded Developers.

Who Should Attend?
This course is aimed at experienced C++ developers who want to quickly understand the new facilities of C++11

Duration:

  • Three days

Course Materials:

  • Delegate handbook
  • Delegate datakey

Related Courses:

Course Workshop:
At least 50% of the course is hands-on exercises. Students will be programming on a platform environment, either Windows or Linux, using an appropriate toolchain.