Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2008-07-19 08:58:30


Author: djowel
Date: 2008-07-19 08:58:30 EDT (Sat, 19 Jul 2008)
New Revision: 47596
URL: http://svn.boost.org/trac/boost/changeset/47596

Log:
possible fix for gcc, linux, etc.
Text files modified:
   branches/release/libs/spirit/test/qi/range_run.cpp | 9 +++++----
   1 files changed, 5 insertions(+), 4 deletions(-)

Modified: branches/release/libs/spirit/test/qi/range_run.cpp
==============================================================================
--- branches/release/libs/spirit/test/qi/range_run.cpp (original)
+++ branches/release/libs/spirit/test/qi/range_run.cpp 2008-07-19 08:58:30 EDT (Sat, 19 Jul 2008)
@@ -19,15 +19,16 @@
 template <typename Char>
 void acid_test()
 {
+ if (sizeof(Char) == sizeof(unsigned))
+ return; // don't do this test if we have a Char that's very big.
+ // the smaller chars will suffice for testing.
+
     using boost::spirit::qi::detail::range_run;
     using boost::spirit::qi::detail::range;
 
     typedef boost::integer_traits<Char> integer_traits;
     Char const const_min = integer_traits::const_min;
- // if Char has same size as unsigned, we back-off 1 bit to not
- // overflow dynamic_bitset
- Char const const_max = (sizeof(Char) == sizeof(unsigned)) ?
- integer_traits::const_max-1 : integer_traits::const_max;
+ Char const const_max = integer_traits::const_max;
     unsigned bit_set_size = unsigned(const_max)-unsigned(const_min)+1;
     int const test_size = 1000;
 


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