# **[](https://en.cppreference.com/w/cpp/header/type_traits)** provides type introspection and transformation templates: `std::is_integral`, `std::is_pointer`, `std::remove_reference`, `std::enable_if`, and many others. Use them to write generic code that adapts to type properties at compile time. Concepts (C++20) often replace manual type trait checks, but traits remain useful for SFINAE and metaprogramming. ## Example This example queries type traits to detect whether types are integral or pointer types, enabling conditional behavior. ```cpp // compile: g++ -std=c++11 -o typetraitsexample typetraitsexample.cpp // run: ./typetraitsexample // description: type trait checks #include #include template void describe() { if (std::is_integral_v) { std::cout << "integral type\n"; } if (std::is_pointer_v) { std::cout << "pointer type\n"; } } int main() { describe(); describe(); describe(); return 0; } ```