NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
Fixed-Size Types and Their Limits
+ Collaboration diagram for Fixed-Size Types and Their Limits:

Classes

class  ncbi_numeric_limits< T >
 
class  ncbi_numeric_limits< char >
 
class  ncbi_numeric_limits< signed char >
 
class  ncbi_numeric_limits< unsigned char >
 
class  ncbi_numeric_limits< wchar_t >
 
class  ncbi_numeric_limits< signed short >
 
class  ncbi_numeric_limits< unsigned short >
 
class  ncbi_numeric_limits< signed int >
 
class  ncbi_numeric_limits< unsigned int >
 
class  ncbi_numeric_limits< signed long >
 
class  ncbi_numeric_limits< unsigned long >
 
class  ncbi_numeric_limits< float >
 
class  ncbi_numeric_limits< double >
 
struct  SAutoMinMaxLimits< T, is_signed >
 
struct  SAutoMinMaxLimits< T, false >
 
struct  SAutoMax
 
struct  SAutoMin
 

Macros

#define NCBI_WIN32_THREADS
 
#define NCBI_THREADS
 
#define NCBI_HAS_CPP_ATTRIBUTE(x)   0
 
#define NCBI_HAS_C_ATTRIBUTE(x)   0
 
#define NCBI_HAS_SCOPED_C_ATTRIBUTE(x)   NCBI_HAS_C_ATTRIBUTE(x)
 
#define NCBI_HAS_SCOPED_ATTRIBUTE(x)   NCBI_HAS_SCOPED_C_ATTRIBUTE(x)
 
#define NCBI_HAS_ATTRIBUTE(x)   NCBI_HAS_C_ATTRIBUTE(x)
 
#define NCBI_HAS_STD_ATTRIBUTE(x)   (NCBI_HAS_C_ATTRIBUTE(x) >= 201904L)
 
#define __has_attribute(x)   0
 
#define NCBI_RESTRICT
 
#define NCBI_LEGACY_DEPRECATED_0
 
#define NCBI_LEGACY_DEPRECATED_1(msg)
 
#define NCBI_STD_DEPRECATED_0   NCBI_LEGACY_DEPRECATED_0
 
#define NCBI_STD_DEPRECATED_1(message)   NCBI_LEGACY_DEPRECATED_1(message)
 
#define NCBI_STD_DEPRECATED(message)   NCBI_STD_DEPRECATED_1(message)
 
#define NCBI_DEPRECATED   NCBI_LEGACY_DEPRECATED_0
 
#define NCBI_WARN_UNUSED_RESULT
 
#define NCBI_FALLTHROUGH
 
#define NCBI_PACKED
 
#define NCBI_UNUSED
 
#define HAVE_THREAD_LOCAL   1
 
#define kMin_Char   CHAR_MIN
 
#define kMax_Char   CHAR_MAX
 
#define kMin_SChar   SCHAR_MIN
 
#define kMax_SChar   SCHAR_MAX
 
#define kMax_UChar   UCHAR_MAX
 
#define kMin_Short   SHRT_MIN
 
#define kMax_Short   SHRT_MAX
 
#define kMax_UShort   USHRT_MAX
 
#define kMin_Int   INT_MIN
 
#define kMax_Int   INT_MAX
 
#define kMax_UInt   UINT_MAX
 
#define kMin_Float   FLT_MIN;
 
#define kMax_Float   FLT_MAX;
 
#define kMin_Double   DBL_MIN;
 
#define kMax_Double   DBL_MAX;
 
#define kMin_I1   SCHAR_MIN
 
#define kMax_I1   SCHAR_MAX
 
#define kMax_UI1   UCHAR_MAX
 
#define kMin_I2   SHRT_MIN
 
#define kMax_I2   SHRT_MAX
 
#define kMax_UI2   USHRT_MAX
 
#define kMin_I4   INT_MIN
 
#define kMax_I4   INT_MAX
 
#define kMax_UI4   UINT_MAX
 
#define kMin_I8   NCBI_MIN_I8
 
#define kMax_I8   NCBI_MAX_I8
 
#define kMax_UI8   NCBI_MAX_UI8
 
#define numeric_limits   ncbi_numeric_limits
 Pre-declaration of the "numeric_limits<>" template Forcibly overrides (using preprocessor) the original "numeric_limits<>"! More...
 
#define NCBI_NUMERIC_LIMITS(type, alias)
 Auxiliary macro to implement (a limited edition of) the "numeric_limits<>" template. More...
 
#define NCBI_NUMERIC_LIMITS_UNSIGNED(type, alias)
 
#define NCBI_FORBID_AUTOMINMAX_OPERATION(op, T1, T2)
 
#define NCBI_FORBID_AUTOMINMAX_OPERATIONS(op)
 
#define NCBI_GET_NUMERIC_LIMITS(type)
 Macro to declare specialized get_limits. More...
 
#define __STDC_CONSTANT_MACROS
 
#define __STDC_FORMAT_MACROS
 
#define NCBI_BIG_TYPE   Int8
 
