swapBytes overloads

Synopses

Declared in <bsls_byteorderutil.h>

Return the byte‐swapped value of the specified x.

Return the value that results from reversing the order of the bytes in the specified x.

Return x unchanged; 1‐byte integral types have no byte order.

static
bool
swapBytes(bool x);

Return x unchanged; 1‐byte integral types have no byte order.

static
char
swapBytes(char x);

Return the byte‐swapped value of the specified x.

static
char16_t
swapBytes(char16_t x);

Return the byte‐swapped value of the specified x.

static
char32_t
swapBytes(char32_t x);

Return x unchanged; 1‐byte integral types have no byte order.

static
char8_t
swapBytes(char8_t x);

Return the value that results from reversing the order of the bytes in the specified x.

static
int
swapBytes(int x);

Return the value that results from reversing the order of the bytes in the specified x.

static
long
swapBytes(long x);

Return the value that results from reversing the order of the bytes in the specified x.

static
short
swapBytes(short x);

Return x unchanged; 1‐byte integral types have no byte order.

static
signed char
swapBytes(signed char x);

Return x unchanged; 1‐byte integral types have no byte order.

static
unsigned char
swapBytes(unsigned char x);

Return the value that results from reversing the order of the bytes in the specified x.

static
unsigned int
swapBytes(unsigned int x);

Return the value that results from reversing the order of the bytes in the specified x.

static
unsigned long
swapBytes(unsigned long x);

Return the value that results from reversing the order of the bytes in the specified x.

static
unsigned short
swapBytes(unsigned short x);

Return the value that results from reversing the order of the bytes in the specified x.

static
wchar_t
swapBytes(wchar_t x);

Return Value

  • byte‐swapped value of x

  • value with the byte order of x reversed

  • x unchanged

Parameters

Name

Description

x

value whose bytes are reversed

Created with MrDocs