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: [v3] Add missing forward_list<>::splice_after and merge overloads fix splice_after taking a range


On 16 April 2012 20:38, François Dumont wrote:
> A comment in debug/list says:
>
> ? ?// We used to perform the splice_alloc check: ?not anymore, redundant
> ? ?// after implementing the relevant bits of N1599.

Yes, I just found that same comment 20 minutes ago!

> The normal list implementation already throw a runtime_error exception when
> allocators are not equal. Maybe we should do the same thing for
> forward_list, no ?

The main reason for forward_list to exist is for maximum efficiency,
for people who don't want the small extra overhead of std::list, so I
think we should avoid a runtime check in non-debug mode.  I'm willing
to be convinced otherwise if people feel strongly.

I have a patch to add the checks to <debug/forward_list>


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