#define SIZEOF_NCBI_BIG   8
 
#define NCBI_CONST_INT8(v)   INT64_C(v)
 
#define NCBI_CONST_UINT8(v)   UINT64_C(v)
 
#define NCBI_INT8_FORMAT_SPEC   PRId64
 
#define NCBI_UINT8_FORMAT_SPEC   PRIu64
 
#define NCBI_CONST_LONGDOUBLE(v)   v
 

Typedefs

typedef ncbi_numeric_limits< TSAutoMinMaxLimits< T, is_signed >::TStdLim
 
typedef ncbi_numeric_limits< TSAutoMinMaxLimits< T, false >::TStdLim
 
typedef char Char
 Alias for char. More...
 
typedef signed char Schar
 Alias for signed char. More...
 
typedef unsigned char Uchar
 Alias for unsigned char. More...
 
typedef int8_t Int1
 1-byte (8-bit) signed integer More...
 
typedef uint8_t Uint1
 1-byte (8-bit) unsigned integer More...
 
typedef int16_t Int2
 2-byte (16-bit) signed integer More...
 
typedef uint16_t Uint2
 2-byte (16-bit) unsigned integer More...
 
typedef int32_t Int4
 4-byte (32-bit) signed integer More...
 
typedef uint32_t Uint4
 4-byte (32-bit) unsigned integer More...
 
typedef int64_t Int8
 8-byte (64-bit) signed integer More...
 
typedef uint64_t Uint8
 8-byte (64-bit) unsigned integer More...
 
typedef Int8 Ncbi_BigScalar
 Define large scalar type. More...
 
typedef int intptr_t
 
typedef unsigned int uintptr_t
 

Functions

static char ncbi_numeric_limits< char >::min () THROWS_NONE
 
static char ncbi_numeric_limits< char >::max () THROWS_NONE
 
static signed char ncbi_numeric_limits< signed char >::min () THROWS_NONE
 
static signed char ncbi_numeric_limits< signed char >::max () THROWS_NONE
 
static unsigned char ncbi_numeric_limits< unsigned char >::min () THROWS_NONE
 
static unsigned char ncbi_numeric_limits< unsigned char >::max () THROWS_NONE
 
static wchar_t ncbi_numeric_limits< wchar_t >::min () THROWS_NONE
 
static wchar_t ncbi_numeric_limits< wchar_t >::max () THROWS_NONE
 
static signed short ncbi_numeric_limits< signed short >::min () THROWS_NONE
 
static signed short ncbi_numeric_limits< signed short >::max () THROWS_NONE
 
static unsigned short ncbi_numeric_limits< unsigned short >::min () THROWS_NONE
 
static unsigned short ncbi_numeric_limits< unsigned short >::max () THROWS_NONE
 
static signed int ncbi_numeric_limits< signed int >::min () THROWS_NONE
 
static signed int ncbi_numeric_limits< signed int >::max () THROWS_NONE
 
static unsigned int ncbi_numeric_limits< unsigned int >::min () THROWS_NONE
 
static unsigned int ncbi_numeric_limits< unsigned int >::max () THROWS_NONE
 
static signed long ncbi_numeric_limits< signed long >::min () THROWS_NONE
 
static signed long ncbi_numeric_limits< signed long >::max () THROWS_NONE
 
static unsigned long ncbi_numeric_limits< unsigned long >::min () THROWS_NONE
 
static unsigned long ncbi_numeric_limits< unsigned long >::max () THROWS_NONE
 
static float ncbi_numeric_limits< float >::min () THROWS_NONE
 
static float ncbi_numeric_limits< float >::max () THROWS_NONE
 
static double ncbi_numeric_limits< double >::min () THROWS_NONE
 
static double ncbi_numeric_limits< double >::max () THROWS_NONE
 
static T SAutoMinMaxLimits< T, is_signed >::max (void)
 
static T SAutoMinMaxLimits< T, is_signed >::min (void)
 For non-integral types, yield a huge negative value rather than a tiny positive one. More...
 
static T SAutoMinMaxLimits< T, false >::max (void)
 
static T SAutoMinMaxLimits< T, false >::min (void)
 
template<typename T >
 SAutoMax::operator T (void) const
 
template<typename T >
 SAutoMin::operator T (void) const
 
template<typename T >
bool operator== (const SAutoMax &, const T &)
 
template<typename T >
bool operator== (const SAutoMin &, const T &)
 
template<typename T >
bool operator== (const T &, const SAutoMax &)
 
template<typename T >
bool operator== (const T &, const SAutoMin &)
 
template<typename T >
bool operator!= (const SAutoMax &, const T &)
 
template<typename T >
bool operator!= (const SAutoMin &, const T &)
 
template<typename T >
bool operator!= (const T &, const SAutoMax &)
 
template<typename T >
bool operator!= (const T &, const SAutoMin &)
 
template<typename T >
bool operator< (const SAutoMax &, const T &)
 
template<typename T >
bool operator< (const SAutoMin &, const T &)
 
