Functions | |
bool | is_big_endian () |
Determines if your platform is big endian (at compile time). More... | |
bool | is_char_signed () |
Determines if your platform char type is signed or otherwise. More... | |
|
inline |
Determines if your platform is big endian (at compile time).
This is a nice function that I found on stack overflow - the best thing about it, is that a good compiler will see that its a const function and thus store it in your program as a constant as well as excluding any code that fails this test (within the usual if/else condition check). Thus, effectively giving it the same power as a macro. Brilliant!
Definition at line 38 of file endianness.hpp.
|
inline |
Determines if your platform char type is signed or otherwise.
This is a useful runtime check, if you need a compile time check, ecl's cmake probling sets a macro in ecl/config/ecl.hpp.
Definition at line 35 of file char_sign.hpp.