[#BloombergLP-bsls-ByteOrderUtil-swapBytes-0ac]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/ByteOrderUtil.adoc[ByteOrderUtil]::swapBytes
:relfileprefix: ../../../
:mrdocs:

`swapBytes` overloads

== Synopses

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

Return the byte&hyphen;swapped value of the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bsls/Types/Int64.adoc[Types::Int64]
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-076.adoc[swapBytes](xref:BloombergLP/bsls/Types/Int64.adoc[Types::Int64] x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-076.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bsls/Types/Uint64.adoc[Types::Uint64]
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-014.adoc[swapBytes](xref:BloombergLP/bsls/Types/Uint64.adoc[Types::Uint64] x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-014.adoc[_» more&period;&period;&period;_]#

Return `x` unchanged&semi; 1&hyphen;byte integral types have no byte order&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-08.adoc[swapBytes](bool x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-08.adoc[_» more&period;&period;&period;_]#

Return `x` unchanged&semi; 1&hyphen;byte integral types have no byte order&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-062.adoc[swapBytes](char x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-062.adoc[_» more&period;&period;&period;_]#

Return the byte&hyphen;swapped value of the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char16&lowbar;t
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0c.adoc[swapBytes](char16&lowbar;t x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0c.adoc[_» more&period;&period;&period;_]#

Return the byte&hyphen;swapped value of the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char32&lowbar;t
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-07d.adoc[swapBytes](char32&lowbar;t x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-07d.adoc[_» more&period;&period;&period;_]#

Return `x` unchanged&semi; 1&hyphen;byte integral types have no byte order&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char8&lowbar;t
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0a8.adoc[swapBytes](char8&lowbar;t x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0a8.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-01c.adoc[swapBytes](int x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-01c.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
long
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-06e.adoc[swapBytes](long x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-06e.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
short
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-020.adoc[swapBytes](short x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-020.adoc[_» more&period;&period;&period;_]#

Return `x` unchanged&semi; 1&hyphen;byte integral types have no byte order&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
signed char
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-09.adoc[swapBytes](signed char x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-09.adoc[_» more&period;&period;&period;_]#

Return `x` unchanged&semi; 1&hyphen;byte integral types have no byte order&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
unsigned char
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-02d.adoc[swapBytes](unsigned char x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-02d.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
unsigned int
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0aa.adoc[swapBytes](unsigned int x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0aa.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
unsigned long
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0f.adoc[swapBytes](unsigned long x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0f.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
unsigned short
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0d.adoc[swapBytes](unsigned short x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-0d.adoc[_» more&period;&period;&period;_]#

Return the value that results from reversing the order of the bytes in the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
wchar&lowbar;t
xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-027.adoc[swapBytes](wchar&lowbar;t x);
----

[.small]#xref:BloombergLP/bsls/ByteOrderUtil/swapBytes-027.adoc[_» more&period;&period;&period;_]#

== Return Value

* byte&hyphen;swapped value of `x`
* value with the byte order of `x` reversed
* `x` unchanged

== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| value whose bytes are reversed
|===


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