This is the mail archive of the
mailing list for the libstdc++ project.
Re: Rewriting bitmap_allocator
On 25 July 2012 23:36, Dhruv Matani wrote:
> Thanks Jonathan!
> So, just to confirm, I need to determine if the current allocator can
> be passed to std::allocator_traits<Alloc>
It can be. The current allocator meets the C++03 allocator
requirements, so can be used with allocator_traits.
There's no need to check anything else. If bitmap_allocator is
supposed to be a drop-in replacement for std::allocator then it needs
to be stateless, and the default behaviour provided by
allocator_traits is correct for that case, except that it should
define propagate_on_container_move_assignment to true, see
> (which happens to be
> available only post 4.6.2) right?
4.7.0 onwards, but I would expect any changes to bitmap_allocator to
only be done on trunk (4.8) anyway.