Switch the parameter order of endian_store

This commit is contained in:
Peter Dimov
2019-04-30 05:13:47 +03:00
parent 39eab827cf
commit d40a3ac3f4
5 changed files with 60 additions and 58 deletions

View File

@ -243,14 +243,14 @@ public:
explicit endian_buffer( T val ) BOOST_NOEXCEPT
{
boost::endian::endian_store<T, n_bits / 8, Order>( val, value_ );
boost::endian::endian_store<T, n_bits / 8, Order>( value_, val );
}
#endif
endian_buffer& operator=( T val ) BOOST_NOEXCEPT
{
boost::endian::endian_store<T, n_bits / 8, Order>( val, value_ );
boost::endian::endian_store<T, n_bits / 8, Order>( value_, val );
return *this;
}
@ -293,14 +293,14 @@ public:
explicit endian_buffer( T val ) BOOST_NOEXCEPT
{
boost::endian::endian_store<T, n_bits / 8, Order>( val, value_ );
boost::endian::endian_store<T, n_bits / 8, Order>( value_, val );
}
#endif
endian_buffer& operator=( T val ) BOOST_NOEXCEPT
{
boost::endian::endian_store<T, n_bits / 8, Order>( val, value_ );
boost::endian::endian_store<T, n_bits / 8, Order>( value_, val );
return *this;
}

View File

@ -9,6 +9,8 @@
#define BOOST_ENDIAN_CONVERSION_HPP
#include <boost/endian/detail/endian_reverse.hpp>
#include <boost/endian/detail/endian_load.hpp>
#include <boost/endian/detail/endian_store.hpp>
#include <boost/endian/detail/order.hpp>
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/is_integral.hpp>

View File

@ -37,9 +37,9 @@ template<class T, std::size_t N1, BOOST_SCOPED_ENUM(order) O1, std::size_t N2, B
// if N < sizeof(T), T is integral or enum
template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) Order>
inline void endian_store( T const & v, unsigned char * p ) BOOST_NOEXCEPT
inline void endian_store( unsigned char * p, T const & v ) BOOST_NOEXCEPT
{
return detail::endian_store_impl<T, sizeof(T), order::native, N, Order>()( v, p );
return detail::endian_store_impl<T, sizeof(T), order::native, N, Order>()( p, v );
}
namespace detail
@ -49,7 +49,7 @@ namespace detail
template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O> struct endian_store_impl<T, N, O, N, O>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_trivially_copyable<T>::value );
@ -61,7 +61,7 @@ template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O> struct endian_store
template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O1, BOOST_SCOPED_ENUM(order) O2> struct endian_store_impl<T, N, O1, N, O2>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_trivially_copyable<T>::value );
@ -78,12 +78,12 @@ template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O1, BOOST_SCOPED_ENUM(
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 3, order::little>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 4 ];
boost::endian::endian_store<T, 4, order::little>( v, tmp );
boost::endian::endian_store<T, 4, order::little>( tmp, v );
p[0] = tmp[0];
p[1] = tmp[1];
@ -93,12 +93,12 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4,
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 3, order::big>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 4 ];
boost::endian::endian_store<T, 4, order::big>( v, tmp );
boost::endian::endian_store<T, 4, order::big>( tmp, v );
p[0] = tmp[1];
p[1] = tmp[2];
@ -110,12 +110,12 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4,
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 5, order::little>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ];
boost::endian::endian_store<T, 8, order::little>( v, tmp );
boost::endian::endian_store<T, 8, order::little>( tmp, v );
p[0] = tmp[0];
p[1] = tmp[1];
@ -127,12 +127,12 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 5, order::big>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ];
boost::endian::endian_store<T, 8, order::big>( v, tmp );
boost::endian::endian_store<T, 8, order::big>( tmp, v );
p[0] = tmp[3];
p[1] = tmp[4];
@ -146,12 +146,12 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 6, order::little>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ];
boost::endian::endian_store<T, 8, order::little>( v, tmp );
boost::endian::endian_store<T, 8, order::little>( tmp, v );
p[0] = tmp[0];
p[1] = tmp[1];
@ -164,12 +164,12 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 6, order::big>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ];
boost::endian::endian_store<T, 8, order::big>( v, tmp );
boost::endian::endian_store<T, 8, order::big>( tmp, v );
p[0] = tmp[2];
p[1] = tmp[3];
@ -184,12 +184,12 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 7, order::little>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ];
boost::endian::endian_store<T, 8, order::little>( v, tmp );
boost::endian::endian_store<T, 8, order::little>( tmp, v );
p[0] = tmp[0];
p[1] = tmp[1];
@ -203,12 +203,12 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 7, order::big>
{
inline void operator()( T const & v, unsigned char * p ) const BOOST_NOEXCEPT
inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ];
boost::endian::endian_store<T, 8, order::big>( v, tmp );
boost::endian::endian_store<T, 8, order::big>( tmp, v );
p[0] = tmp[1];
p[1] = tmp[2];

