Move all deprecated names to endian.hpp; add deprecated_test.cpp to test/Jamfile

This commit is contained in:
Peter Dimov
2019-04-29 00:36:21 +03:00
parent f2dc045c43
commit b29b3dfc10
7 changed files with 127 additions and 116 deletions

View File

@ -182,97 +182,6 @@ namespace endian
typedef little_uint64_t native_uint64_t; typedef little_uint64_t native_uint64_t;
# endif # endif
# ifdef BOOST_ENDIAN_DEPRECATED_NAMES
typedef order endianness;
typedef align alignment;
# ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits,
BOOST_SCOPED_ENUM(align) Align = align::no>
using endian = endian_arithmetic<Order, T, n_bits, Align>;
# endif
// unaligned big endian signed integer types
typedef endian_arithmetic< order::big, int_least8_t, 8 > big8_t;
typedef endian_arithmetic< order::big, int_least16_t, 16 > big16_t;
typedef endian_arithmetic< order::big, int_least32_t, 24 > big24_t;
typedef endian_arithmetic< order::big, int_least32_t, 32 > big32_t;
typedef endian_arithmetic< order::big, int_least64_t, 40 > big40_t;
typedef endian_arithmetic< order::big, int_least64_t, 48 > big48_t;
typedef endian_arithmetic< order::big, int_least64_t, 56 > big56_t;
typedef endian_arithmetic< order::big, int_least64_t, 64 > big64_t;
// unaligned big endian_arithmetic unsigned integer types
typedef endian_arithmetic< order::big, uint_least8_t, 8 > ubig8_t;
typedef endian_arithmetic< order::big, uint_least16_t, 16 > ubig16_t;
typedef endian_arithmetic< order::big, uint_least32_t, 24 > ubig24_t;
typedef endian_arithmetic< order::big, uint_least32_t, 32 > ubig32_t;
typedef endian_arithmetic< order::big, uint_least64_t, 40 > ubig40_t;
typedef endian_arithmetic< order::big, uint_least64_t, 48 > ubig48_t;
typedef endian_arithmetic< order::big, uint_least64_t, 56 > ubig56_t;
typedef endian_arithmetic< order::big, uint_least64_t, 64 > ubig64_t;
// unaligned little endian_arithmetic signed integer types
typedef endian_arithmetic< order::little, int_least8_t, 8 > little8_t;
typedef endian_arithmetic< order::little, int_least16_t, 16 > little16_t;
typedef endian_arithmetic< order::little, int_least32_t, 24 > little24_t;
typedef endian_arithmetic< order::little, int_least32_t, 32 > little32_t;
typedef endian_arithmetic< order::little, int_least64_t, 40 > little40_t;
typedef endian_arithmetic< order::little, int_least64_t, 48 > little48_t;
typedef endian_arithmetic< order::little, int_least64_t, 56 > little56_t;
typedef endian_arithmetic< order::little, int_least64_t, 64 > little64_t;
// unaligned little endian_arithmetic unsigned integer types
typedef endian_arithmetic< order::little, uint_least8_t, 8 > ulittle8_t;
typedef endian_arithmetic< order::little, uint_least16_t, 16 > ulittle16_t;
typedef endian_arithmetic< order::little, uint_least32_t, 24 > ulittle24_t;
typedef endian_arithmetic< order::little, uint_least32_t, 32 > ulittle32_t;
typedef endian_arithmetic< order::little, uint_least64_t, 40 > ulittle40_t;
typedef endian_arithmetic< order::little, uint_least64_t, 48 > ulittle48_t;
typedef endian_arithmetic< order::little, uint_least64_t, 56 > ulittle56_t;
typedef endian_arithmetic< order::little, uint_least64_t, 64 > ulittle64_t;
// unaligned native endian_arithmetic signed integer types
typedef endian_arithmetic< order::native, int_least8_t, 8 > native8_t;
typedef endian_arithmetic< order::native, int_least16_t, 16 > native16_t;
typedef endian_arithmetic< order::native, int_least32_t, 24 > native24_t;
typedef endian_arithmetic< order::native, int_least32_t, 32 > native32_t;
typedef endian_arithmetic< order::native, int_least64_t, 40 > native40_t;
typedef endian_arithmetic< order::native, int_least64_t, 48 > native48_t;
typedef endian_arithmetic< order::native, int_least64_t, 56 > native56_t;
typedef endian_arithmetic< order::native, int_least64_t, 64 > native64_t;
// unaligned native endian_arithmetic unsigned integer types
typedef endian_arithmetic< order::native, uint_least8_t, 8 > unative8_t;
typedef endian_arithmetic< order::native, uint_least16_t, 16 > unative16_t;
typedef endian_arithmetic< order::native, uint_least32_t, 24 > unative24_t;
typedef endian_arithmetic< order::native, uint_least32_t, 32 > unative32_t;
typedef endian_arithmetic< order::native, uint_least64_t, 40 > unative40_t;
typedef endian_arithmetic< order::native, uint_least64_t, 48 > unative48_t;
typedef endian_arithmetic< order::native, uint_least64_t, 56 > unative56_t;
typedef endian_arithmetic< order::native, uint_least64_t, 64 > unative64_t;
// aligned native endian_arithmetic typedefs are not provided because
// <cstdint> types are superior for this use case
typedef endian_arithmetic< order::big, int16_t, 16, align::yes > aligned_big16_t;
typedef endian_arithmetic< order::big, uint16_t, 16, align::yes > aligned_ubig16_t;
typedef endian_arithmetic< order::little, int16_t, 16, align::yes > aligned_little16_t;
typedef endian_arithmetic< order::little, uint16_t, 16, align::yes > aligned_ulittle16_t;
typedef endian_arithmetic< order::big, int32_t, 32, align::yes > aligned_big32_t;
typedef endian_arithmetic< order::big, uint32_t, 32, align::yes > aligned_ubig32_t;
typedef endian_arithmetic< order::little, int32_t, 32, align::yes > aligned_little32_t;
typedef endian_arithmetic< order::little, uint32_t, 32, align::yes > aligned_ulittle32_t;
typedef endian_arithmetic< order::big, int64_t, 64, align::yes > aligned_big64_t;
typedef endian_arithmetic< order::big, uint64_t, 64, align::yes > aligned_ubig64_t;
typedef endian_arithmetic< order::little, int64_t, 64, align::yes > aligned_little64_t;
typedef endian_arithmetic< order::little, uint64_t, 64, align::yes > aligned_ulittle64_t;
# endif
//---------------------------------- end synopsis ------------------------------------// //---------------------------------- end synopsis ------------------------------------//
template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits, template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits,

