This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
http://cplusplus.github.com/LWG/lwg-active.html#2103

> (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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]