mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 20:04:29 +02:00
Rewrite the swap implementation note so that it make some sort of sense.
[SVN r39952]
This commit is contained in:
@@ -115,11 +115,10 @@ There is currently a further issue - if the allocator's swap does throw there's
|
|||||||
no guarantee what state the allocators will be in. The only solution seems to
|
no guarantee what state the allocators will be in. The only solution seems to
|
||||||
be to double buffer the allocators. But I'm assuming that it won't throw for now.
|
be to double buffer the allocators. But I'm assuming that it won't throw for now.
|
||||||
|
|
||||||
Update: the comittee have now decided that swap should do a fast swap if the
|
Update: The comittee have now decided that `swap` should do a fast swap if the
|
||||||
allocator is Swappable and a slow swap using copy construction otherwise. In
|
allocator is Swappable and a slow swap using copy construction otherwise. To
|
||||||
the future I develop support for concepts and do this, but what should I do for
|
make this distinction requires concepts. For now I'm sticking with the current
|
||||||
the current implementation and, in the future, compilers without concepts? I
|
implementation.
|
||||||
should probably change it to a slow swap.
|
|
||||||
|
|
||||||
[h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518
|
[h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518
|
||||||
518. Are insert and erase stable for unordered_multiset and unordered_multimap?]]
|
518. Are insert and erase stable for unordered_multiset and unordered_multimap?]]
|
||||||
|
Reference in New Issue
Block a user