limit_traits Struct Template Reference
[Utility Library]

#include <stlsoft/util/limit_traits.h>

List of all members.


Detailed Description

template<typename T>
struct stlsoft::limit_traits< T >

Traits for determining the minimum and maximum values of types.

limit_traits is a traits class for acquiring the minimum and maximum values of types.

  assert(stlsoft::limit_traits<ss_sint16_t>::minimum() == -32768);
  assert(stlsoft::limit_traits<ss_sint16_t>::maximum() == 32767);
Parameters:
T The type
Note:
Provides nothing that is not in std::numeric_limits, but uses minimum() and maximum() rather than min() and max(), since some compilers are not well-behaved in making these functions rather than macros.

Public Types

typedef T value_type
 The value type.

Static Public Member Functions

static value_type minimum ()
 Returns the minimum value for the type.
static value_type maximum ()
 Returns the maximum value for the type.

Member Typedef Documentation

typedef T value_type

The value type.


Member Function Documentation

static value_type minimum (  )  [static]

Returns the minimum value for the type.

static value_type maximum (  )  [static]

Returns the maximum value for the type.


The documentation for this struct was generated from the following file:

Generated on Thu Jun 10 08:59:02 2010 for STLSoft by  doxygen 1.5.6