Type support library

Curated hub for C++ type support: traits, transformations, numeric limits, fixed language support types, and RTTI/type identity utilities.

The C++ type support library provides the reusable machinery that generic code uses to inspect, transform, classify, and compare types. It also hosts fixed support types such as size_t, ptrdiff_t, and nullptr_t, numeric limits, byte/endian helpers, and the runtime type information surfaces built around type_info and type_index.

Use this hub when the question is about type properties and type-support utilities rather than the core language rules for declaring types. Keep language as the home for syntax and type-system semantics, utility for vocabulary types and value movement, and concepts for template constraints.

# Start Here

Ask compile-time questions about a type

Use the traits route when you need to test whether a type is integral, constructible, polymorphic, trivially copyable, or otherwise belongs to a category.

Transform one type into another

Start here for add/remove qualifier helpers, pointer/reference transformations, decay, common-type selection, and type identity tools.

Query representation limits and machine-facing properties

Use limits and representation helpers when code depends on value ranges, alignment, object representation, byte order, or low-level type facts.

Work with runtime type information

Choose the RTTI route when dynamic type inspection, `typeid`, or associative storage keyed by runtime type identity is the main concern.

Use standard fixed support types

Start here when you need the library-defined types that generic code and low-level APIs commonly rely on.

Control templates and overload participation

Use the metaprogramming-oriented route when substitution, detection, trait composition, or overload gating drives the design.

# Quick Map

If you need to...Start withWhyCommon adjacent route
Test a property of a type at compile timetype traitsThe `is_*`, `has_*`, and related traits answer category and capability questions for generic code.concepts
Strip, add, or normalize qualifiers, references, pointers, or array layerstype transformationsThe add/remove/decay family is the canonical route for turning one type form into another.utility
Find a common type or reference across several inputscommon_type or common_referenceThese helpers model type unification rather than simple yes/no property tests.ranges
Inspect value ranges, alignment, or representation limitsnumeric_limits, alignment_of, endianThese are the core type-support entry points for machine-facing facts about types and objects.numerics
Use library-defined fundamental support typessize_t, ptrdiff_t, nullptr_tThese types appear across the library and are the standard entry points for sizes, pointer differences, and null pointer type identity.language types
Perform runtime type inspection or type-keyed lookuptype_info and type_indexThis is the RTTI route when compile-time trait reasoning is not enough.diagnostics
Constrain templates or enable overloads conditionallyenable_if, void_t, conjunctionThese utilities are the traditional metaprogramming route for substitution-based selection.concepts

# Version Highlights

StandardNotable additions hereWhy it changes navigation
C++11core trait expansion, alignment helpers, type_index, underlying_typeEstablished the modern trait-heavy baseline that most generic libraries now assume.
C++14integer aliases and refinements, broader trait cleanupMostly incremental, but relevant for portability when using trait conveniences across older toolchains.
C++17void_t, conjunction, disjunction, byte, object representation helpersAdded the trait-composition toolkit and more explicit representation-oriented support.
C++20remove_cvref, type_identity, endian, is_constant_evaluatedImproved modern generic programming patterns and low-level portability helpers.
C++23reference-from-temporary traits, is_implicit_lifetime, is_scoped_enumExpanded the library's ability to express newer lifetime and type-safety questions directly.
C++26is_virtual_base_of, is_within_lifetimeContinues the trend toward more explicit compile-time reflection of language object-model properties.

# Boundary Lines

If the real question is about...Go here insteadWhy
How types are declared, formed, deduced, or interpreted by the languageLanguage`/cpp/types/` is the library support layer, not the primary home for syntax, declarators, or core type-system rules.
Vocabulary types, move/forward helpers, formatting, or callable wrappersUtilityThe utility hub owns runtime support objects and value-oriented helper facilities, while this page focuses on type-support infrastructure.
Constraints and concept-based template interfacesConceptsTraits often feed concepts, but concept vocabulary and constrained interfaces belong to the concepts hub.
Exceptions, `bad_cast`, or runtime failure behavior as diagnostics concernsDiagnosticsRTTI surfaces touch some diagnostic types, but the full exception/diagnostic taxonomy is elsewhere.
The C compatibility side of support types and limitsC typesThe C side remains a separate library surface with different naming and compatibility concerns.