Advanced C++

Advanced C++

C++ is one of the most powerful and expressive programming languages around. It encourages writing reusable code at many different levels. With this power comes a complexity of the language which has to be understood in order to achieve the best outcome. While the object oriented programming paradigm is common to many programming languages, C++ adds a new layer of abstraction with templates, enabling the generic programming paradigm. Templates have become a fundamental building block of powerful libraries and should be understood by the successful developer.

This course offers an in depth look at advanced topics in C++ programming. The Standard Template Library (STL) offers developers to quickly write powerful code which can be adapted to suit many different needs. Delegates will learn about the STL and how to extend it. They will also learn about generic programming techniques which will allow the delegates to write libraries that combine power with flexibility.

The course Advanced C++ assumes that the delegates have a good understanding of the standard C++ concepts, and they should have some experience in coding C++ for projects.

Module 1: Exceptions

  • Traditional error handling
  • The concept of exceptions
  • throw, try and catch
  • Exception types
  • The throws keyword
  • Good coding practice

Module 2: Operator overloading

  • What is operator overloading
  • Overloading arithmetic operators
  • Which operators can be redefined
  • Function objects
  • What about new and delete
  • Pitfalls

Module 3: Typecasting and const

  • const values, const functions
  • mutable
  • C style typecasting and it’s limitations
  • static_cast and dynamic_cast
  • Implicit casting using constructors
  • User defined typecast

Module 4: Value Semantic

  • What are value semantics?
  • Implementing value semantics
  • Deep or shallow copy
  • Value semantics and containers

Module 5: Templates

  • What are templates?
  • Template function arguments
  • Template classes
  • Passing values in template arguments
  • Member functions
  • Partial template instantiation

Module 6: In Depth STL

  • Set, Bitset, and others
  • Traits
  • Using iterators
  • Iterator types
  • Using of algorithms
  • Interplay with strings and arrays

Module 7: Extending STL

  • Writing algorithms
  • Tweaking container behaviour
  • STL compliant containers
  • Writing adaptors

Module 8: Advanced Streams

  • Controlling output
  • Overloading the output operator
  • Serialisation of objects
  • Handling errors
  • Stream iterators
  • Using stringstream to format strings

Module 9: Introduction to Boost

  • Smart pointers
  • foreach, assign and other utilities
  • Function objects
  • boost::any
  • Advanced string formatting
  • lexical_cast
  • Containers

Module 10: Generic Programming

  • Basic concepts
  • Template Metaprogramming
  • Type lists
  • Type traits
  • Static Assertions
  • Policies
  • Concept checking