|
Boost : |
Subject: Re: [boost] [review] Review of PolyCollection starts today (May 3rd)
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2017-05-15 19:29:54
On 15/05/2017 19:46, Thorsten Ottosen via Boost wrote:
>> As for noexcept in std unordered associative containers, I don't have
>> a clue why
>> move construction is not marked conditionally noexcept the way move
>> assignement
>> is... given this messy state I'd prefer to rely on =default before
>> committing to any
>> noexcept guarantees.
>
> Sounds reasonable. As I stated, it appears to me that you will take
> advantage of noexcept if it exists in the standard container.
It might be related to sentinel nodes. They are used in lists and
ordered associative containers from Dikum STL from early versions.
Sentinel nodes can't be transferred if source container invariants must
be preserved.
Reviewing Dinkum STL code it seems that std::unordered_xxx uses
std::list internally, so sentinel nodes are allocated when move
constructing an unordered_xxx and thus move constructor can't be noexcept.
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk