First Technology Transfer

Standard and Advanced Technical Training, Consultancy and Mentoring

Course CPP105 - Introduction to C++11 Programming for Practicing Programmers

Duration: 5 Days

Intended Audience

This five day course is aimed at practicing programmers who are new to C++ and wish to learn modern C++ including the most common and useful features of C++11 such as auto, lambdas and move semantics, and who will be developing new C++ applications. Programmers are required to have a working knowledge of object oriented programming in some other language such as Java, C# or Python, for example.

Synopsis

This course aims to be a C++11 , from the start, course as opposed to a migrating from C++98 to C++11 course. Some of the C++11 programming features are quite subtle and the course tries to adopt a "gentle approach" when introducing these features.


Contents:

  • C++ Basic Elements - an Introduction
    • A short history of C++
    • Structure of a C++ program
    • Basic formatted I/O in C++
    • Types, Variables and Arithmetic
    • Pointers, Arrays, Tests and Loops
    • The concept of a container
    • Enumerations
    • Namespaces
    • Exceptions
    • Invariants
    • Static assertions
  • Types and Declarations
    • fundamental data types
    • declarations
    • type deduction using auto and decltype()
    • Objects and values - Lvalues, Rvalues, object lifetime
    • Type aliases
    • Pointers, Arrays and References
    • null pointers
    • arrays, array initialisers, string literals
    • pointers int arrays
    • const and pointers
    • references - Lvalue references, Rvalue references , references to references and pointers to references
    • Structures, Unions and Enumerations
  • Operators and Expressions
    • operator precedence
    • temporary objects
    • constant expressions
    • implicit type conversion
    • logical and bitwise operators
    • new and delete operators and memory management
    • nothrow versions of new and delete
    • {} Lists
    • Lambda expressions
    • Explicit type conversion
  • Functions
    • declaring and defining functions
    • inline, constexpr and [[noreturn]] functions
    • default arguments
    • function overloading
    • function pointers
  • Classes
    • Private and public members
    • Member functions
    • Uniform initialisation
    • Constructors
    • Destructors
    • References
    • Static members
  • Abstraction in C++
    • Classes and abstraction
    • Concrete types
    • Simple inheritance
    • Abstract types
    • Virtual functions
    • Polymorphism
    • Object slicing
    • Base initialisation
  • Allocating and Managing Memory
    • New and delete operators
    • Object copying
    • Moving and Move semantics
    • Copy and move on basic data types
    • Copying and moving containers
    • Copy constructor
    • Assignment operator
    • The this pointer
  • Operator Overloading
    • Operator functions
    • I/O operators
    • Friends
    • Member operators
    • Type Conversions
  • Templates
    • Introduction
    • Parameterised data types
    • Template classes - Declaration and instantiation
    • Template functions
    • Specialisation
    • Variadic templates
    • Aliases
  • Modular programming and Namespaces
    • Namespaces
    • Code composition using namespaces
    • Versioning and inline namespaces
  • Containers and Algorithms
    • Standard library
    • Strings
    • Stream I/O
    • Useful (utility) components - time, type functions, pairs and tuples
    • Containers - vector, list, map, unordered map
    • Algorithms - Iterators and Iterator types
    • Stream Iterators
    • Predicates
    • Standard library algorithms
    • Container algorithms
  • Exceptions and Exception handling
    • Purpose of exceptions
    • Throwing and Catching exceptions
    • Exceptions and derived classes
    • Function exception declarations
    • Unexpected exceptions
    • Exceptions when handling exceptions
    • Resource capture and release
    • noexcept functions
  • Introduction to basic Metaprogramming
    • Type functions - aliases, predicated, function selection, traits
    • iteration and recursion in metaprogramming
    • conditional definition with Enable_if
    • compile time list - Tuple
    • variadic templates
  • Resource management support in C++
    • Resource management pointers
      • unique_ptr
      • shared_ptr
      • weak_ptr
    • allocators
      • default allocator
      • allocator traits
      • pointer traits
      • scoped allocators
  • regular expressions
    • regex
    • regex_match()
    • regex_search()
    • reges_replace()
    • regex_iterator()
    • regex_token_iterator()
    • regex_traits
  • Concurrency and Resource Sharing
    • Memory model
      • location
      • instruction reordering
      • memory order
      • data races
      • atomic types - flags and fences
    • volatile keyword
    • threads and tasks
      • identity - construction and destruction
      • join() and detach()
      • thread_local data
      • mutexes, multiple locks, call_once()
      • condition variables
      • task based concurrency
        • future and promise
        • packaged_task
        • shared_future
      • async()