#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_LIMITS_H
#define LLVM_LIBC_SRC___SUPPORT_CPP_LIMITS_H
#include "hdr/limits_macros.h"
#include "src/__support/CPP/type_traits/is_integral.h"
#include "src/__support/CPP/type_traits/is_signed.h"
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
namespace LIBC_NAMESPACE_DECL {
namespace cpp {
namespace internal {
template <typename T, T min_value, T max_value> struct integer_impl { … };
}
template <class T> struct numeric_limits { … };
template <>
struct numeric_limits<short>
: public internal::integer_impl<short, SHRT_MIN, SHRT_MAX> { … };
template <>
struct numeric_limits<unsigned short>
: public internal::integer_impl<unsigned short, 0, USHRT_MAX> { … };
template <>
struct numeric_limits<int>
: public internal::integer_impl<int, INT_MIN, INT_MAX> { … };
template <>
struct numeric_limits<unsigned int>
: public internal::integer_impl<unsigned int, 0, UINT_MAX> { … };
template <>
struct numeric_limits<long>
: public internal::integer_impl<long, LONG_MIN, LONG_MAX> { … };
template <>
struct numeric_limits<unsigned long>
: public internal::integer_impl<unsigned long, 0, ULONG_MAX> { … };
template <>
struct numeric_limits<long long>
: public internal::integer_impl<long long, LLONG_MIN, LLONG_MAX> { … };
template <>
struct numeric_limits<unsigned long long>
: public internal::integer_impl<unsigned long long, 0, ULLONG_MAX> { … };
template <>
struct numeric_limits<char>
: public internal::integer_impl<char, CHAR_MIN, CHAR_MAX> { … };
template <>
struct numeric_limits<signed char>
: public internal::integer_impl<signed char, SCHAR_MIN, SCHAR_MAX> { … };
template <>
struct numeric_limits<unsigned char>
: public internal::integer_impl<unsigned char, 0, UCHAR_MAX> { … };
#ifdef LIBC_TYPES_HAS_INT128
template <>
struct numeric_limits<__uint128_t>
: public internal::integer_impl<__uint128_t, 0, ~__uint128_t(0)> { … };
#endif
}
}
#endif