View File

@ -15,7 +15,7 @@ template<class T> void test( T const& x )
{
unsigned char buffer[ sizeof(T) ];
boost::endian::endian_store<T, sizeof(T), boost::endian::order::little>( x, buffer );
boost::endian::endian_store<T, sizeof(T), boost::endian::order::little>( buffer, x );
T x2 = boost::endian::endian_load<T, sizeof(T), boost::endian::order::little>( buffer );
BOOST_TEST_EQ( x, x2 );
@ -24,7 +24,7 @@ template<class T> void test( T const& x )
{
unsigned char buffer[ sizeof(T) ];
boost::endian::endian_store<T, sizeof(T), boost::endian::order::big>( x, buffer );
boost::endian::endian_store<T, sizeof(T), boost::endian::order::big>( buffer, x );
T x2 = boost::endian::endian_load<T, sizeof(T), boost::endian::order::big>( buffer );
BOOST_TEST_EQ( x, x2 );

View File

@ -66,7 +66,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA };
boost::endian::endian_store<boost::int8_t, 1, boost::endian::order::little>( 0x01, v );
boost::endian::endian_store<boost::int8_t, 1, boost::endian::order::little>( v, 0x01 );
unsigned char w[] = { 0x01, 0xAA };
@ -76,7 +76,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA };
boost::endian::endian_store<boost::uint8_t, 1, boost::endian::order::little>( 0x01, v );
boost::endian::endian_store<boost::uint8_t, 1, boost::endian::order::little>( v, 0x01 );
unsigned char w[] = { 0x01, 0xAA };
@ -86,7 +86,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA };
boost::endian::endian_store<boost::int8_t, 1, boost::endian::order::big>( 0x01, v );
boost::endian::endian_store<boost::int8_t, 1, boost::endian::order::big>( v, 0x01 );
unsigned char w[] = { 0x01, 0xAA };
@ -96,7 +96,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA };
boost::endian::endian_store<boost::uint8_t, 1, boost::endian::order::big>( 0x01, v );
boost::endian::endian_store<boost::uint8_t, 1, boost::endian::order::big>( v, 0x01 );
unsigned char w[] = { 0x01, 0xAA };
@ -108,7 +108,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int16_t, 2, boost::endian::order::little>( 0x0102, v );
boost::endian::endian_store<boost::int16_t, 2, boost::endian::order::little>( v, 0x0102 );
unsigned char w[] = { 0x02, 0x01, 0xAA };
@ -118,7 +118,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint16_t, 2, boost::endian::order::little>( 0x0102, v );
boost::endian::endian_store<boost::uint16_t, 2, boost::endian::order::little>( v, 0x0102 );
unsigned char w[] = { 0x02, 0x01, 0xAA };
@ -128,7 +128,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int16_t, 2, boost::endian::order::big>( 0x0102, v );
boost::endian::endian_store<boost::int16_t, 2, boost::endian::order::big>( v, 0x0102 );
unsigned char w[] = { 0x01, 0x02, 0xAA };
@ -138,7 +138,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint16_t, 2, boost::endian::order::big>( 0x0102, v );
boost::endian::endian_store<boost::uint16_t, 2, boost::endian::order::big>( v, 0x0102 );
unsigned char w[] = { 0x01, 0x02, 0xAA };
@ -150,7 +150,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int32_t, 3, boost::endian::order::little>( 0x010203, v );
boost::endian::endian_store<boost::int32_t, 3, boost::endian::order::little>( v, 0x010203 );
unsigned char w[] = { 0x03, 0x02, 0x01, 0xAA };
@ -160,7 +160,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint32_t, 3, boost::endian::order::little>( 0x010203, v );
boost::endian::endian_store<boost::uint32_t, 3, boost::endian::order::little>( v, 0x010203 );
unsigned char w[] = { 0x03, 0x02, 0x01, 0xAA };
@ -170,7 +170,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int32_t, 3, boost::endian::order::big>( 0x010203, v );
boost::endian::endian_store<boost::int32_t, 3, boost::endian::order::big>( v, 0x010203 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0xAA };
@ -180,7 +180,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint32_t, 3, boost::endian::order::big>( 0x010203, v );
boost::endian::endian_store<boost::uint32_t, 3, boost::endian::order::big>( v, 0x010203 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0xAA };
@ -192,7 +192,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int32_t, 4, boost::endian::order::little>( 0x01020304, v );
boost::endian::endian_store<boost::int32_t, 4, boost::endian::order::little>( v, 0x01020304 );
unsigned char w[] = { 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -202,7 +202,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint32_t, 4, boost::endian::order::little>( 0x01020304, v );
boost::endian::endian_store<boost::uint32_t, 4, boost::endian::order::little>( v, 0x01020304 );
unsigned char w[] = { 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -212,7 +212,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int32_t, 4, boost::endian::order::big>( 0x01020304, v );
boost::endian::endian_store<boost::int32_t, 4, boost::endian::order::big>( v, 0x01020304 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0xAA };
@ -222,7 +222,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint32_t, 4, boost::endian::order::big>( 0x01020304, v );
boost::endian::endian_store<boost::uint32_t, 4, boost::endian::order::big>( v, 0x01020304 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0xAA };
@ -234,7 +234,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 5, boost::endian::order::little>( 0x0102030405, v );
boost::endian::endian_store<boost::int64_t, 5, boost::endian::order::little>( v, 0x0102030405 );
unsigned char w[] = { 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -244,7 +244,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 5, boost::endian::order::little>( 0x0102030405, v );
boost::endian::endian_store<boost::uint64_t, 5, boost::endian::order::little>( v, 0x0102030405 );
unsigned char w[] = { 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -254,7 +254,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 5, boost::endian::order::big>( 0x0102030405, v );
boost::endian::endian_store<boost::int64_t, 5, boost::endian::order::big>( v, 0x0102030405 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0xAA };
@ -264,7 +264,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 5, boost::endian::order::big>( 0x0102030405, v );
boost::endian::endian_store<boost::uint64_t, 5, boost::endian::order::big>( v, 0x0102030405 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0xAA };
@ -276,7 +276,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 6, boost::endian::order::little>( 0x010203040506, v );
boost::endian::endian_store<boost::int64_t, 6, boost::endian::order::little>( v, 0x010203040506 );
unsigned char w[] = { 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -286,7 +286,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 6, boost::endian::order::little>( 0x010203040506, v );
boost::endian::endian_store<boost::uint64_t, 6, boost::endian::order::little>( v, 0x010203040506 );
unsigned char w[] = { 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -296,7 +296,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 6, boost::endian::order::big>( 0x010203040506, v );
boost::endian::endian_store<boost::int64_t, 6, boost::endian::order::big>( v, 0x010203040506 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xAA };
@ -306,7 +306,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 6, boost::endian::order::big>( 0x010203040506, v );
boost::endian::endian_store<boost::uint64_t, 6, boost::endian::order::big>( v, 0x010203040506 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xAA };
@ -318,7 +318,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 7, boost::endian::order::little>( 0x01020304050607, v );
boost::endian::endian_store<boost::int64_t, 7, boost::endian::order::little>( v, 0x01020304050607 );
unsigned char w[] = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -328,7 +328,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 7, boost::endian::order::little>( 0x01020304050607, v );
boost::endian::endian_store<boost::uint64_t, 7, boost::endian::order::little>( v, 0x01020304050607 );
unsigned char w[] = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -338,7 +338,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 7, boost::endian::order::big>( 0x01020304050607, v );
boost::endian::endian_store<boost::int64_t, 7, boost::endian::order::big>( v, 0x01020304050607 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0xAA };
@ -348,7 +348,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 7, boost::endian::order::big>( 0x01020304050607, v );
boost::endian::endian_store<boost::uint64_t, 7, boost::endian::order::big>( v, 0x01020304050607 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0xAA };
@ -360,7 +360,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 8, boost::endian::order::little>( 0x0102030405060708, v );
boost::endian::endian_store<boost::int64_t, 8, boost::endian::order::little>( v, 0x0102030405060708 );
unsigned char w[] = { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -370,7 +370,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 8, boost::endian::order::little>( 0x0102030405060708, v );
boost::endian::endian_store<boost::uint64_t, 8, boost::endian::order::little>( v, 0x0102030405060708 );
unsigned char w[] = { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0xAA };
@ -380,7 +380,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::int64_t, 8, boost::endian::order::big>( 0x0102030405060708, v );
boost::endian::endian_store<boost::int64_t, 8, boost::endian::order::big>( v, 0x0102030405060708 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0xAA };
@ -390,7 +390,7 @@ int main()
{
unsigned char v[] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
boost::endian::endian_store<boost::uint64_t, 8, boost::endian::order::big>( 0x0102030405060708, v );
boost::endian::endian_store<boost::uint64_t, 8, boost::endian::order::big>( v, 0x0102030405060708 );
unsigned char w[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0xAA };