auto Type Deduction
auto lets the compiler deduce variable types from initializers, reducing verbosity and improving maintainability.
auto lets the compiler deduce variable types from initializers, reducing verbosity and improving maintainability.
The chrono library provides type-safe time utilities for durations, time points, and clocks. It's designed to prevent common time-related bugs through strong typing.
constexpr indicates values or functions can be evaluated at compile-time, enabling compile-time computation and optimization.
decltype deduces the type of an expression, preserving references and const qualifiers exactly.
C++ evolves through standardized versions released approximately every three years. Each standard adds features, fixes issues, and modernizes the language while maintaining backward compatibility.
C++11 refined value categories into five types: lvalue, prvalue, xvalue, glvalue, and rvalue. Understanding these enables perfect forwarding and move semantics.
Lambdas (C++11) are anonymous functions that can capture variables from surrounding scope, enabling functional programming patterns and convenient callbacks.
noexcept specifies that a function won't throw exceptions, enabling optimizations and stronger guarantees.
Smart pointer with shared ownership via reference counting. Multiple shared_ptrs can own the same object, deleted when last owner destroyed.
Smart pointer with exclusive ownership. Zero overhead, automatic cleanup, move-only semantics. The default choice for dynamic memory.
Non-owning observer of shared_ptr-managed objects. Doesn't increase reference count, enables checking if object still exists.
C++11 brace initialization {} - one syntax for all types. Consistent, safe (prevents narrowing), solves gotchas.
Variadic templates accept any number of arguments of any types. They're the foundation for functions like std::make_tuple, printf, and perfect forwarding.