From: Nevin Liber (nevin_at_[hidden])
Date: 2019-05-30 17:30:53
On Wed, Apr 17, 2019 at 7:42 AM Andrzej Krzemienski via Boost <
> Some implementations of std::list throw from their move constructors and
> default constructors. I understand that the implementation is easier if
> even an empty list has a dummy node, which requires allocation.
While the authors can certainly chime in (some lurk here sometimes) I have
never heard them make the argument that it is about ease of implementation.
If the nodes are in the heap, end iterators are preserved when swapping or
moving (as they are for vector). I also vaguely remember something about
fancy pointers and sentinel nodes, but I don't know fancy pointers.
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden] <nevin_at_[hidden]>> +1-847-691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk