|
Boost : |
Subject: Re: [boost] [dynamic_bitset] proposed fix for ticket #2842
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-05-10 12:55:48
> I have suffered the effects described on ticket #2842:
> "dynamic_bitset.hpp fails to compile with g++ (Ubuntu 4.3.3-5ubuntu2)
> 4.3.3" after upgrading from Ubuntu 8.10 to 9.04.
>
> After some testing, I have found a possible fix, but I would like to
> know how may I test thoroughly over as many compiler/versions as
> possible before I may suggest its inclusion in trunk.
I applied your (slightly modified) patch to SVN trunk in the hope the
authors don't object as it fixes a Spirit regression we're facing on the
very same platform.
Thanks!
Regards Hartmut
>
> Fix data:
>
> -- tested under gcc versión 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
> -- tested under gcc versión 4.1.2 20080704 (Red Hat 4.1.2-44)
> -- Patch data:
> <PATCH>
> Index: boost/dynamic_bitset/dynamic_bitset.hpp
> ===================================================================
> --- boost/dynamic_bitset/dynamic_bitset.hpp (revision 52752)
> +++ boost/dynamic_bitset/dynamic_bitset.hpp (working copy)
> @@ -999,11 +999,17 @@
> using detail::dynamic_bitset_impl::access_by_blocks;
> using detail::dynamic_bitset_impl::value_to_type;
>
> +#if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ >= 3)
> + // NOTE: Explicitly qualificationf of "bits_per_block"
> + // breaks compilation on gcc 4.3.3
> + const bool no_padding = bits_per_block == CHAR_BIT *
> sizeof(Block);
> +#else
> // NOTE: Explicitly qualifying "bits_per_block" to workaround
> // regressions of gcc 3.4.x
> const bool no_padding =
> dynamic_bitset<Block, Allocator>::bits_per_block
> == CHAR_BIT * sizeof(Block);
> +#endif
>
> const bool enough_table_width = table_width >= CHAR_BIT;
>
>
> </PATCH>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk