forked from boostorg/endian
Remove C++03 workarounds
This commit is contained in:
1 parent
0e0a4fe51d
commit
ccc8c3df3f
16 files changed
+493
-556
No files matched your search
@@ -29,14 +29,14 @@
|
||||
namespace be = boost::endian;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using boost::int8_t;
|
||||
using boost::uint8_t;
|
||||
using boost::int16_t;
|
||||
using boost::uint16_t;
|
||||
using boost::int32_t;
|
||||
using boost::uint32_t;
|
||||
using boost::int64_t;
|
||||
using boost::uint64_t;
|
||||
using std::int8_t;
|
||||
using std::uint8_t;
|
||||
using std::int16_t;
|
||||
using std::uint16_t;
|
||||
using std::int32_t;
|
||||
using std::uint32_t;
|
||||
using std::int64_t;
|
||||
using std::uint64_t;
|
||||
|
||||
template <class T> inline T std_endian_reverse(T x) BOOST_NOEXCEPT
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
template<BOOST_SCOPED_ENUM(boost::endian::order) Order, BOOST_SCOPED_ENUM(boost::endian::align) Align, class T> void test_arithmetic_( T const& x )
|
||||
template<boost::endian::order Order, boost::endian::align Align, class T> void test_arithmetic_( T const& x )
|
||||
{
|
||||
boost::endian::endian_arithmetic<Order, T, sizeof(T) * 8, Align> y( x );
|
||||
|
||||
@@ -78,7 +78,7 @@ template<BOOST_SCOPED_ENUM(boost::endian::order) Order, BOOST_SCOPED_ENUM(boost:
|
||||
}
|
||||
}
|
||||
|
||||
template<BOOST_SCOPED_ENUM(boost::endian::order) Order, BOOST_SCOPED_ENUM(boost::endian::align) Align, class T> void test_integral_( T const& x )
|
||||
template<boost::endian::order Order, boost::endian::align Align, class T> void test_integral_( T const& x )
|
||||
{
|
||||
boost::endian::endian_arithmetic<Order, T, sizeof(T) * 8, Align> y( x );
|
||||
|
||||
|
||||
@@ -176,17 +176,17 @@ template<class T> void test_np()
|
||||
|
||||
int main()
|
||||
{
|
||||
test<boost::int8_t>();
|
||||
test<boost::uint8_t>();
|
||||
test<std::int8_t>();
|
||||
test<std::uint8_t>();
|
||||
|
||||
test<boost::int16_t>();
|
||||
test<boost::uint16_t>();
|
||||
test<std::int16_t>();
|
||||
test<std::uint16_t>();
|
||||
|
||||
test<boost::int32_t>();
|
||||
test<boost::uint32_t>();
|
||||
test<std::int32_t>();
|
||||
test<std::uint32_t>();
|
||||
|
||||
test<boost::int64_t>();
|
||||
test<boost::uint64_t>();
|
||||
test<std::int64_t>();
|
||||
test<std::uint64_t>();
|
||||
|
||||
test<char>();
|
||||
test<unsigned char>();
|
||||
|
||||
Reference in new issue
Block a user