This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/14245] problem with user-defined allocators in std::basic_string


------- Additional Comments From pcarlini at suse dot de  2004-02-25 15:53 -------
> What should be improved (notice, *improved* as a QoI issue, the current
> behavior is standard conforming) is what we do for the first argument:
> _M_grab (basing on _Alloc(), and __str.get_allocator()) either calls
> _M_refcopy or _M_clone(__alloc1), that is _M_clone(_Alloc()), that is does
> *not* use the allocator of the new string!

Actually *this* behavior seems wrong, not just a QoI issue. Bad things can
happen at deallocation time, when the real allocator of the string will be
used...



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14245


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