View File

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

View File

@ -40,7 +40,7 @@ template<class T, std::size_t N1, BOOST_SCOPED_ENUM(order) O1, std::size_t N2, B
template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) Order> template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) Order>
inline T endian_load( unsigned char const * p ) BOOST_NOEXCEPT inline T endian_load( unsigned char const * p ) BOOST_NOEXCEPT
{ {
return detail::endian_load_impl<T, sizeof(T), endian::order::native, N, Order>()( p ); return detail::endian_load_impl<T, sizeof(T), order::native, N, Order>()( p );
} }
namespace detail namespace detail
@ -94,7 +94,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4,
tmp[2] = p[2]; tmp[2] = p[2];
tmp[3] = boost::is_signed<T>::value && ( p[2] & 0x80 )? 0xFF: 0x00; tmp[3] = boost::is_signed<T>::value && ( p[2] & 0x80 )? 0xFF: 0x00;
return endian::endian_load<T, 4, order::little>( tmp ); return boost::endian::endian_load<T, 4, order::little>( tmp );
} }
}; };
@ -111,7 +111,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4,
tmp[2] = p[1]; tmp[2] = p[1];
tmp[3] = p[2]; tmp[3] = p[2];
return endian::endian_load<T, 4, order::big>( tmp ); return boost::endian::endian_load<T, 4, order::big>( tmp );
} }
}; };
@ -137,7 +137,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8,
tmp[6] = fill; tmp[6] = fill;
tmp[7] = fill; tmp[7] = fill;
return endian::endian_load<T, 8, order::little>( tmp ); return boost::endian::endian_load<T, 8, order::little>( tmp );
} }
}; };
@ -161,7 +161,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8,
tmp[6] = p[3]; tmp[6] = p[3];
tmp[7] = p[4]; tmp[7] = p[4];
return endian::endian_load<T, 8, order::big>( tmp ); return boost::endian::endian_load<T, 8, order::big>( tmp );
} }
}; };
@ -187,7 +187,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8,
tmp[6] = fill; tmp[6] = fill;
tmp[7] = fill; tmp[7] = fill;
return endian::endian_load<T, 8, order::little>( tmp ); return boost::endian::endian_load<T, 8, order::little>( tmp );
} }
}; };
@ -211,7 +211,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8,
tmp[6] = p[4]; tmp[6] = p[4];
tmp[7] = p[5]; tmp[7] = p[5];
return endian::endian_load<T, 8, order::big>( tmp ); return boost::endian::endian_load<T, 8, order::big>( tmp );
} }
}; };
@ -237,7 +237,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8,
tmp[7] = fill; tmp[7] = fill;
return endian::endian_load<T, 8, order::little>( tmp ); return boost::endian::endian_load<T, 8, order::little>( tmp );
} }
}; };
@ -261,7 +261,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8,
tmp[6] = p[5]; tmp[6] = p[5];
tmp[7] = p[6]; tmp[7] = p[6];
return endian::endian_load<T, 8, order::big>( tmp ); return boost::endian::endian_load<T, 8, order::big>( tmp );
} }
}; };

View File

@ -39,7 +39,7 @@ template<class T, std::size_t N1, BOOST_SCOPED_ENUM(order) O1, std::size_t N2, B
template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) Order> 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( T const & v, unsigned char * p ) BOOST_NOEXCEPT
{ {
return detail::endian_store_impl<T, sizeof(T), endian::order::native, N, Order>()( v, p ); return detail::endian_store_impl<T, sizeof(T), order::native, N, Order>()( v, p );
} }
namespace detail namespace detail
@ -83,7 +83,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 4 ]; unsigned char tmp[ 4 ];
endian::endian_store<T, 4, order::little>( v, tmp ); boost::endian::endian_store<T, 4, order::little>( v, tmp );
p[0] = tmp[0]; p[0] = tmp[0];
p[1] = tmp[1]; p[1] = tmp[1];
@ -98,7 +98,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 4 ]; unsigned char tmp[ 4 ];
endian::endian_store<T, 4, order::big>( v, tmp ); boost::endian::endian_store<T, 4, order::big>( v, tmp );
p[0] = tmp[1]; p[0] = tmp[1];
p[1] = tmp[2]; p[1] = tmp[2];
@ -115,7 +115,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ]; unsigned char tmp[ 8 ];
endian::endian_store<T, 8, order::little>( v, tmp ); boost::endian::endian_store<T, 8, order::little>( v, tmp );
p[0] = tmp[0]; p[0] = tmp[0];
p[1] = tmp[1]; p[1] = tmp[1];
@ -132,7 +132,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ]; unsigned char tmp[ 8 ];
endian::endian_store<T, 8, order::big>( v, tmp ); boost::endian::endian_store<T, 8, order::big>( v, tmp );
p[0] = tmp[3]; p[0] = tmp[3];
p[1] = tmp[4]; p[1] = tmp[4];
@ -151,7 +151,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ]; unsigned char tmp[ 8 ];
endian::endian_store<T, 8, order::little>( v, tmp ); boost::endian::endian_store<T, 8, order::little>( v, tmp );
p[0] = tmp[0]; p[0] = tmp[0];
p[1] = tmp[1]; p[1] = tmp[1];
@ -169,7 +169,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ]; unsigned char tmp[ 8 ];
endian::endian_store<T, 8, order::big>( v, tmp ); boost::endian::endian_store<T, 8, order::big>( v, tmp );
p[0] = tmp[2]; p[0] = tmp[2];
p[1] = tmp[3]; p[1] = tmp[3];
@ -189,7 +189,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ]; unsigned char tmp[ 8 ];
endian::endian_store<T, 8, order::little>( v, tmp ); boost::endian::endian_store<T, 8, order::little>( v, tmp );
p[0] = tmp[0]; p[0] = tmp[0];
p[1] = tmp[1]; p[1] = tmp[1];
@ -208,7 +208,7 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8,
BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value );
unsigned char tmp[ 8 ]; unsigned char tmp[ 8 ];
endian::endian_store<T, 8, order::big>( v, tmp ); boost::endian::endian_store<T, 8, order::big>( v, tmp );
p[0] = tmp[1]; p[0] = tmp[1];
p[1] = tmp[2]; p[1] = tmp[2];

