ADVANCE YOUR PROGRAMMING SKILLS IN C++

Moving Up to Modern C++

Course Outline

C++ Timeline

Goals for C++11/14

Part I: The Simpler Core Language Features

  • auto, decltype, trailing return type
  • non-member begin/end (and variations)
  • nullptr
  • Generalized function return type deduction
  • auto vs. decltype(auto)
  • Range-based for loop
  • >> in template specializations
  • static_assert
  • noexcept
  • Initialization
    • Initializer lists
    • Uniform initialization
    • Prevention of narrowing
  • extern template
  • Variadic templates
  • constexpr functions in C++11 and C++14
  • constexpr data
  • Template alias
  • C++14 variable templates
  • Unicode and raw string literals
  • Inline namespaces
  • Attributes
  • Fixed-width integer types
  • Scoped enums
  • Generalized unions and PODs
  • Other misc. features


Part II: Larger Language Features

  • Lambdas
    • Capture modes
      • Avoid default capture modes (from EMC++)
    • Lambdas as "local functions"
    • C++14 generic lambdas
  • Move semantics
    • The meanings of 'lvalue' and 'rvalue'
    • rvalue references
    • The move operations
    • Universal References
    • Reference collapsing
    • Perfect forwarding
      • Perfect forwarding failure cases (from EMC++)
    • The Rule of 5
    • C++14 generalized lambda capture


Part III: Features Specific to Class Design

  • Generated functions: =default / =delete
  • Override control: override / final
  • Delegating constructors
  • Inheriting constructors
  • Increased flexibility for in-class initializers
  • New rules for static data members
  • Explicit conversion operators
  • Reference-qualified member functions


Part IV: Concurrency

  • Threads
    • Make std::threads unjoinable on all paths (from EMC++)
  • Passing arguments to threads
  • Data lifetime considerations
  • Synchronization with mutexes and locking
  • Acquiring multiple locks
  • mutex types
  • Returning values from threads using futures and async
  • Launch policies
  • Querying future status
    • Use launch::async policy when asynchronicity is essential (from EMC++)
  • Condition variables
  • Thread-local storage
  • Atomics
  • Consider void futures for one-shot event communications (from EMC++, optional)


Part V: New Library Components

  • std::tuple
  • Type Traits
    • Traits classes
    • Tag dispatch
    • Type predicates and transformations
    • SFINAE
    • std::enable_if
  • New Function/Function Object Facilities
    • std::function
    • std::bind
  • Smart Pointers
    • std::unique_ptr
    • std::shared_ptr
    • std::make_shared/std::make_unique
  • Fixed-length Array
    • std::array
  • Hash-based Containers
    • std::unordered_*
  • Performance enhancements


Online Resources

Contact Us | Pricing | Copyright © 2024 by Leor Zolman | Links