template<typename T >
bool operator< (const T &, const SAutoMax &)
 
template<typename T >
bool operator< (const T &, const SAutoMin &)
 
template<typename T >
bool operator<= (const SAutoMax &, const T &)
 
template<typename T >
bool operator<= (const SAutoMin &, const T &)
 
template<typename T >
bool operator<= (const T &, const SAutoMax &)
 
template<typename T >
bool operator<= (const T &, const SAutoMin &)
 
template<typename T >
bool operator> (const SAutoMax &, const T &)
 
template<typename T >
bool operator> (const SAutoMin &, const T &)
 
template<typename T >
bool operator> (const T &, const SAutoMax &)
 
template<typename T >
bool operator> (const T &, const SAutoMin &)
 
template<typename T >
bool operator>= (const SAutoMax &, const T &)
 
template<typename T >
bool operator>= (const SAutoMin &, const T &)
 
template<typename T >
bool operator>= (const T &, const SAutoMax &)
 
template<typename T >
bool operator>= (const T &, const SAutoMin &)
 
template<typename T >
ncbi_numeric_limits< Tget_limits (const T &)
 Generic template to get STD limits by a variable. More...
 
template<>
ncbi_numeric_limits< char > get_limits (const char &)
 
template<>
ncbi_numeric_limits< signed char > get_limits (const signed char &)
 
template<>
ncbi_numeric_limits< unsigned char > get_limits (const unsigned char &)
 
template<>
ncbi_numeric_limits< signed short > get_limits (const signed short &)
 
template<>
ncbi_numeric_limits< unsigned short > get_limits (const unsigned short &)
 
template<>
ncbi_numeric_limits< signed intget_limits (const signed int &)
 
template<>
ncbi_numeric_limits< unsigned intget_limits (const unsigned int &)
 
template<>
ncbi_numeric_limits< signed long > get_limits (const signed long &)
 
template<>
ncbi_numeric_limits< unsigned long > get_limits (const unsigned long &)
 
template<>
ncbi_numeric_limits< float > get_limits (const float &)
 
template<>
ncbi_numeric_limits< double > get_limits (const double &)
 

Variables

static const SAutoMax kMax_Auto = {}
 Generic stand-in for type-specific kMax_* constants from ncbi_limits.h, useful in any context with exactly one preferred type. More...
 
static const SAutoMin kMin_Auto = {}
 Generic stand-in for type-specific kMin_* constants from ncbi_limits.h, useful in any context with exactly one preferred type. More...
 

Detailed Description

FORWARDING_NCBICONF_H

Macro Definition Documentation

◆ __has_attribute

#define __has_attribute (   x)    0

Definition at line 155 of file ncbiconf_impl.h.

◆ __STDC_CONSTANT_MACROS

#define __STDC_CONSTANT_MACROS

Definition at line 58 of file ncbitype.h.

◆ __STDC_FORMAT_MACROS

#define __STDC_FORMAT_MACROS

__STDC_CONSTANT_MACROS

Definition at line 61 of file ncbitype.h.

◆ HAVE_THREAD_LOCAL

#define HAVE_THREAD_LOCAL   1

Definition at line 336 of file ncbiconf_impl.h.

◆ kMax_Char

#define kMax_Char   CHAR_MAX

Definition at line 174 of file ncbi_limits.h.

◆ kMax_Double

#define kMax_Double   DBL_MAX;

Definition at line 208 of file ncbi_limits.h.

◆ kMax_Float

#define kMax_Float   FLT_MAX;

Definition at line 205 of file ncbi_limits.h.

◆ kMax_I1

#define kMax_I1   SCHAR_MAX

Definition at line 212 of file ncbi_limits.h.

◆ kMax_I2

#define kMax_I2   SHRT_MAX

Definition at line 215 of file ncbi_limits.h.

◆ kMax_I4

#define kMax_I4   INT_MAX

Definition at line 218 of file ncbi_limits.h.

◆ kMax_I8

#define kMax_I8   NCBI_MAX_I8

Definition at line 221 of file ncbi_limits.h.

◆ kMax_Int

#define kMax_Int   INT_MAX

Definition at line 184 of file ncbi_limits.h.

◆ kMax_SChar

#define kMax_SChar   SCHAR_MAX

Definition at line 176 of file ncbi_limits.h.

◆ kMax_Short

#define kMax_Short   SHRT_MAX

Definition at line 180 of file ncbi_limits.h.

◆ kMax_UChar

#define kMax_UChar   UCHAR_MAX

Definition at line 177 of file ncbi_limits.h.

◆ kMax_UI1

#define kMax_UI1   UCHAR_MAX

Definition at line 213 of file ncbi_limits.h.

◆ kMax_UI2

#define kMax_UI2   USHRT_MAX

Definition at line 216 of file ncbi_limits.h.

◆ kMax_UI4

#define kMax_UI4   UINT_MAX

Definition at line 219 of file ncbi_limits.h.

◆ kMax_UI8

