[#BloombergLP-bsls-PlatformUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::PlatformUtil
:relfileprefix: ../../
:mrdocs:

Provide a namespace for a suite of `typedef`s and pure procedures that encapsulate, platform&hyphen;dependent types and APIs&period;

== Synopsis

Declared in `&lt;bsls&lowbar;platformutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct PlatformUtil;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/PlatformUtil/Int64.adoc[`Int64`] 
| 64&hyphen;bit signed integer type for all supported platforms&period;
| xref:BloombergLP/bsls/PlatformUtil/IntPtr.adoc[`IntPtr`] 
| The aliases `UintPtr` and `IntPtr` are guaranteed to have the same size as pointers&period;
| xref:BloombergLP/bsls/PlatformUtil/MaxAlign.adoc[`MaxAlign`] 
| The alias `MaxAlign` refers to a type that is maximally&hyphen;aligned on the current platform&period;
| xref:BloombergLP/bsls/PlatformUtil/Uint64.adoc[`Uint64`] 
| The aliases `Int64` and `Uint64` stand for whatever type `Types` implements for the appropriate supported platforms&period;
| xref:BloombergLP/bsls/PlatformUtil/UintPtr.adoc[`UintPtr`] 
| Unsigned integer type guaranteed to have the same size as pointers&period;
| xref:BloombergLP/bsls/PlatformUtil/size_type.adoc[`size&lowbar;type`] 
| The alias `size&lowbar;type` refers to the preferred type for denoting a number of elements in either `bslma` allocators or container types&period; Note that this type is signed, as negative values may make sense in certain contexts&period; Also note that the standard&hyphen;compliant allocators (e&period;g&period;, `bsl&colon;&colon;allocator` and `std&colon;&colon;allocator`) use an _unsigned_ size type, but that is fine because they also have a mechanism (`max&lowbar;size`) to determine overflows resulting from converting from one size type to the other&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/PlatformUtil/isBigEndian.adoc[`isBigEndian`] 
| Return `true` if this platform is &quot;big&hyphen;endian&quot;, and `false` otherwise&period; Note that &quot;big&hyphen;endian&quot; (i&period;e&period;, the most significant byte of data at the lowest byte address) is consistent with network byte order&period;
| xref:BloombergLP/bsls/PlatformUtil/isLittleEndian.adoc[`isLittleEndian`] 
| Return `true` if this platform is &quot;little&hyphen;endian&quot;, and `false` otherwise&period; Note that &quot;little&hyphen;endian&quot; (i&period;e&period;, the least significant byte of data at the lowest byte address) is inconsistent with network byte order&period;
| xref:BloombergLP/bsls/PlatformUtil/roundUpToMaximalAlignment.adoc[`roundUpToMaximalAlignment`] 
| Return the specified `size` (in bytes) rounded up to the smallest integral multiple of the maximum alignment&period; The behavior is undefined unless `0 &lt;&equals; size`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
