Namespaces
Variants
Actions

std::numeric_limits

From cppreference.com
< cpp‎ | types
 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Type support
Basic types
Fixed width integer types (C++11)
Fixed width floating-point types (C++23)
(C++11)    
(C++17)
Numeric limits
numeric_limits
C numeric limits interface
Runtime type information
 
 
Defined in header <limits>
template< class T > class numeric_limits;

The std::numeric_limits class template provides a standardized way to query various properties of arithmetic types (e.g. the largest possible value for type int is std::numeric_limits<int>::max()).

This information is provided via specializations of the std::numeric_limits template. The standard library makes available specializations for all arithmetic types (only lists the specializations for cv-unqualified arithmetic types):

Defined in header