View File

@ -14,6 +14,105 @@
# error "<boost/endian/endian.hpp> is deprecated. Define BOOST_ENDIAN_DEPRECATED_NAMES to use." # error "<boost/endian/endian.hpp> is deprecated. Define BOOST_ENDIAN_DEPRECATED_NAMES to use."
#endif #endif
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED( "<boost/endian/arithmetic.hpp>" )
#include <boost/endian/arithmetic.hpp> #include <boost/endian/arithmetic.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace endian
{
typedef order endianness;
typedef align alignment;
# ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits,
BOOST_SCOPED_ENUM(align) Align = align::no>
using endian = endian_arithmetic<Order, T, n_bits, Align>;
# endif
// unaligned big endian signed integer types
typedef endian_arithmetic< order::big, int_least8_t, 8 > big8_t;
typedef endian_arithmetic< order::big, int_least16_t, 16 > big16_t;
typedef endian_arithmetic< order::big, int_least32_t, 24 > big24_t;
typedef endian_arithmetic< order::big, int_least32_t, 32 > big32_t;
typedef endian_arithmetic< order::big, int_least64_t, 40 > big40_t;
typedef endian_arithmetic< order::big, int_least64_t, 48 > big48_t;
typedef endian_arithmetic< order::big, int_least64_t, 56 > big56_t;
typedef endian_arithmetic< order::big, int_least64_t, 64 > big64_t;
// unaligned big endian_arithmetic unsigned integer types
typedef endian_arithmetic< order::big, uint_least8_t, 8 > ubig8_t;
typedef endian_arithmetic< order::big, uint_least16_t, 16 > ubig16_t;
typedef endian_arithmetic< order::big, uint_least32_t, 24 > ubig24_t;
typedef endian_arithmetic< order::big, uint_least32_t, 32 > ubig32_t;
typedef endian_arithmetic< order::big, uint_least64_t, 40 > ubig40_t;
typedef endian_arithmetic< order::big, uint_least64_t, 48 > ubig48_t;
typedef endian_arithmetic< order::big, uint_least64_t, 56 > ubig56_t;
typedef endian_arithmetic< order::big, uint_least64_t, 64 > ubig64_t;
// unaligned little endian_arithmetic signed integer types
typedef endian_arithmetic< order::little, int_least8_t, 8 > little8_t;
typedef endian_arithmetic< order::little, int_least16_t, 16 > little16_t;
typedef endian_arithmetic< order::little, int_least32_t, 24 > little24_t;
typedef endian_arithmetic< order::little, int_least32_t, 32 > little32_t;
typedef endian_arithmetic< order::little, int_least64_t, 40 > little40_t;
typedef endian_arithmetic< order::little, int_least64_t, 48 > little48_t;
typedef endian_arithmetic< order::little, int_least64_t, 56 > little56_t;
typedef endian_arithmetic< order::little, int_least64_t, 64 > little64_t;
// unaligned little endian_arithmetic unsigned integer types
typedef endian_arithmetic< order::little, uint_least8_t, 8 > ulittle8_t;
typedef endian_arithmetic< order::little, uint_least16_t, 16 > ulittle16_t;
typedef endian_arithmetic< order::little, uint_least32_t, 24 > ulittle24_t;
typedef endian_arithmetic< order::little, uint_least32_t, 32 > ulittle32_t;
typedef endian_arithmetic< order::little, uint_least64_t, 40 > ulittle40_t;
typedef endian_arithmetic< order::little, uint_least64_t, 48 > ulittle48_t;
typedef endian_arithmetic< order::little, uint_least64_t, 56 > ulittle56_t;
typedef endian_arithmetic< order::little, uint_least64_t, 64 > ulittle64_t;
// unaligned native endian_arithmetic signed integer types
typedef endian_arithmetic< order::native, int_least8_t, 8 > native8_t;
typedef endian_arithmetic< order::native, int_least16_t, 16 > native16_t;
typedef endian_arithmetic< order::native, int_least32_t, 24 > native24_t;
typedef endian_arithmetic< order::native, int_least32_t, 32 > native32_t;
typedef endian_arithmetic< order::native, int_least64_t, 40 > native40_t;
typedef endian_arithmetic< order::native, int_least64_t, 48 > native48_t;
typedef endian_arithmetic< order::native, int_least64_t, 56 > native56_t;
typedef endian_arithmetic< order::native, int_least64_t, 64 > native64_t;
// unaligned native endian_arithmetic unsigned integer types
typedef endian_arithmetic< order::native, uint_least8_t, 8 > unative8_t;
typedef endian_arithmetic< order::native, uint_least16_t, 16 > unative16_t;
typedef endian_arithmetic< order::native, uint_least32_t, 24 > unative24_t;
typedef endian_arithmetic< order::native, uint_least32_t, 32 > unative32_t;
typedef endian_arithmetic< order::native, uint_least64_t, 40 > unative40_t;
typedef endian_arithmetic< order::native, uint_least64_t, 48 > unative48_t;
typedef endian_arithmetic< order::native, uint_least64_t, 56 > unative56_t;
typedef endian_arithmetic< order::native, uint_least64_t, 64 > unative64_t;
// aligned native endian_arithmetic typedefs are not provided because
// <cstdint> types are superior for this use case
typedef endian_arithmetic< order::big, int16_t, 16, align::yes > aligned_big16_t;
typedef endian_arithmetic< order::big, uint16_t, 16, align::yes > aligned_ubig16_t;
typedef endian_arithmetic< order::little, int16_t, 16, align::yes > aligned_little16_t;
typedef endian_arithmetic< order::little, uint16_t, 16, align::yes > aligned_ulittle16_t;
typedef endian_arithmetic< order::big, int32_t, 32, align::yes > aligned_big32_t;
typedef endian_arithmetic< order::big, uint32_t, 32, align::yes > aligned_ubig32_t;
typedef endian_arithmetic< order::little, int32_t, 32, align::yes > aligned_little32_t;
typedef endian_arithmetic< order::little, uint32_t, 32, align::yes > aligned_ulittle32_t;
typedef endian_arithmetic< order::big, int64_t, 64, align::yes > aligned_big64_t;
typedef endian_arithmetic< order::big, uint64_t, 64, align::yes > aligned_ubig64_t;
typedef endian_arithmetic< order::little, int64_t, 64, align::yes > aligned_little64_t;
typedef endian_arithmetic< order::little, uint64_t, 64, align::yes > aligned_ulittle64_t;
} // namespace endian
} // namespace boost
#endif //BOOST_ENDIAN_ENDIAN_HPP #endif //BOOST_ENDIAN_ENDIAN_HPP

View File

@ -68,3 +68,5 @@ run endian_ld_st_roundtrip_test.cpp : : : <define>BOOST_ENDIAN_NO_INTRINSICS : e
run endian_arithmetic_test.cpp ; run endian_arithmetic_test.cpp ;
run endian_arithmetic_test.cpp : : : <define>BOOST_ENDIAN_NO_INTRINSICS : endian_arithmetic_test_ni ; run endian_arithmetic_test.cpp : : : <define>BOOST_ENDIAN_NO_INTRINSICS : endian_arithmetic_test_ni ;
run deprecated_test.cpp ;

View File

@ -15,6 +15,7 @@
#include <boost/endian/endian.hpp> #include <boost/endian/endian.hpp>
#include <boost/detail/lightweight_main.hpp> #include <boost/detail/lightweight_main.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/cstdint.hpp>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
@ -115,7 +116,7 @@ namespace
ubig64_t bu64(0x010203040506070ULL); ubig64_t bu64(0x010203040506070ULL);
ulittle64_t lu64(0x010203040506070ULL); ulittle64_t lu64(0x010203040506070ULL);
uint64_t x; boost::uint64_t x;
std::stringstream ss; std::stringstream ss;