Functions
ecl Namespace Reference

Functions

bool is_big_endian ()
 Determines if your platform is big endian (at compile time).
bool is_char_signed ()
 Determines if your platform char type is signed or otherwise.

Function Documentation

bool ecl::is_big_endian ( ) [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!

Returns:
bool : true if big endian, false otherwise.

Definition at line 38 of file endianness.hpp.

bool ecl::is_char_signed ( ) [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.

Returns:
bool : true if signed, false otherwise.

Definition at line 35 of file char_sign.hpp.



ecl_config
Author(s): Daniel Stonier
autogenerated on Wed Aug 26 2015 11:27:12