byteorder.h File Reference
#include <algorithm>
#include <endian.h>

Go to the source code of this file.


namespace  cxxtools




template<typename T >
internal T cxxtools::reverse (T value)
 Returns the value in reversed byte order.
bool cxxtools::isBigEndian ()
 Returns true, if machine is big-endian (high byte first).
bool cxxtools::isLittleEndian ()
 Returns true, if machine is little-endian (low byte first).
template<typename T >
cxxtools::hostToLe (T value)
 Converts a native value in little endian.
template<typename T >
cxxtools::leToHost (T value)
 Converts a little endian value to native.
template<typename T >
cxxtools::hostToBe (T value)
 Converts a native value in big endian.
template<typename T >
cxxtools::beToHost (T value)
 Converts a big endian value to native.

Macro Definition Documentation