# **[](https://en.cppreference.com/w/cpp/header/limits)** provides `std::numeric_limits`, a traits class that gives you compile-time constants about numeric types: `std::numeric_limits::max()`, `std::numeric_limits::epsilon()`, etc. Use it to write generic code that adapts to the numeric type without hardcoding values. ## Example This example queries the maximum, minimum, and epsilon values for various numeric types at compile time. ```cpp // compile: g++ -std=c++11 -o limitsexample limitsexample.cpp // run: ./limitsexample // description: query numeric limits #include #include int main() { std::cout << "int max: " << std::numeric_limits::max() << "\n"; std::cout << "float epsilon: " << std::numeric_limits::epsilon() << "\n"; std::cout << "double min: " << std::numeric_limits::min() << "\n"; return 0; } ```