[cfe-dev] [libc++][Bug] Using allocators with std::map
Furkan Usta via cfe-dev
cfe-dev at lists.llvm.org
Sun Aug 7 06:21:28 PDT 2016
I guess, I've found 2 bugs. I am not sure whether I should send this 2
separate mails. It is my first time, sorry about that.
1-) Custom allocator with explicit copy constructor
Here is the non-working code:
My reasoning is, in map constructor
map(const allocator_type& __a)
__a is an allocator with std::pair. However, __tree_ is instantiated
with __value_type. It requires copy construction which is explicit.
2-) operator=, propagate_on_container_copy_assignment
propagate_on_container_copy_assignment is true and comparison always
returns false. Thus, it should use this->allocator to deallocate and
other.allocator to allocate.
Although in the example it doesn't even allocate, I guess it is
because there is
some sort of caching system, in the code it does
Then caches the nodes to be deleted in __assign_multi, but allocator
If they are really bugs, should I still open an issue in bugzilla or
is this mail enough?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev