incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: list::splice() and _RWSTD_NO_LIST_NODE_BUFFER macro
Date Thu, 15 Feb 2007 22:25:31 GMT
Farid Zaripov wrote:
>   If the _RWSTD_NO_LIST_NODE_BUFFER macro is not defined, then
> list::splice() method do not conform the stadnard requirements (linear
> complexity instead of constant time; invalidated iterators after
> operation).

That's correct :( (If we don't have one yet, we should open
a bug report in Jira with a test case demonstrating the
problems.)

>  
>   I see that the _RWSTD_NO_LIST_NODE_BUFFER macro is not defined
> by default.

Also correct :(

>  
>   Perhaps that macro should be defined by default?

It's definitely something to think about. As Liviu mentioned,
we discussed it a while back and decided to leave the current
non-conforming implementation enabled by default. Apparently
some users preferred fast insertion over fast (and conforming)
splicing.

I've thought about it several times since then and my feeling
is that we should probably change our implementation to provide
conforming semantics by default. Users who care more about the
speed of insertion should pick a different container (such as
deque).

If we do make the change, I think we might as well remove the
current default implementation altogether.

Thoughts?

Martin

Mime
View raw message