|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60126 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2010-03-03 13:44:43
Author: jewillco
Date: 2010-03-03 13:44:42 EST (Wed, 03 Mar 2010)
New Revision: 60126
URL: http://svn.boost.org/trac/boost/changeset/60126
Log:
Workaround for GCC 3.4 and 4.0 bug
Text files modified:
trunk/boost/graph/one_bit_color_map.hpp | 4 ++++
trunk/boost/graph/two_bit_color_map.hpp | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
Modified: trunk/boost/graph/one_bit_color_map.hpp
==============================================================================
--- trunk/boost/graph/one_bit_color_map.hpp (original)
+++ trunk/boost/graph/one_bit_color_map.hpp 2010-03-03 13:44:42 EST (Wed, 03 Mar 2010)
@@ -42,7 +42,11 @@
{
BOOST_STATIC_CONSTANT(int, bits_per_char = std::numeric_limits<unsigned char>::digits);
BOOST_STATIC_ASSERT(std::numeric_limits<unsigned char>::radix == 2);
+#if (__GNUC__ == 3 && __GNUC__ == 4) || (__GNUC__ == 4 && __GNUC_MINOR__ == 0)
+ // A version of this test in two_bit_color_map fails on GCC 3.4 and 4.0
+ // according to Ralf W. Grosse-Kunstleve
BOOST_STATIC_ASSERT(bits_per_char > 0);
+#endif
std::size_t n;
IndexMap index;
shared_array<unsigned char> data;
Modified: trunk/boost/graph/two_bit_color_map.hpp
==============================================================================
--- trunk/boost/graph/two_bit_color_map.hpp (original)
+++ trunk/boost/graph/two_bit_color_map.hpp 2010-03-03 13:44:42 EST (Wed, 03 Mar 2010)
@@ -49,7 +49,10 @@
BOOST_STATIC_CONSTANT(int, bits_per_char = std::numeric_limits<unsigned char>::digits);
BOOST_STATIC_CONSTANT(int, elements_per_char = bits_per_char / 2);
BOOST_STATIC_ASSERT(std::numeric_limits<unsigned char>::radix == 2);
+#if (__GNUC__ == 3 && __GNUC__ == 4) || (__GNUC__ == 4 && __GNUC_MINOR__ == 0)
+ // This test fails on GCC 3.4 and 4.0 according to Ralf W. Grosse-Kunstleve
BOOST_STATIC_ASSERT(elements_per_char > 0);
+#endif
typedef typename property_traits<IndexMap>::key_type key_type;
typedef two_bit_color_type value_type;
typedef void reference;
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