TRLC Platform Library
1.0.0
Header-only C++ library for compile-time platform detection and abstraction
|
Comprehensive endianness information structure. More...
#include <trlc/platform/endianness.hpp>
Static Public Member Functions | |
static bool | isNativeOrder (ByteOrder order) const |
Check if given byte order matches native order. More... | |
static bool | needsByteSwap (ByteOrder target_order) const |
Check if byte swapping is needed for target order. More... | |
Public Attributes | |
ByteOrder | byte_order |
The detected byte order. More... | |
bool | is_little_endian |
True if system is little-endian. More... | |
bool | is_big_endian |
True if system is big-endian. More... | |
Comprehensive endianness information structure.
Provides complete information about the system's byte order including convenient boolean flags and utility methods for byte order operations.
Definition at line 46 of file endianness.hpp.
|
inlinestatic |
Check if given byte order matches native order.
order | Byte order to check |
Definition at line 56 of file endianness.hpp.
|
inlinestatic |
Check if byte swapping is needed for target order.
target_order | Target byte order |
Definition at line 63 of file endianness.hpp.
ByteOrder trlc::platform::EndiannessInfo::byte_order |
The detected byte order.
Definition at line 47 of file endianness.hpp.
bool trlc::platform::EndiannessInfo::is_big_endian |
True if system is big-endian.
Definition at line 49 of file endianness.hpp.
bool trlc::platform::EndiannessInfo::is_little_endian |
True if system is little-endian.
Definition at line 48 of file endianness.hpp.