[smart_ptr] BOOST_SP_USE_QUICK_ALLOCATOR and multi-threading broken on gcc-4.0.2

Hi ! I'm using smart_ptr (read shared_ptr) and BOOST_SP_USE_QUICK_ALLOCATOR to speed my program up. My programs broke when "boost/detail/quick_allocator.hpp" Revision 1.9 was commited to HEAD. I've been able to reproduce this behaviour with the smart_ptr testcase and Boost.Build V2 which the attached path "smart_ptr.diff" to libs/smart_ptr/test/Jamfile.v2 I'm cross-posting this to boost-build because the simple command bjam --v2 threading=multi/define=BOOST_SP_USE_QUICK_ALLOCATOR did not work. See build-error.txt for full backtrace. The gcc error is ../../../boost/detail/quick_allocator.hpp:176: error: conflicting declaration 'boost::detail::lightweight_mutex boost::detail::allocator_impl<size, align_>::mutex_init' ../../../boost/detail/quick_allocator.hpp:81: error: 'boost::detail::allocator_impl<size, align_>::mutex_init' has a previous declaration as 'boost::detail::lightweight_mutex * boost::detail::allocator_impl<size, align_>::mutex_init' Please find the error message "error.txt" attached. System: Debian Unstable/testing gcc -v : gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5) I've tried the obvious fix by adding the missing asterisk (*) gcc complains about but then gcc bails out with ../../../boost/detail/quick_allocator.hpp:176: error: expected primary-expression before 'allocator_impl' (see fix-error.txt) I've checked my copy of "C++ Templates" for static template member (page 97/98) but have no other clue and no copy of the holy standard... Question: Is this a bug or a feature ? Question: Is there any way to add tests for BOOST_SP_USE_QUICK_ALLOCATOR and treading=multi to Boost.Test (V2) in order to catch such a regression. Question: Can someone reproduce this ? Question: If this is a bug, whats the fix ? Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Institut für Verkehrswesen, Eisenbahnbau * voice: ++49 511 762-2529 ! und -betrieb, Universität Hannover * fax : ++49 511 762-3001 ! Appelstrasse 9a, D-30167 Hannover * hunold@ive.uni-hannover.de ! www.ive.uni-hannover.de
participants (1)
-
Juergen Hunold