#define kMax_UI8   NCBI_MAX_UI8

Definition at line 222 of file ncbi_limits.h.

◆ kMax_UInt

#define kMax_UInt   UINT_MAX

Definition at line 185 of file ncbi_limits.h.

◆ kMax_UShort

#define kMax_UShort   USHRT_MAX

Definition at line 181 of file ncbi_limits.h.

◆ kMin_Char

#define kMin_Char   CHAR_MIN

Definition at line 173 of file ncbi_limits.h.

◆ kMin_Double

#define kMin_Double   DBL_MIN;

Definition at line 207 of file ncbi_limits.h.

◆ kMin_Float

#define kMin_Float   FLT_MIN;

Definition at line 204 of file ncbi_limits.h.

◆ kMin_I1

#define kMin_I1   SCHAR_MIN

Definition at line 211 of file ncbi_limits.h.

◆ kMin_I2

#define kMin_I2   SHRT_MIN

Definition at line 214 of file ncbi_limits.h.

◆ kMin_I4

#define kMin_I4   INT_MIN

Definition at line 217 of file ncbi_limits.h.

◆ kMin_I8

#define kMin_I8   NCBI_MIN_I8

Definition at line 220 of file ncbi_limits.h.

◆ kMin_Int

#define kMin_Int   INT_MIN

Definition at line 183 of file ncbi_limits.h.

◆ kMin_SChar

#define kMin_SChar   SCHAR_MIN

Definition at line 175 of file ncbi_limits.h.

◆ kMin_Short

#define kMin_Short   SHRT_MIN

Definition at line 179 of file ncbi_limits.h.

◆ NCBI_BIG_TYPE

#define NCBI_BIG_TYPE   Int8

Definition at line 153 of file ncbitype.h.

◆ NCBI_CONST_INT8

#define NCBI_CONST_INT8 (   v)    INT64_C(v)

Definition at line 212 of file ncbitype.h.

◆ NCBI_CONST_LONGDOUBLE

#define NCBI_CONST_LONGDOUBLE (   v)    v

Definition at line 245 of file ncbitype.h.

◆ NCBI_CONST_UINT8

#define NCBI_CONST_UINT8 (   v)    UINT64_C(v)

Definition at line 213 of file ncbitype.h.

◆ NCBI_DEPRECATED

#define NCBI_DEPRECATED   NCBI_LEGACY_DEPRECATED_0

◆ NCBI_FALLTHROUGH

#define NCBI_FALLTHROUGH

Definition at line 256 of file ncbiconf_impl.h.

◆ NCBI_FORBID_AUTOMINMAX_OPERATION

#define NCBI_FORBID_AUTOMINMAX_OPERATION (   op,
  T1,
  T2 
)
Value:
template <typename T> \
inline bool operator op(const T1&, const T2&) { \
typename T::T1##T2##OperationNotSupported tmp; \
return false; \
}
static char tmp[3200]
Definition: utf8.c:42

Definition at line 215 of file ncbi_limits.hpp.

◆ NCBI_FORBID_AUTOMINMAX_OPERATIONS

#define NCBI_FORBID_AUTOMINMAX_OPERATIONS (   op)
Value:
NCBI_FORBID_AUTOMINMAX_OPERATION(op, SAutoMin, T) \
NCBI_FORBID_AUTOMINMAX_OPERATION(op, T, SAutoMax) \
NCBI_FORBID_AUTOMINMAX_OPERATION(op, T, SAutoMin)
#define T(s)
Definition: common.h:230
#define NCBI_FORBID_AUTOMINMAX_OPERATION(op, T1, T2)

Definition at line 222 of file ncbi_limits.hpp.

◆ NCBI_GET_NUMERIC_LIMITS

#define NCBI_GET_NUMERIC_LIMITS (   type)
Value:
EMPTY_TEMPLATE \
inline numeric_limits<type> get_limits(const type&) \
{ return numeric_limits<type>(); }
ncbi_numeric_limits< T > get_limits(const T &)
Generic template to get STD limits by a variable.
Definition: type.c:6

Macro to declare specialized get_limits.

Definition at line 253 of file ncbi_limits.hpp.

◆ NCBI_HAS_ATTRIBUTE

#define NCBI_HAS_ATTRIBUTE (   x)    NCBI_HAS_C_ATTRIBUTE(x)

Definition at line 128 of file ncbiconf_impl.h.

◆ NCBI_HAS_C_ATTRIBUTE

#define NCBI_HAS_C_ATTRIBUTE (   x)    0

Definition at line 109 of file ncbiconf_impl.h.

◆ NCBI_HAS_CPP_ATTRIBUTE

#define NCBI_HAS_CPP_ATTRIBUTE (   x)    0

Definition at line 102 of file ncbiconf_impl.h.

◆ NCBI_HAS_SCOPED_ATTRIBUTE

#define NCBI_HAS_SCOPED_ATTRIBUTE (   x)    NCBI_HAS_SCOPED_C_ATTRIBUTE(x)

Definition at line 121 of file ncbiconf_impl.h.

◆ NCBI_HAS_SCOPED_C_ATTRIBUTE

#define NCBI_HAS_SCOPED_C_ATTRIBUTE (   x)    NCBI_HAS_C_ATTRIBUTE(x)

Definition at line 115 of file ncbiconf_impl.h.

◆ NCBI_HAS_STD_ATTRIBUTE

#define NCBI_HAS_STD_ATTRIBUTE (   x)    (NCBI_HAS_C_ATTRIBUTE(x) >= 201904L)

Definition at line 149 of file ncbiconf_impl.h.

◆ NCBI_INT8_FORMAT_SPEC

#define NCBI_INT8_FORMAT_SPEC   PRId64

Definition at line 214 of file ncbitype.h.

◆ NCBI_LEGACY_DEPRECATED_0

#define NCBI_LEGACY_DEPRECATED_0

Definition at line 181 of file ncbiconf_impl.h.

◆ NCBI_LEGACY_DEPRECATED_1

#define NCBI_LEGACY_DEPRECATED_1 (   msg)

Definition at line 182 of file ncbiconf_impl.h.

◆ NCBI_NUMERIC_LIMITS

#define NCBI_NUMERIC_LIMITS (   type,
  alias 
)
Value:
template <> \
class numeric_limits<type> \
{ \
public: \
static inline type min() THROWS_NONE { return kMin_##alias; } \
static inline type max() THROWS_NONE { return kMax_##alias; } \
}
#define THROWS_NONE
Do not use 'throw' dynamic exception specification for C++11 compilers.
Definition: ncbiexpt.hpp:74
T max(T x_, T y_)
T min(T x_, T y_)

Auxiliary macro to implement (a limited edition of) the "numeric_limits<>" template.

Definition at line 101 of file ncbi_limits.hpp.

◆ NCBI_NUMERIC_LIMITS_UNSIGNED

#define NCBI_NUMERIC_LIMITS_UNSIGNED (   type,
  alias 
)
Value:
template <> \
class numeric_limits<type> \
{ \
public: \
static inline type min() THROWS_NONE { return 0; } \
static inline type max() THROWS_NONE { return kMax_##alias; } \
}

Definition at line 110 of file ncbi_limits.hpp.

◆ NCBI_PACKED

#define NCBI_PACKED

Definition at line 269 of file ncbiconf_impl.h.

◆ NCBI_RESTRICT

#define NCBI_RESTRICT

Definition at line 165 of file ncbiconf_impl.h.

◆ NCBI_STD_DEPRECATED

#define NCBI_STD_DEPRECATED (   message)    NCBI_STD_DEPRECATED_1(message)

Definition at line 193 of file ncbiconf_impl.h.

◆ NCBI_STD_DEPRECATED_0

#define NCBI_STD_DEPRECATED_0   NCBI_LEGACY_DEPRECATED_0

Definition at line 189 of file ncbiconf_impl.h.

◆ NCBI_STD_DEPRECATED_1

#define NCBI_STD_DEPRECATED_1 (   message)    NCBI_LEGACY_DEPRECATED_1(message)

Definition at line 190 of file ncbiconf_impl.h.

◆ NCBI_THREADS

#define NCBI_THREADS

Definition at line 77 of file ncbiconf_impl.h.

◆ NCBI_UINT8_FORMAT_SPEC

#define NCBI_UINT8_FORMAT_SPEC   PRIu64

Definition at line 215 of file ncbitype.h.

◆ NCBI_UNUSED

#define NCBI_UNUSED

Definition at line 289 of file ncbiconf_impl.h.

◆ NCBI_WARN_UNUSED_RESULT

#define NCBI_WARN_UNUSED_RESULT

Definition at line 244 of file ncbiconf_impl.h.

◆ NCBI_WIN32_THREADS

#define NCBI_WIN32_THREADS

Definition at line 66 of file ncbiconf_impl.h.

◆ numeric_limits

#define numeric_limits   ncbi_numeric_limits

Pre-declaration of the "numeric_limits<>" template Forcibly overrides (using preprocessor) the original "numeric_limits<>"!

Definition at line 92 of file ncbi_limits.hpp.

◆ SIZEOF_NCBI_BIG

#define SIZEOF_NCBI_BIG   8

Definition at line 154 of file ncbitype.h.

Typedef Documentation

◆ Char

typedef char Char

Alias for char.

__STDC_FORMAT_MACROS

Definition at line 93 of file ncbitype.h.

◆ Int1

typedef int8_t Int1

1-byte (8-bit) signed integer

Definition at line 98 of file ncbitype.h.

◆ Int2

typedef int16_t Int2

2-byte (16-bit) signed integer

Definition at line 100 of file ncbitype.h.

◆ Int4

typedef int32_t Int4

4-byte (32-bit) signed integer

Definition at line 102 of file ncbitype.h.

◆ Int8

typedef int64_t Int8

8-byte (64-bit) signed integer

Definition at line 104 of file ncbitype.h.

◆ intptr_t

typedef int intptr_t

Definition at line 185 of file ncbitype.h.

◆ Ncbi_BigScalar

Define large scalar type.

This is platform dependent. It could be an Int8, long double, double or void*.

Definition at line 180 of file ncbitype.h.

◆ Schar

typedef signed char Schar

Alias for signed char.

Definition at line 94 of file ncbitype.h.

◆ TStdLim [1/2]

template<typename T , bool is_signed = ncbi_numeric_limits <T>::is_signed>
typedef ncbi_numeric_limits<T> SAutoMinMaxLimits< T, is_signed >::TStdLim

Definition at line 167 of file ncbi_limits.hpp.

◆ TStdLim [2/2]

template<typename T >
typedef ncbi_numeric_limits<T> SAutoMinMaxLimits< T, false >::TStdLim

Definition at line 187 of file ncbi_limits.hpp.

◆ Uchar

typedef unsigned char Uchar

Alias for unsigned char.

Definition at line 95 of file ncbitype.h.

◆ Uint1

typedef uint8_t Uint1

1-byte (8-bit) unsigned integer

Definition at line 99 of file ncbitype.h.

◆ Uint2

typedef uint16_t Uint2

2-byte (16-bit) unsigned integer

Definition at line 101 of file ncbitype.h.

◆ Uint4

typedef uint32_t Uint4

4-byte (32-bit) unsigned integer

Definition at line 103 of file ncbitype.h.

◆ Uint8

typedef uint64_t Uint8

8-byte (64-bit) unsigned integer

Definition at line 105 of file ncbitype.h.

◆ uintptr_t

typedef unsigned int uintptr_t

Definition at line 197 of file ncbitype.h.

Function Documentation

◆ get_limits() [1/12]

template<>
ncbi_numeric_limits< char > get_limits ( const char &  )
inline

Definition at line 258 of file ncbi_limits.hpp.

◆ get_limits() [2/12]

template<>
ncbi_numeric_limits< double > get_limits ( const double &  )
inline

Definition at line 272 of file ncbi_limits.hpp.

◆ get_limits() [3/12]

template<>
ncbi_numeric_limits< float > get_limits ( const float &  )
inline

Definition at line 271 of file ncbi_limits.hpp.

◆ get_limits() [4/12]

template<>
ncbi_numeric_limits< signed char > get_limits ( const signed char &  )
inline

Definition at line 259 of file ncbi_limits.hpp.

◆ get_limits() [5/12]

template<>
ncbi_numeric_limits< signed int > get_limits ( const signed int )
inline

Definition at line 265 of file ncbi_limits.hpp.

◆ get_limits() [6/12]

template<>
ncbi_numeric_limits< signed long > get_limits ( const signed long &  )
inline

Definition at line 268 of file ncbi_limits.hpp.

◆ get_limits() [7/12]

template<>
ncbi_numeric_limits< signed short > get_limits ( const signed short &  )
inline

Definition at line 262 of file ncbi_limits.hpp.

◆ get_limits() [8/12]

template<typename T >
ncbi_numeric_limits<T> get_limits ( const T )
inline

Generic template to get STD limits by a variable.

Typical use:

 int a = 10; 
 get_limits(a).max();
Note
Causes a compile-time failure if used instead of the specialized implementations.

Definition at line 246 of file ncbi_limits.hpp.

References tmp.

Referenced by CMemoryFile::Extend(), CArchive::ExtractFileToHeap(), CMemoryFileMap::Map(), and CNcbiApplicationAPI::x_HonorStandardSettings().

◆ get_limits() [9/12]

template<>
ncbi_numeric_limits< unsigned char > get_limits ( const unsigned char &  )
inline

Definition at line 260 of file ncbi_limits.hpp.

◆ get_limits() [10/12]

template<>
ncbi_numeric_limits< unsigned int > get_limits ( const unsigned int )
inline

Definition at line 266 of file ncbi_limits.hpp.

◆ get_limits() [11/12]

template<>
ncbi_numeric_limits< unsigned long > get_limits ( const unsigned long &  )
inline

Definition at line 269 of file ncbi_limits.hpp.

◆ get_limits() [12/12]

template<>
ncbi_numeric_limits< unsigned short > get_limits ( const unsigned short &  )
inline

Definition at line 263 of file ncbi_limits.hpp.

◆ max() [1/14]

static char ncbi_numeric_limits< char >::max ( void  )
inlinestatic

Definition at line 125 of file ncbi_limits.hpp.

◆ max() [2/14]

static signed char ncbi_numeric_limits< signed char >::max ( void  )
inlinestatic

Definition at line 126 of file ncbi_limits.hpp.

◆ max() [3/14]

static unsigned char ncbi_numeric_limits< unsigned char >::max ( void  )
inlinestatic

Definition at line 127 of file ncbi_limits.hpp.

◆ max() [4/14]

static wchar_t ncbi_numeric_limits< wchar_t >::max ( void  )
inlinestatic

Definition at line 130 of file ncbi_limits.hpp.

◆ max() [5/14]

static signed short ncbi_numeric_limits< signed short >::max ( void  )
inlinestatic

Definition at line 133 of file ncbi_limits.hpp.

◆ max() [6/14]

static unsigned short ncbi_numeric_limits< unsigned short >::max ( void  )
inlinestatic

Definition at line 134 of file ncbi_limits.hpp.

◆ max() [7/14]

static signed int ncbi_numeric_limits< signed int >::max ( void  )
inlinestatic

Definition at line 136 of file ncbi_limits.hpp.

◆ max() [8/14]

static unsigned int ncbi_numeric_limits< unsigned int >::max ( void  )
inlinestatic

Definition at line 137 of file ncbi_limits.hpp.

◆ max() [9/14]

static signed long ncbi_numeric_limits< signed long >::max ( void  )
inlinestatic

Definition at line 139 of file ncbi_limits.hpp.

◆ max() [10/14]

static unsigned long ncbi_numeric_limits< unsigned long >::max ( void  )
inlinestatic

Definition at line 140 of file ncbi_limits.hpp.

◆ max() [11/14]

static float ncbi_numeric_limits< float >::max ( void  )
inlinestatic

Definition at line 142 of file ncbi_limits.hpp.

◆ max() [12/14]

static double ncbi_numeric_limits< double >::max ( void  )
inlinestatic

Definition at line 143 of file ncbi_limits.hpp.

◆ max() [13/14]

template<typename T , bool is_signed = ncbi_numeric_limits <T>::is_signed>
static T SAutoMinMaxLimits< T, is_signed >::max ( void  )
inlinestatic

Definition at line 168 of file ncbi_limits.hpp.

References max().

Referenced by SAutoMax::operator T().

◆ max() [14/14]

template<typename T >
static T SAutoMinMaxLimits< T, false >::max ( void  )
inlinestatic

Definition at line 188 of file ncbi_limits.hpp.

References max().

◆ min() [1/14]

static char ncbi_numeric_limits< char >::min ( void  )
inlinestatic

Definition at line 125 of file ncbi_limits.hpp.

◆ min() [2/14]

static signed char ncbi_numeric_limits< signed char >::min ( void  )
inlinestatic

Definition at line 126 of file ncbi_limits.hpp.

◆ min() [3/14]

static unsigned char ncbi_numeric_limits< unsigned char >::min ( void  )
inlinestatic

Definition at line 127 of file ncbi_limits.hpp.

◆ min() [4/14]

static wchar_t ncbi_numeric_limits< wchar_t >::min ( void  )
inlinestatic

Definition at line 130 of file ncbi_limits.hpp.

◆ min() [5/14]

static signed short ncbi_numeric_limits< signed short >::min ( void  )
inlinestatic

Definition at line 133 of file ncbi_limits.hpp.

◆ min() [6/14]

static unsigned short ncbi_numeric_limits< unsigned short >::min ( void  )
inlinestatic

Definition at line 134 of file ncbi_limits.hpp.

◆ min() [7/14]

static signed int ncbi_numeric_limits< signed int >::min ( void  )
inlinestatic

Definition at line 136 of file ncbi_limits.hpp.

◆ min() [8/14]

static unsigned int ncbi_numeric_limits< unsigned int >::min ( void  )
inlinestatic

Definition at line 137 of file ncbi_limits.hpp.

◆ min() [9/14]

static signed long ncbi_numeric_limits< signed long >::min ( void  )
inlinestatic

Definition at line 139 of file ncbi_limits.hpp.

◆ min() [10/14]

static unsigned long ncbi_numeric_limits< unsigned long >::min ( void  )
inlinestatic

Definition at line 140 of file ncbi_limits.hpp.

◆ min() [11/14]

static float ncbi_numeric_limits< float >::min ( void  )
inlinestatic

Definition at line 142 of file ncbi_limits.hpp.

◆ min() [12/14]

static double ncbi_numeric_limits< double >::min ( void  )
inlinestatic

Definition at line 143 of file ncbi_limits.hpp.

◆ min() [13/14]

template<typename T , bool is_signed = ncbi_numeric_limits <T>::is_signed>
static T SAutoMinMaxLimits< T, is_signed >::min ( void  )
inlinestatic

For non-integral types, yield a huge negative value rather than a tiny positive one.

Definition at line 172 of file ncbi_limits.hpp.

References max(), min(), and T.

Referenced by SAutoMin::operator T().

◆ min() [14/14]

template<typename T >
static T SAutoMinMaxLimits< T, false >::min ( void  )
inlinestatic

Definition at line 189 of file ncbi_limits.hpp.

◆ operator T() [1/2]

template<typename T >
SAutoMax::operator T ( void  ) const
inline

Definition at line 195 of file ncbi_limits.hpp.

References SAutoMinMaxLimits< T, is_signed >::max().

◆ operator T() [2/2]

template<typename T >
SAutoMin::operator T ( void  ) const
inline

Definition at line 205 of file ncbi_limits.hpp.

References SAutoMinMaxLimits< T, is_signed >::min().

◆ operator!=() [1/4]

template<typename T >
bool operator!= ( const SAutoMax ,
const T  
)
inline

Definition at line 229 of file ncbi_limits.hpp.

◆ operator!=() [2/4]

template<typename T >
bool operator!= ( const SAutoMin ,
const T  
)
inline

Definition at line 229 of file ncbi_limits.hpp.

◆ operator!=() [3/4]

template<typename T >
bool operator!= ( const T ,
const SAutoMax  
)
inline

Definition at line 229 of file ncbi_limits.hpp.

◆ operator!=() [4/4]

template<typename T >
bool operator!= ( const T ,
const SAutoMin  
)
inline

Definition at line 229 of file ncbi_limits.hpp.

◆ operator<() [1/4]

template<typename T >
bool operator< ( const SAutoMax ,
const T  
)
inline

Definition at line 230 of file ncbi_limits.hpp.

◆ operator<() [2/4]

template<typename T >
bool operator< ( const SAutoMin ,
const T  
)
inline

Definition at line 230 of file ncbi_limits.hpp.

◆ operator<() [3/4]

template<typename T >
bool operator< ( const T ,
const SAutoMax  
)
inline

Definition at line 230 of file ncbi_limits.hpp.

◆ operator<() [4/4]

template<typename T >
bool operator< ( const T ,
const SAutoMin  
)
inline

Definition at line 230 of file ncbi_limits.hpp.

◆ operator<=() [1/4]

template<typename T >
bool operator<= ( const SAutoMax ,
const T  
)
inline

Definition at line 231 of file ncbi_limits.hpp.

◆ operator<=() [2/4]

template<typename T >
bool operator<= ( const SAutoMin ,
const T  
)
inline

Definition at line 231 of file ncbi_limits.hpp.

◆ operator<=() [3/4]

template<typename T >
bool operator<= ( const T ,
const SAutoMax  
)
inline

Definition at line 231 of file ncbi_limits.hpp.

◆ operator<=() [4/4]

template<typename T >
bool operator<= ( const T ,
const SAutoMin  
)
inline

Definition at line 231 of file ncbi_limits.hpp.

◆ operator==() [1/4]

template<typename T >
bool operator== ( const SAutoMax ,
const T  
)
inline

Definition at line 228 of file ncbi_limits.hpp.

◆ operator==() [2/4]

template<typename T >
bool operator== ( const SAutoMin ,
const T  
)
inline

Definition at line 228 of file ncbi_limits.hpp.

◆ operator==() [3/4]

template<typename T >
bool operator== ( const T ,
const SAutoMax  
)
inline

Definition at line 228 of file ncbi_limits.hpp.

◆ operator==() [4/4]

template<typename T >
bool operator== ( const T ,
const SAutoMin  
)
inline

Definition at line 228 of file ncbi_limits.hpp.

◆ operator>() [1/4]

template<typename T >
bool operator> ( const SAutoMax ,
const T  
)
inline

Definition at line 232 of file ncbi_limits.hpp.

◆ operator>() [2/4]

template<typename T >
bool operator> ( const SAutoMin ,
const T  
)
inline

Definition at line 232 of file ncbi_limits.hpp.

◆ operator>() [3/4]

template<typename T >
bool operator> ( const T ,
const SAutoMax  
)
inline

Definition at line 232 of file ncbi_limits.hpp.

◆ operator>() [4/4]

template<typename T >
bool operator> ( const T ,
const SAutoMin  
)
inline

Definition at line 232 of file ncbi_limits.hpp.

◆ operator>=() [1/4]

template<typename T >
bool operator>= ( const SAutoMax ,
const T  
)
inline

Definition at line 233 of file ncbi_limits.hpp.

◆ operator>=() [2/4]

template<typename T >
bool operator>= ( const SAutoMin ,
const T  
)
inline

Definition at line 233 of file ncbi_limits.hpp.

◆ operator>=() [3/4]

template<typename T >
bool operator>= ( const T ,
const SAutoMax  
)
inline

Definition at line 233 of file ncbi_limits.hpp.

◆ operator>=() [4/4]

template<typename T >
bool operator>= ( const T ,
const SAutoMin  
)
inline

Definition at line 233 of file ncbi_limits.hpp.

Variable Documentation

◆ kMax_Auto

const SAutoMax kMax_Auto = {}
static

◆ kMin_Auto

const SAutoMin kMin_Auto = {}
static

Generic stand-in for type-specific kMin_* constants from ncbi_limits.h, useful in any context with exactly one preferred type.

NB: For non-integral types, yields a huge negative value rather than a tiny positive one.

Definition at line 212 of file ncbi_limits.hpp.

Referenced by value_slice::SConvertUsingRunTimeCP< to_is_integer, from_is_integer >::Convert(), and value_slice::SConvertUsingRunTimeCP< true, true >::Convert().

Modified on Tue Apr 23 07:37:40 2024 by modify_doxy.py rev. 669887