HomeGlossary
C++ Glossary
Definitions for the acronyms, idioms, and terms that come up constantly in C++ codebases, code reviews, and the standard itself.
A
- ABIApplication Binary Interface
- The low-level calling conventions, name mangling rules, and layout guarantees that allow separately compiled translation units to interoperate. Breaking ABI compatibility requires recompiling all consumers.
- ADLArgument-Dependent Lookup
- Name lookup that searches namespaces of a function argument's type in addition to the current scope. Enables unqualified calls like `std::swap(a, b)` to find the right overload. Full reference →
- ASOAllocator-aware / Allocator State Object
- An object that carries an allocator alongside its data. Standard containers are allocator-aware, meaning they propagate the allocator through copy/move according to allocator traits.
C
- CRTPCuriously Recurring Template Pattern
- A pattern where a class derives from a template instantiation of itself: `class Derived : public Base<Derived>`. Used to simulate virtual dispatch at compile time and mixin functionality without vtables. Full reference →
- CTADClass Template Argument DeductionC++17
- C++17 feature allowing the compiler to deduce template arguments of a class template from constructor arguments: `std::pair p{1, 2.0}` instead of `std::pair<int, double> p{1, 2.0}`. Extended with deduction guides. Full reference →
E
- EBCOEmpty Base Class Optimization
- Same as EBO — the full name for the empty base optimization that allows stateless base classes to occupy zero bytes.
- EBOEmpty Base Optimization
- The compiler is permitted (and usually required) to give an empty base class zero size when its subobject layout would otherwise waste a byte. Used by `std::tuple` and smart pointers to store stateless allocators/deleters at no cost.
I
- ICEIntegral Constant Expression
- A compile-time integer value. Required in contexts like array bounds, template non-type parameters, and `static_assert` conditions. Superseded by the broader `constexpr` category in modern C++.
- IFNDRIll-Formed, No Diagnostic Required
- A program that violates a rule the compiler is not required to detect — such as ODR violations across translation units. The behavior is completely undefined and the compiler may silently miscompile. More dangerous than regular undefined behavior.
- ILP64 / LP64 / LLP64Integer/Long/Long-Long 64-bit data models
- Platform-dependent type-size conventions. LP64 (Linux/macOS): `long` is 64-bit, `int` is 32-bit. LLP64 (Windows): `long long` is 64-bit, `long` is 32-bit. Affects portable integer code — prefer `int64_t` over `long`.
M
- MVPMost Vexing Parse
- The C++ parsing rule that prefers function-declaration interpretations: `Widget w(Foo());` declares a function, not a `Widget` object. Resolved with brace-initialization: `Widget w{Foo{}};`.
N
- NRVONamed Return Value Optimization
- A copy-elision optimization where the compiler constructs a named local variable directly in the return slot, eliminating the move or copy on return. Mandated (or at least permitted) by the standard; C++17 mandates RVO for prvalues. Full reference →
- NTTNon-Type Template Parameter
- A template parameter that is a compile-time value rather than a type: `template<int N>`, `template<auto V>` (C++17). C++20 expanded NTTPs to allow floating-point and structural class types. Full reference →
- NTTPNon-Type Template Parameter
- Same as NTT — the two-letter acronym variant. A template parameter bound to a compile-time value rather than a type. Full reference →
O
- ODROne Definition Rule
- A C++ rule stating that every non-inline entity may have only one definition across the entire program, while headers (which may be included many times) must define things identically in every translation unit. Violations are IFNDR. Full reference →
P
- PIMPLPointer to Implementation (also: Opaque Pointer)
- A design pattern where a class stores its data members behind a pointer to a forward-declared implementation struct. Achieves ABI stability and hides private members from public headers.
- PMRPolymorphic Memory Resource
- The `std::pmr` namespace (C++17) that provides `std::pmr::memory_resource` and pre-built resources like `monotonic_buffer_resource` and `unsynchronized_pool_resource` for arena-style allocation without changing container types.
- PODPlain Old Data
- A type with trivial constructors/destructors, no virtual functions, and standard layout — safe to `memcpy` and use with C APIs. The strict POD concept was split into `TrivialType` and `StandardLayout` in C++11; `std::is_pod` is deprecated in C++20.
R
- RAIIResource Acquisition Is Initialization
- The C++ idiom of binding resource lifetimes to object lifetimes: a constructor acquires a resource (file handle, mutex, memory) and the destructor releases it. Guarantees exception-safe cleanup. Foundation of all smart pointers. Full reference →
- RVOReturn Value Optimization
- Copy elision for a returned prvalue: the compiler constructs the return object directly at the call site, skipping move construction. Mandatory since C++17 for prvalue returns. Full reference →
S
- SFINAESubstitution Failure Is Not An Error
- A template resolution rule: if substituting template arguments into a parameter type or return type produces an ill-formed expression, that overload is silently removed from the candidate set instead of causing a compile error. The old way to constrain templates; replaced by Concepts in C++20. Full reference →
- SSOSmall String Optimization
- An optimization where `std::string` stores short strings (typically ≤15 bytes) inline in the string object itself, avoiding a heap allocation. Implementation detail of most standard library implementations.
T
- TMPTemplate Metaprogramming
- Using C++ templates to perform computations at compile time. Enables zero-cost abstractions and type-level algorithms. Modern C++ replaces most TMP with `constexpr`, `consteval`, and Concepts. Full reference →
- TUTranslation Unit
- The unit of compilation: a source file after preprocessing (all includes expanded). The C++ compilation model compiles one TU at a time; the linker combines the resulting object files. Full reference →
U
- UBUndefined Behavior
- A program construct for which the C++ standard imposes no requirements — the compiler may do anything, including silent miscompilation, nasal demons, or (worst case) appearing to work correctly in debug builds.
- UDLUser-Defined Literal
- A suffix operator that allows literals like `42_km`, `1.5_kg`, or `"hello"sv`. The standard library uses UDLs for `std::string_view` (`sv`), `std::string` (`s`), `std::chrono` durations (`1h`, `30min`), and complex numbers. Full reference →
V
- VTableVirtual Function Table (vtable)
- A per-class table of function pointers generated by the compiler to implement runtime polymorphism. Objects of polymorphic types hold a hidden pointer (`vptr`) to their class's vtable. Virtual calls cost one pointer indirection.
Missing a term? Open an issue or PR.