Skip to content

C++ Feature Reference Card

A structured quick-reference index covering all major features from C++98 through C++23. Features with existing reference cards are clickable links leading to core API signatures, minimal compilable examples, embedded systems applicability, and compiler support details. Features without reference cards are listed as plain text and will be gradually added in future batches.

Need a quick syntax check for a feature? Look here. Want to learn systematically? Check out the corresponding tutorial chapter.

Quick Navigation

By standard version:C++98/03 | C++11 | C++14 | C++17 | C++20 | C++23

By functional category:Memory Management | Containers & Views | Concurrency | Core Language Features | Templates & Metaprogramming

Legend

  • Applicability: High = strongly recommended for embedded, Medium = use case dependent, Low = rarely needed
  • Blue links = reference card available, plain text = reference card pending
  • "Language feature" in the header file column indicates a core language mechanism that requires no #include

By Standard Version

C++98/03

C++98 (ISO/IEC 14882:1998) is the first ISO-standardized version, establishing the three pillars of STL containers/algorithms/iterators, exception handling, namespaces, and templates—mechanisms that remain the daily foundation of C++ programming today. C++03 is a defect report release that only clarified details like value initialization semantics, with no major new features.

FeatureHeaderSummaryApplicability
STL containers (vector, list, deque, map, set...)<vector> etc.Sequential/associative/unordered container familyHigh
STL algorithms (sort, find, transform...)<algorithm>Sorting, searching, transforming, and other generic algorithmsHigh
STL iterators<iterator>Unified traversal interfaceHigh
std::string<string>Variable-length stringHigh
iostream<iostream>Type-safe I/O streamsMedium
RAII (construct/destruct/copy semantics)Language featureRAII (Resource Acquisition Is Initialization)High
Exception handling (try/catch/throw)Language featureStructured error handlingMedium
Namespaces (namespace)Language featurePreventing name collisionsHigh
Class templates / function templatesLanguage featureFoundation of generic programmingHigh
Operator overloadingLanguage featureCustom type operation behaviorMedium
Function objects (functors)<functional>Callable objects and adaptersMedium
RTTI (dynamic_cast, typeid)<typeinfo>Run-time type identificationLow
std::complex / std::valarray<complex>Numerical computation supportLow

C++11

C++11 is the starting point of modern C++, bringing revolutionary features like lambda expressions, auto, move semantics, smart pointers, and the concurrency support library. Starting from this version, C++ evolved from "C with classes" into a truly efficient abstraction language—this is the first stop for learning Modern C++.

FeatureHeaderSummaryApplicability
std::unique_ptr<memory>Unique pointerHigh
std::shared_ptr<memory>Shared pointerMedium
std::weak_ptr<memory>Breaking shared_ptr cyclic referencesMedium
lambda expressionLanguage featureAnonymous function objectsHigh
autoLanguage featureAutomatic type deductionHigh
decltypeLanguage featureExpression type queryHigh
constexprLanguage featureCompile-time constants and functionsHigh
Range-forLanguage featureContainer traversal syntactic sugarHigh
Move semantics (rvalue reference)Language featureResource transfer instead of copyingHigh
std::move / std::forward<utility>Move and perfect forwarding utilitiesHigh
nullptrLanguage featureType-safe null pointer constantHigh
enum classLanguage featureScoped strongly-typed enumerationHigh
override / finalLanguage featureExplicit virtual function annotationsHigh
static_assertLanguage featureCompile-time assertionHigh
Variadic templatesLanguage featureArbitrary number of template parametersHigh
std::initializer_list<initializer_list>Uniform initialization listHigh
std::array<array>Compile-time fixed-size arrayHigh
std::tuple<tuple>Heterogeneous fixed-size containerMedium
std::unordered_map / set<unordered_map>Hash table containersMedium
std::function<functional>Polymorphic function wrapperMedium
User-defined literalLanguage featureCustom literal suffixesMedium
Delegating/inheriting constructorsLanguage featureConstructor reuseMedium
alignas / alignofLanguage featureAlignment control and queryMedium
std::thread<thread>Platform-independent threadHigh
std::mutex / lock_guard<mutex>Mutex and RAII lockHigh
std::atomic<atomic>Lock-free atomic operationHigh
std::condition_variable<condition_variable>Condition variable synchronizationMedium
std::future / async<future>Asynchronous tasks and result retrievalMedium
std::chrono<chrono>Time libraryHigh

C++14

C++14 refines and polishes C++11—relaxing constexpr restrictions, introducing generic lambda expressions and std::make_unique. The changes are modest but highly practical, and almost all features can be used directly in embedded development.

