Main Page
Related Pages
Modules
Namespaces
Files
File List
File Members
include
ecl
config
endianness.hpp
Go to the documentation of this file.
1
8
/*****************************************************************************
9
** Ifdefs
10
*****************************************************************************/
11
12
#ifndef ECL_CONFIG_ENDIANNESS_HPP_
13
#define ECL_CONFIG_ENDIANNESS_HPP_
14
15
/*****************************************************************************
16
** Includes
17
*****************************************************************************/
18
19
#include "
portable_types.hpp
"
20
21
/*****************************************************************************
22
** Namespaces
23
*****************************************************************************/
24
25
namespace
ecl
{
38
inline
bool
is_big_endian
() {
39
union
{
40
uint32 i;
41
char
c[4];
42
} bint = {0x01020304};
43
44
return
bint.c[0] == 1;
45
}
46
47
}
// namespace ecl
48
49
#endif
/* ECL_CONFIG_ENDIANNESS_HPP_ */
ecl
Definition:
char_sign.hpp:25
portable_types.hpp
Type definitions for integer types.
ecl::is_big_endian
bool is_big_endian()
Determines if your platform is big endian (at compile time).
Definition:
endianness.hpp:38
ecl_config
Author(s): Daniel Stonier
autogenerated on Fri Jun 7 2019 21:52:41