0Pricing
C++ Academy · Lesson

Range-based for nullptr and enum class

Use C++11 conveniences: range-based for, nullptr, and strongly typed enums.

Three C++11 Quick Wins

C++11 brought many small improvements. Three you will use every day: range-based for, nullptr, and enum class.

Range-Based for Recap

Iterate any container that has begin() and end() without index arithmetic.

for (const auto& x : v) {
    process(x);
}

All lessons in this course

  1. auto decltype and Type Deduction
  2. Range-based for nullptr and enum class
  3. Lambda Expressions Capture Mutable Generic
  4. Structured Bindings and if-init C++17
← Back to C++ Academy