Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68810 - in sandbox/endian_ext: boost/integer libs/integer/test
From: vicente.botet_at_[hidden]
Date: 2011-02-12 11:18:09


Author: viboes
Date: 2011-02-12 11:18:08 EST (Sat, 12 Feb 2011)
New Revision: 68810
URL: http://svn.boost.org/trac/boost/changeset/68810

Log:
EndianExt: Correct climits issue with integer_traits + LL constanys + boost:: scope needed to disambiguate
Text files modified:
   sandbox/endian_ext/boost/integer/endian_pack.hpp | 1 +
   sandbox/endian_ext/libs/integer/test/endian_convert_test.cpp | 21 ++++++++++-----------
   sandbox/endian_ext/libs/integer/test/endian_flip_test.cpp | 18 +++++++++---------
   3 files changed, 20 insertions(+), 20 deletions(-)

Modified: sandbox/endian_ext/boost/integer/endian_pack.hpp
==============================================================================
--- sandbox/endian_ext/boost/integer/endian_pack.hpp (original)
+++ sandbox/endian_ext/boost/integer/endian_pack.hpp 2011-02-12 11:18:08 EST (Sat, 12 Feb 2011)
@@ -36,6 +36,7 @@
 
 #include <boost/config.hpp>
 #include <boost/type_traits/is_signed.hpp>
+#include <climits>
 #include <boost/integer_traits.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/static_assert.hpp>

Modified: sandbox/endian_ext/libs/integer/test/endian_convert_test.cpp
==============================================================================
--- sandbox/endian_ext/libs/integer/test/endian_convert_test.cpp (original)
+++ sandbox/endian_ext/libs/integer/test/endian_convert_test.cpp 2011-02-12 11:18:08 EST (Sat, 12 Feb 2011)
@@ -101,22 +101,21 @@
     (X::little_c, b)
 )
 
-BOOST_MPL_ASSERT_MSG((is_same<endianness::domain_map<network, X::big_c>::type,
- mpl::vector<endianness::big,endianness::big> >::value),
- SS, (network,endianness::domain_map<network, X::big_c>::type));
+BOOST_MPL_ASSERT_MSG((boost::is_same<boost::endianness::domain_map<network, X::big_c>::type,
+ boost::mpl::vector<boost::endianness::big,boost::endianness::big> >::value),
+ SS, (network,boost::endianness::domain_map<network, X::big_c>::type));
 
-BOOST_MPL_ASSERT_MSG((is_same<endianness::domain_map<network, X::little_c>::type,
+BOOST_MPL_ASSERT_MSG((boost::is_same<endianness::domain_map<network, X::little_c>::type,
                              mpl::vector<endianness::little,endianness::little> >::value),
             RR, (network,endianness::domain_map<network, X::little_c>::type));
 
 typedef mpl::list<> floats;
 typedef mpl::push_front<floats,int>::type types;
 
-BOOST_MPL_ASSERT(( is_same< mpl::front<types>::type, int > ));
-
+BOOST_MPL_ASSERT(( boost::is_same< boost::mpl::front<types>::type, int > ));
 
 BOOST_MPL_ASSERT_MSG((
- is_same<
+ boost::is_same<
                 mpl::front<
                     endianness::domain_map<network, X::mixed_c>::type
>::type,
@@ -132,7 +131,7 @@
 
 
 BOOST_MPL_ASSERT_MSG((
- is_same<
+ boost::is_same<
                 mpl::front<
                     endianness::domain_map<network, X::big_c>::type
>::type,
@@ -152,13 +151,13 @@
 typedef mpl::deref<begin_endian_mixed_c>::type deref_begin_endian_mixed_c;
 
 BOOST_MPL_ASSERT_MSG((
- is_same<
+ boost::is_same<
                 deref_begin_endian_mixed_c,
- endianness::domain_map<network, X::big_c>::type
+ boost::endianness::domain_map<network, X::big_c>::type
>::value),
             SS,
             ( deref_begin_endian_mixed_c,
- endianness::domain_map<network, X::big_c>::type
+ boost::endianness::domain_map<network, X::big_c>::type
             ));
 
 

Modified: sandbox/endian_ext/libs/integer/test/endian_flip_test.cpp
==============================================================================
--- sandbox/endian_ext/libs/integer/test/endian_flip_test.cpp (original)
+++ sandbox/endian_ext/libs/integer/test/endian_flip_test.cpp 2011-02-12 11:18:08 EST (Sat, 12 Feb 2011)
@@ -14,17 +14,17 @@
 
 int main()
 {
- boost::int64_t i64 = 0x0102030405060708;
+ boost::int64_t i64 = 0x0102030405060708LL;
   bi::endian_flip(i64);
- BOOST_TEST_EQ(i64, 0x0807060504030201);
+ BOOST_TEST_EQ(i64, 0x0807060504030201LL);
   bi::endian_flip(i64);
- BOOST_TEST_EQ(i64, 0x0102030405060708);
+ BOOST_TEST_EQ(i64, 0x0102030405060708LL);
 
- i64 = 0xfefdfcfbfaf9f8f7;
+ i64 = 0xfefdfcfbfaf9f8f7LL;
   bi::endian_flip(i64);
- BOOST_TEST_EQ(i64, 0xf7f8f9fafbfcfdfe);
+ BOOST_TEST_EQ(i64, 0xf7f8f9fafbfcfdfeLL);
   bi::endian_flip(i64);
- BOOST_TEST_EQ(i64, 0xfefdfcfbfaf9f8f7);
+ BOOST_TEST_EQ(i64, 0xfefdfcfbfaf9f8f7LL);
 
   boost::int32_t i32 = 0x01020304;
   bi::endian_flip(i32);
@@ -50,11 +50,11 @@
   bi::endian_flip(i16);
   BOOST_TEST_EQ(i16, (boost::int16_t)0xfefd);
 
- boost::uint64_t ui64 = 0x0102030405060708;
+ boost::uint64_t ui64 = 0x0102030405060708LL;
   bi::endian_flip(ui64);
- BOOST_TEST_EQ(ui64, 0x0807060504030201);
+ BOOST_TEST_EQ(ui64, 0x0807060504030201LL);
   bi::endian_flip(ui64);
- BOOST_TEST_EQ(ui64, 0x0102030405060708);
+ BOOST_TEST_EQ(ui64, 0x0102030405060708LL);
 
   boost::uint32_t ui32 = 0x01020304;
   bi::endian_flip(ui32);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk