forked from boostorg/endian
Rename uint*_t types to avoid conflict
This commit is contained in:
@ -7,9 +7,9 @@
|
||||
#include <boost/endian/detail/intrinsic.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned short uint16;
|
||||
typedef unsigned int uint32;
|
||||
typedef unsigned long long uint64;
|
||||
|
||||
int main()
|
||||
{
|
||||
@ -17,13 +17,13 @@ int main()
|
||||
|
||||
#ifndef BOOST_ENDIAN_NO_INTRINSICS
|
||||
|
||||
uint16_t x2 = 0x1122U;
|
||||
uint16 x2 = 0x1122U;
|
||||
BOOST_TEST_EQ( BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2(x2), 0x2211U );
|
||||
|
||||
uint32_t x4 = 0x11223344UL;
|
||||
uint32 x4 = 0x11223344UL;
|
||||
BOOST_TEST_EQ( BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4(x4), 0x44332211UL );
|
||||
|
||||
uint64_t x8 = 0x1122334455667788U;
|
||||
uint64 x8 = 0x1122334455667788U;
|
||||
BOOST_TEST_EQ( BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_8(x8), 0x8877665544332211ULL );
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user