From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2005-05-10 07:53:35
On May 10, 2005, at 6:29 AM, John Maddock wrote:
>> Does anyone know of any weird behavior from allocators in VC 8.0? The
>> Function library uses allocators when available, but the two tests of
>> allocators (allocator_test and function_test) are failing on VC 8.0
>> (but not 7.1). From the config info, I see that
>> BOOST_HAS_PARTIAL_STD_ALLOCATOR is defined but BOOST_NO_STD_ALLOCATOR
>> is not (boost::function uses the latter).
>> The actual failure is here: http://tinyurl.com/dq3lh
>> Could someone with access to VC 8.0 (beta 2, I guess) check to see
>> what is happening here?
> It's the first fallout from the recent type_traits changes, but it's a
> bug in the test case that's being exposed:
> Boost::function doesn't allocate any storage if the function object is
> stateless, and VC8 is now the first compiler to automatically detect
> stateless user-defined types via is_stateless, so Boost.Function
> assignment goes via:
> template<typename FunctionObj>
> void assign_to(FunctionObj,
> which doesn't use an allocator at all, hence the failed tests.
Amazing! Thank you for tracking this down.
> I think the solution is to fix the tests to use function objects that
> do have state.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk