|
BDE 4.14.0 Production release
|
Typedefs | |
| typedef bsls::Types | bsls_Types |
| This alias is defined for backward compatibility. | |
Provide a consistent interface for platform-dependent types.
This component provides a namespace for a set of typedefs that provide a stable, portable interface to platform-dependent types. In particular, this component supplies portable typenames for signed and unsigned 64-bit integers (bsls::Types::Int64 and bsls::Types::Uint64, respectively), as well as the preferred integral type denoting the number of elements in a container, and the number of bytes in a single block of memory supplied by an allocator (bsls::Types::size_type).
The following illustrates how some of the types supplied by this component might be used.
bsls::Types::Int64 and bsls::Types::Uint64 identify the preferred fundamental types denoting signed and unsigned 64-bit integers, respectively:
Clients can use these types in the same way as an int. Clients can also mix usage with other fundamental integral types:
bsls::Types::size_type identifies the preferred integral type denoting the number of elements in a container, and the number of bytes in a single block of memory supplied by an allocator. For example, a typical use is as a typedef in an STL container:
Note that Standard Library facilities that work with numeric types can be used with bsls::Types as well. For example, the following code finds out some facts about bsls::Types::Int64 in a platform-independent way:
| typedef bsls::Types bsls_Types |