Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2007-06-07 14:22:49

Umm I just realized that the implementation I posted (see my other post)
hasn't been fully tested.

I had written another implementation which added the allocator parameter
where necessary, and the allocator-less code simply passed an std::allocator
where allocator was required. This means that even when the user does not
supply an allocator, the allocator code is still instantiated in the tests
(even though the allocator might not get used due to optimizations.)

In the implementation I posted, I opted for a parallel line of allocator
support functions next to the original allocator-less functions. I liked
this better because no allocator-related stuff is ever instantiated unless
the user passes an allocator (and most users don't.)

The problem is that most boost::function tests do not use allocators. So
while the allocator code should work (because it got tested in its original
form), in it's current form it has only been proven to pass the
allocator_test.cpp, which is rather simplistic.

To really test everything, one needs to run all tests with the following

- pointer to function
- pointer to member function
- function object that fits the small object optimization
- function object that does not fit the small object optimization
- all of the above variations using an user-supplied allocator.

Emil Dotchevski

Boost list run by bdawes at, gregod at, cpdaniel at, john at