Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-07-29 07:26:14


On Wed, Jul 28, 2004 at 04:55:32PM +0100, Jonathan Wakely wrote:

>
> In boost/mpl/if.hpp the BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN macro
> is inside a test for BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION, but the
> corresponding BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END is after the #endif
> that matches the test. This doesn't cause an error, since those macros
> only expand to anything meaningful for GCC3, which enters the first
> branch of the #if, so the begin/end macros are balanced - but it ain't
> right.
>
> Bug was found due to an error with missing #endif, which made GCC3
> take a different path through that file and error.
>
> Note also those macros are spelled "AGLORITHM" not ALGORITHM.
>
> Untested patch attached.

That patch was wrong, I think. Since GCC sometimes takes the
BOOST_NO_TEMPLATE_PARTIAL_SPECIALISATION path (when that macro is
defined explicitly by e.g. libs/range/test/partial_workaround.cpp) the
namespace begin/end macros should be outside the
BOOST_NO_TEMPLATE_PARTIAL_SPECIALISATION test so the namespace is there
whichever code path the compiler takes. At least I think that's right.

The patch attached to this mail should be used instead of the previous
one (assuming my analysis is right).

Going on holiday for the next 4 days, so I'm in no rush for this to be
fixed.

jon

-- 
"Strange how potent cheap music is."
	- Noël Coward



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk