std::numeric_limits<T>::min (3) - Linux Manuals
std::numeric_limits<T>::min: std::numeric_limits<T>::min
NAME
std::numeric_limits<T>::min - std::numeric_limits<T>::min
Synopsis
Defined in header <limits>
static T min() throw(); (until C++11)
static constexpr T min() noexcept; (since C++11)
Returns the minimum finite value representable by the numeric type T.
For floating-point types with denormalization, min returns the minimum positive normalized value. Note that this behavior may be unexpected, especially when compared to the behavior of min for integral types. To find the value that has no values less than it, use numeric_limits::lowest.
min is only meaningful for bounded types and for unbounded unsigned types, that is, types that represent an infinite set of negative values have no meaningful minimum.
Return value
T std::numeric_limits<T>::min()
/* non-specialized */ T()
bool false
char CHAR_MIN
signed char SCHAR_MIN
unsigned char 0
wchar_t WCHAR_MIN
char8_t 0
char16_t 0
char32_t 0
short SHRT_MIN
unsigned short 0
int INT_MIN
unsigned int 0
long LONG_MIN
unsigned long 0
long long LLONG_MIN
unsigned long long 0
float FLT_MIN
double DBL_MIN
long double LDBL_MIN
Example
Demonstrates the use with typedef types, and the difference in the sign of the result between integer and floating-point types
// Run this code
Possible output:
See also
lowest returns the lowest finite value of the given type
[static] (C++11)
denorm_min returns the smallest positive subnormal value of the given floating-point type
[static]
max returns the largest finite value of the given type
[static]