
Hi Jeremiah, I just re-tested with 3.4 and 4.0 and it works now. Thanks! BTW: sorry I forgot to mention before: gcc 3.3 was fine even with the assert. Ralf ----- Original Message ---- From: Jeremiah Willcock <jewillco@osl.iu.edu> To: boost@lists.boost.org Sent: Wed, March 3, 2010 10:51:38 AM Subject: Re: [boost] [graph] gcc 3.4 & 4.0 currently broken On Wed, 3 Mar 2010, Ralf W. Grosse-Kunstleve wrote:
boost svn trunk rev 60079 broke our gcc 3.4 and 4.0 builds (various platforms). The problem is line 52 in boost/graph/two_bit_color_map.hpp
BOOST_STATIC_ASSERT(elements_per_char > 0);
It fails with (gcc 3.4 in this case):
% g++ -o boost/libs/python/src/object/inheritance.o -c -DBOOST_PYTHON_MAX_BASES=2 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_BOOL_INT_STRICT -fPIC -fno-strict-aliasing -w -DNDEBUG -O3 -ffast-math -ftrapping-math -DBOOST_ALL_NO_LIB -DBOOST_DISABLE_THREADS -I/net/chevy/raid1/rwgk/hot/boost -I/usr/include/python2.3 /net/chevy/raid1/rwgk/hot/boost/libs/python/src/object/inheritance.cpp In file included from /net/chevy/raid1/rwgk/hot/boost/boost/graph/breadth_first_search.hpp:26, from /net/chevy/raid1/rwgk/hot/boost/libs/python/src/object/inheritance.cpp:7: /net/chevy/raid1/rwgk/hot/boost/boost/graph/two_bit_color_map.hpp:52: error: non-constant `(((int)boost::two_bit_color_map<IndexMap>::elements_per_char) > 0)' cannot be used as template argument /net/chevy/raid1/rwgk/hot/boost/boost/graph/two_bit_color_map.hpp:52: error: `value' is not a member of `<declaration error>'
Commenting out line 52 resolves the error. I printed the value of elements_per_char and it appears to be correct (4).
There is no problem with gcc 3.2 and gcc 4.1 through 4.4.
Maybe a BOOST_WORKAROUND to disable the static assert for 3.4 and 4.0?
I ended up dropping the asserts entirely; the radix for integers must be two as far as I know and unsigned char must have at least two digits in that radix. -- Jeremiah Willcock