FeatureHeaderSummaryApplicability
std::make_unique<memory>Exception-safe unique_ptr creationHigh
Generic lambdaLanguage featureLambda parameters using autoHigh
Return type deduction (auto return)Language featureFunction return value auto deductionMedium
constexpr extensionsLanguage featureRelaxed constexpr restrictions (loops/local variables)High
decltype(auto)Language featurePerfect forwarding return type deductionMedium
std::exchange<utility>Replace and return old valueMedium
std::integer_sequence<utility>Compile-time integer sequenceMedium
Binary literals (0b)Language feature0b-prefixed binary integersMedium
Digit separators (')Language featureApostrophe-separated digits for readabilityLow
std::shared_timed_mutex<shared_mutex>Timed shared mutexLow

C++17

C++17 introduces high-frequency features like structured bindings, if constexpr, string_view, optional, and variant, significantly improving the expressiveness of daily coding. CTAD and guaranteed copy elision eliminate a lot of boilerplate code, and std::filesystem fills the gap in file operations.

FeatureHeaderSummaryApplicability
std::optional<optional>Optional value wrapperHigh
std::variant<variant>Type-safe unionMedium
std::string_view<string_view>Zero-copy string viewHigh
std::any<any>Type-safe any value containerLow
std::filesystem<filesystem>File system operationsMedium
Structured bindingLanguage featureMultiple return value destructuringHigh
if constexprLanguage featureCompile-time conditional branchingHigh
Fold expressionsLanguage featureParameter pack expansion operationsHigh
CTADLanguage featureClass template argument deductionHigh
Guaranteed copy elisionLanguage featureMandatory elimination of temporary object copiesHigh
std::invoke<functional>Unified call interfaceMedium
std::apply<tuple>Tuple expansion as function argumentsMedium
Inline variablesLanguage featureDefining global variables in headersMedium
std::byte<cstddef>Standalone byte typeMedium
std::pmr memory resources<memory_resource>Polymorphic allocator memory resourcesMedium
std::shared_mutex<shared_mutex>Read-write lockMedium
Nested namespaces (A::B::C)Language featureNamespace shorthandLow
if/switch initializer statementsLanguage featureVariable declarations inside conditional statementsMedium

C++20

C++20 is the largest update since C++11: four major features—Concepts, Ranges, Coroutines, and Modules—fundamentally change template programming, data pipelines, asynchronous flows, and code organization. At the same time, std::format, std::span, and three-way comparison significantly improve the daily development experience. Higher compiler support is required (GCC 10+ / Clang 10+).

FeatureHeaderSummaryApplicability
Concepts<concepts>Compile-time template parameter constraintsHigh
Ranges<ranges>Composable ranges and viewsHigh
std::span<span>Non-owning view over a contiguous sequenceHigh
std::format<format>Type-safe formatted outputHigh
std::jthread<thread>Auto-joining thread classHigh
Three-way comparison (<=>)<compare>Unified comparison operatorHigh
Coroutines<coroutine>Stackless coroutinesHigh
ModulesLanguage featureCompilation units replacing headersHigh
constevalLanguage featureForced compile-time evaluationMedium
constinitLanguage featureCompile-time static variable initializationMedium
std::source_location<source_location>Compile-time source code location informationMedium
Designated initializerLanguage featureAggregate initialization by member nameMedium
std::atomic_ref<atomic>Atomic reference operationsMedium
std::latch / barrier<latch>Thread synchronization primitivesMedium
std::stop_token<stop_token>Cooperative thread cancellationMedium
std::erase / erase_if<vector> etc.Unified interface for container element removalMedium
std::is_constant_evaluated<type_traits>Detecting compile-time evaluation contextMedium
Range-for initializer statementsLanguage featureRange-for with initializerLow

C++23

C++23 polishes and fills gaps in C++20: practical library components like std::expected, std::print, std::generator, and std::flat_map fill critical voids, while language improvements like deducing this streamline member function syntax. Compiler support for some features is still in progress (GCC 14+ / Clang 18+).

FeatureHeaderSummaryApplicability
std::expected<expected>Error handling wrapper typeMedium
std::print / println<print>Formatted output to stdoutHigh
std::generator<generator>Coroutine synchronous generatorMedium
std::flat_map / flat_set<flat_map>Sorted containers based on contiguous storageMedium
std::mdspan<mdspan>Non-owning multidimensional array viewMedium
std::stacktrace<stacktrace>Backtrace capture and printingMedium
Deducing thisLanguage featureExplicit object parameter deductionMedium
std::to_underlying<utility>Enum to underlying type conversionMedium
std::out_ptr / inout_ptr<memory>Smart pointer and C pointer interopMedium
Optional monadic operations<optional>and_then / or_else / transformMedium
New Ranges adapters<ranges>zip / chunk / slide / enumerate etc.Medium
if constevalLanguage featureCompile-time evaluation conditional checkLow
std::unreachable<utility>Mark unreachable codeLow
Multidimensional subscript operatorLanguage featureoperator[] accepting multiple argumentsLow
std::is_scoped_enum<type_traits>Detect scoped enum typesLow

By Functional Category

Memory Management

Smart pointers, optional values, error handling, and other memory and resource management features. See Memory Management Reference Card.

FeatureVersionHeaderSummaryApplicability
std::unique_ptrC++11<memory>Unique pointerHigh
std::shared_ptrC++11<memory>Shared pointerMedium
std::weak_ptrC++11<memory>Breaking shared_ptr cyclic referencesMedium
std::make_uniqueC++14<memory>Exception-safe unique_ptr creationHigh
std::optionalC++17<optional>Optional value wrapperHigh
std::pmr memory resourcesC++17<memory_resource>Polymorphic allocator memory resourcesMedium
std::expectedC++23<expected>Error handling wrapper typeMedium
std::out_ptr / inout_ptrC++23<memory>Smart pointer and C pointer interopMedium
Optional monadic operationsC++23<optional>and_then / or_else / transformMedium
Pending Reference Cards

The following features do not have reference cards yet: std::weak_ptr, std::pmr memory resources, std::out_ptr / inout_ptr, optional monadic operations

Containers & Views

Standard containers, views, strings, formatting, algorithms, and other data organization and manipulation features. See Containers & Views Reference Card.

FeatureVersionHeaderSummaryApplicability
STL containers (vector, list, deque, map, set...)C++98<vector> etc.Sequential/associative/unordered container familyHigh
STL algorithmsC++98<algorithm>Sorting, searching, transforming, and other generic algorithmsHigh
std::stringC++98<string>Variable-length stringHigh
std::arrayC++11<array>Compile-time fixed-size arrayHigh
std::tupleC++11<tuple>Heterogeneous fixed-size containerMedium
std::unordered_map / setC++11<unordered_map>Hash table containersMedium
std::functionC++11<functional>Polymorphic function wrapperMedium
std::string_viewC++17<string_view>Zero-copy string viewHigh
std::variantC++17<variant>Type-safe unionMedium
std::anyC++17<any>Type-safe any value containerLow
std::filesystemC++17<filesystem>File system operationsMedium
RangesC++20<ranges>Composable ranges and viewsHigh
std::spanC++20<span>Non-owning view over a contiguous sequenceHigh
std::formatC++20<format>Type-safe formatted outputHigh
std::erase / erase_ifC++20<vector> etc.Unified interface for container element removalMedium
std::flat_map / flat_setC++23<flat_map>Sorted containers based on contiguous storageMedium
std::generatorC++23<generator>Coroutine synchronous generatorMedium
std::print / printlnC++23<print>Formatted output to stdoutHigh
std::mdspanC++23<mdspan>Non-owning multidimensional array viewMedium
New Ranges adaptersC++23<ranges>zip / chunk / slide / enumerate etc.Medium
Pending Reference Cards

The following features do not have reference cards yet: STL containers, STL algorithms, std::string, std::tuple, std::unordered_map/set, std::function, std::any, Ranges, std::erase/erase_if, std::mdspan, new Ranges adapters

Concurrency

Threads, locks, atomic operations, synchronization primitives, and other concurrency and multithreading features. See Concurrency Reference Card.

FeatureVersionHeaderSummaryApplicability
std::threadC++11<thread>Platform-independent threadHigh
std::mutex / lock_guardC++11<mutex>Mutex and RAII lockHigh
std::atomicC++11<atomic>Lock-free atomic operationHigh
std::condition_variableC++11<condition_variable>Condition variable synchronizationMedium
std::future / asyncC++11<future>Asynchronous tasks and result retrievalMedium
std::chronoC++11<chrono>Time libraryHigh
std::shared_timed_mutexC++14<shared_mutex>Timed shared mutexLow
std::shared_mutexC++17<shared_mutex>Read-write lockMedium
std::jthreadC++20<thread>Auto-joining thread classHigh
std::atomic_refC++20<atomic>Atomic reference operationsMedium
std::latch / barrierC++20<latch>Thread synchronization primitivesMedium
std::stop_tokenC++20<stop_token>Cooperative thread cancellationMedium
Pending Reference Cards

The following features do not have reference cards yet: std::condition_variable, std::future / async, std::chrono, std::shared_timed_mutex, std::shared_mutex, std::atomic_ref, std::latch / barrier, std::stop_token

Core Language Features

Keywords, syntactic sugar, type systems, compile-time mechanisms, and other core language features. See Core Language Reference Card.

FeatureVersionHeaderSummaryApplicability
RAII (construct/destruct/copy)C++98Language featureRAII (Resource Acquisition Is Initialization)High
Exception handlingC++98Language featureStructured error handlingMedium
NamespacesC++98Language featurePreventing name collisionsHigh
Operator overloadingC++98Language featureCustom type operation behaviorMedium
iostreamC++98<iostream>Type-safe I/O streamsMedium
lambda expressionC++11Language featureAnonymous function objectsHigh
autoC++11Language featureAutomatic type deductionHigh
decltypeC++11Language featureExpression type queryHigh
constexprC++11Language featureCompile-time constants and functionsHigh
Range-forC++11Language featureContainer traversal syntactic sugarHigh
Move semantics (rvalue reference)C++11Language featureResource transfer instead of copyingHigh
std::move / std::forwardC++11<utility>Move and perfect forwarding utilitiesHigh
nullptrC++11Language featureType-safe null pointerHigh
enum classC++11Language featureScoped strongly-typed enumerationHigh
override / finalC++11Language featureExplicit virtual function annotationsHigh
static_assertC++11Language featureCompile-time assertionHigh
User-defined literalC++11Language featureCustom literal suffixesMedium
Delegating/inheriting constructorsC++11Language featureConstructor reuseMedium
alignas / alignofC++11Language featureAlignment control and queryMedium
Generic lambdaC++14Language featureLambda parameters using autoHigh
Return type deductionC++14Language featureFunction return value autoMedium
constexpr extensionsC++14Language featureRelaxed constexpr restrictionsHigh
decltype(auto)C++14Language featurePerfect forwarding return type deductionMedium
Binary literalsC++14Language feature0b-prefixed binary integersMedium
Structured bindingC++17Language featureMultiple return value destructuringHigh
if constexprC++17Language featureCompile-time conditional branchingHigh
CTADC++17Language featureClass template argument deductionHigh
Guaranteed copy elisionC++17Language featureMandatory elimination of temporary object copiesHigh
Inline variablesC++17Language featureDefining global variables in headersMedium
std::byteC++17<cstddef>Standalone byte typeMedium
Nested namespacesC++17Language featureA::B::C shorthandLow
if/switch initializer statementsC++17Language featureVariable declarations inside conditional statementsMedium
Three-way comparison (<=>)C++20<compare>Unified comparison operatorHigh
CoroutinesC++20<coroutine>Stackless coroutinesHigh
ModulesC++20Language featureReplacing headersHigh
constevalC++20Language featureForced compile-time evaluationMedium
constinitC++20Language featureCompile-time static initializationMedium
std::source_locationC++20<source_location>Compile-time source code locationMedium
Designated initializerC++20Language featureAggregate initialization by member nameMedium
Deducing thisC++23Language featureExplicit object parameter deductionMedium
std::to_underlyingC++23<utility>Enum to underlying type conversionMedium
std::unreachableC++23<utility>Mark unreachable codeLow
if constevalC++23Language featureCompile-time evaluation conditional checkLow
Multidimensional subscript operatorC++23Language featureoperator[] with multiple argumentsLow
std::stacktraceC++23<stacktrace>Backtrace capture and printingMedium
Pending Reference Cards

The following features do not have reference cards yet: move semantics, static_assert, user-defined literal, delegating/inheriting constructors, alignas / alignof, return type deduction, constexpr extensions, decltype(auto), binary literals, CTAD, guaranteed copy elision, std::byte, if/switch initializer statements, consteval, constinit, std::source_location, designated initializer, std::to_underlying, std::unreachable, if consteval, multidimensional subscript operator, std::stacktrace

Templates & Metaprogramming

Templates, constraints, type traits, compile-time computation, and other generic programming and metaprogramming features. See Templates & Metaprogramming Reference Card.

FeatureVersionHeaderSummaryApplicability
Class templates / function templatesC++98Language featureFoundation of generic programmingHigh
Variadic templatesC++11Language featureArbitrary number of template parametersHigh
std::initializer_listC++11<initializer_list>Uniform initialization listHigh
std::integer_sequenceC++14<utility>Compile-time integer sequenceMedium
Fold expressionsC++17Language featureParameter pack expansion operationsHigh
std::invokeC++17<functional>Unified call interfaceMedium
std::applyC++17<tuple>Tuple expansion as function argumentsMedium
ConceptsC++20<concepts>Compile-time template parameter constraintsHigh
std::is_constant_evaluatedC++20<type_traits>Detecting compile-time contextMedium
std::is_scoped_enumC++23<type_traits>Detecting scoped enumerationsLow
Pending Reference Cards

The following features do not have reference cards yet: std::integer_sequence, std::invoke, std::apply, std::is_constant_evaluated, std::is_scoped_enum


Some content referenced from cppreference.com, licensed under CC-BY-SA 4.0

Built with VitePress