Header Reference: <type_traits>
Header Reference: <type_traits>
Compile-time type queries, transformations, and trait utilities from <type_traits>.
Header Reference: <type_traits>
Compile-time type queries, transformations, and trait utilities from <type_traits>.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Header reference pages are meant to answer a practical question quickly: what this header provides, when to reach for it, and which usage rules are easiest to get wrong.
<type_traits>is_same, is_integral, is_enum, is_class, is_trivially_copyableremove_reference, remove_cv, add_pointer, decayconditional, enable_if, common_typeintegral_constant, bool_constant, true_type, false_typeinvoke_result, is_invocableUse <type_traits> when generic code must branch, constrain, or transform types at compile time.
common_type or underlying_type#include <type-traits>
int main() {
// Start with the primary facility from <type-traits>.
// Then verify lifetime, invalidation, ordering, or error-handling rules.
return 0;
}