Neueda
Shape

Course

Advanced C++ Programming

This course is intended to teach C++ programmers more about the language and how to use it properly. This course is divided into four sections.

Duration: 5 days

Who is it for: This course is for experienced C++ programmers.

Layout: This training course combines lectures with practical exercises that help the delegates to put what they have learned on the training course into practice.  The exercises specifically build on what has been recently taught and are built up as the training course progresses.

Objectives

  • Using Language Features Correctly: this looks at various language areas that people may not know in detail, and where there may be confusion about exactly how things work. This first section gives students a solid foundation for the rest of the course.
  • Templates: students may well be familiar with templates to an extent, but even if they are, there are facets that they may not know. And since they form the basis of modern C++ (and hence most of the rest of the course), they need to be covered in depth.
  • C++ Idioms and Design Patterns: The unique features of C++ (specifically manual memory management and templates) present challenges to the programmer, and provide ways to overcome them. This section looks at a number of idioms and patterns, showing how they can be implemented in C++.
  • Standard Libraries: The final section looks at both the Standard Library and Boost, examining both in some detail.

Modules

Const and Casting

  • Const correctness
  • Overloading on const
  • C++ cast operators
  • Mutable

Conversions and Scope

  • Standard conversions
  • Converting constructors
  • User defined conversions
  • Namespaces
  • Koenig lookup
  • Nested types
  • Static

Proper Exception Handling

  • Throwing and catching correctly
  • Exception safe code

Memory Management

  • The new handler
  • Placement new
  • Overloading new and delete

Template Functions

  • What are templates?
  • Implementing template functions
  • Template instantiation

Template Classes

  • Creating a template class
  • Class instantiation
  • Non-type template parameters
  • Specialization

Template Metaprogramming

  • A brief introduction to metaprogramming

Implementing Value Types

  • What are value types?
  • Construction and destruction
  • Copying and assignment
  • Operator overloading

The Handle/body Idiom

  • The Bridge design pattern
  • Using Bridge to decouple compilation
  • Implementing handle/body

Functors

  • What are functors?
  • Implementing functors using operator overloading

Smart Pointers

  • What are smart pointers?
  • Uses of smart pointers in C++
  • Implementing a simple smart pointer
  • Reference counting and smart pointers
  • Std::auto_ptr

Singletons

  • The Singleton design pattern
  • A naïve implementation
  • Problems with Singleton in C++
  • Controlling Singleton lifetime

STL Concepts

  • Concept-based programming
  • Containers, iterators and algorithms

STL Containers

  • Sequence containers
  • Associative containers
  • Adapters

STL Traits

  • The need for traits
  • Implementation of traits in STL

STL Iterators

  • The Iterator design pattern
  • Iterator concepts in C++
  • Iterators and containers
  • Implementing and using iterators
  • Stream iterators

STL Algorithms

  • The STL standard algorithms
  • Creating and using algorithms

Introduction to Boost

  • What is Boost?
  • Obtaining and installing Boost
  • Overview of the Boost libraries

Common Boost Libraries

  • boost::tuple
  • boost::any
  • boost::ref
  • The Boost smart pointers
  • boost::bind

Enquire about this course

"*" indicates required fields

By submitting this form, you agree to our Privacy Policy.
This field is for validation purposes and should be left unchanged.