Top of document
©Copyright 1999 Rogue Wave Software

Fundamental Data Types

The standard library describes a specific type by providing a specialized implementation of the numeric_limits class for the type. Static functions and static constant data members then provide information specific to the type. The standard library includes descriptions of the following fundamental data types.

bool
char
int
float
  signed char
short
double
  unsigned char
long
long double
  wchar_t
unsigned short
 
    unsigned int
 
    unsigned long
 

Certain implementations may also provide information on other data types. Whether or not an implementation is described can be discovered using the static data member field is_specialized. For example, the following is legal, and will indicate that the string data type is not described by this mechanism.

cout << "are strings described " <<
    numeric_limits<string>::is_specialized << endl;
 

For data types that do not have a specialization, the values yielded by the functions and data fields in numeric_limits are generally zero or false.


Top of document