Provide a namespace for a suite of `typedef`s and pure procedures that encapsulate, platform‐dependent types and APIs.

Synopsis

Declared in <bsls_platformutil.h>

struct PlatformUtil;

Type Aliases

Name

Description

Int64

64‐bit signed integer type for all supported platforms.

IntPtr

The aliases UintPtr and IntPtr are guaranteed to have the same size as pointers.

MaxAlign

The alias MaxAlign refers to a type that is maximally‐aligned on the current platform.

Uint64

The aliases Int64 and Uint64 stand for whatever type Types implements for the appropriate supported platforms.

UintPtr

Unsigned integer type guaranteed to have the same size as pointers.

size_type

Preferred type for denoting a number of elements.

Static Member Functions

Name

Description

isBigEndian

Return true if this platform is big‐endian.

isLittleEndian

Return true if this platform is little‐endian.

roundUpToMaximalAlignment

Return the specified size (in bytes) rounded up to the smallest integral multiple of the maximum alignment. The behavior is undefined unless 0 <= size.

Created with MrDocs