Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71399 - in trunk: boost/spirit/home/qi/numeric/detail libs/spirit/example/qi/compiler_tutorial/mini_c libs/spirit/test/qi
From: joel_at_[hidden]
Date: 2011-04-21 01:13:32


Author: djowel
Date: 2011-04-21 01:13:30 EDT (Thu, 21 Apr 2011)
New Revision: 71399
URL: http://svn.boost.org/trac/boost/changeset/71399

Log:
Minor tweaks
Text files modified:
   trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp | 6 +++---
   trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.hpp | 4 ++--
   trunk/libs/spirit/test/qi/uint3.cpp | 8 ++++++--
   3 files changed, 11 insertions(+), 7 deletions(-)

Modified: trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp 2011-04-21 01:13:30 EDT (Thu, 21 Apr 2011)
@@ -41,7 +41,7 @@
     // The maximum radix digits that can be represented without
     // overflow:
     //
- // template<typename T, unsigned Radix>
+ // template<typename T, unsigned Radix>
     // struct digits_traits::value;
     //
     ///////////////////////////////////////////////////////////////////////////
@@ -87,7 +87,7 @@
     // template<typename Char> static int digit(Char ch);
     //
     ///////////////////////////////////////////////////////////////////////////
- template <unsigned Radix>
+ template <unsigned Radix>
     struct radix_traits
     {
         template <typename Char>
@@ -103,7 +103,7 @@
         template <typename Char>
         inline static unsigned digit(Char ch)
         {
- if (Radix <= 10 || ch >= '0' && ch <= '9')
+ if (Radix <= 10 || (ch >= '0' && ch <= '9'))
                 return ch - '0';
             return spirit::char_encoding::ascii::tolower(ch) - 'a' + 10;
         }

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.hpp 2011-04-21 01:13:30 EDT (Thu, 21 Apr 2011)
@@ -66,11 +66,11 @@
           : current(0)
         {
             using namespace boost::phoenix::arg_names;
- using boost::phoenix::cref;
+ namespace phx = boost::phoenix;
             using boost::phoenix::function;
 
             error_handler = function<ErrorHandler>(error_handler_)(
- "Error! ", _2, cref(error_handler_.iters)[_1]);
+ "Error! ", _2, phx::cref(error_handler_.iters)[_1]);
         }
 
         bool operator()(ast::nil) { BOOST_ASSERT(0); return false; }

Modified: trunk/libs/spirit/test/qi/uint3.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/uint3.cpp (original)
+++ trunk/libs/spirit/test/qi/uint3.cpp 2011-04-21 01:13:30 EDT (Thu, 21 Apr 2011)
@@ -58,10 +58,14 @@
         unsigned u;
 
         BOOST_TEST(test("12545674515", oct(012545674515)));
+#if UINT_MAX > 4294967296 // > 32 bits only
         BOOST_TEST(!test("12545674515", oct(051547654521)));
+#endif
         BOOST_TEST(test_attr("12545674515", oct(012545674515), u));
         BOOST_TEST(u == 012545674515);
+#if UINT_MAX > 4294967296 // > 32 bits only
         BOOST_TEST(!test_attr("12545674515", oct(051547654521), u));
+#endif
 
         BOOST_TEST(test(max_octal, oct(UINT_MAX)));
         BOOST_TEST(test_attr(max_octal, oct(UINT_MAX), u));
@@ -105,7 +109,7 @@
         BOOST_TEST(test("123", uint_(123)[ref(n) = _1]));
         BOOST_TEST(n == 123);
         BOOST_TEST(!test("123", uint_(321)[ref(n) = _1]));
-
+
         BOOST_TEST(test_attr("789", uint_(789)[ref(n) = _1], m));
         BOOST_TEST(n == 789 && m == 789);
         BOOST_TEST(!test_attr("789", uint_(987)[ref(n) = _1], m));
@@ -114,7 +118,7 @@
         BOOST_TEST(n == 456);
         BOOST_TEST(!test(" 456", uint_(654)[ref(n) = _1], space));
     }
-
+
     ///////////////////////////////////////////////////////////////////////////
     // parameterized lazy tests
     ///////////////////////////////////////////////////////////////////////////


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