From: degski (degski_at_[hidden])
Date: 2019-06-27 07:06:56
On Thu, 27 Jun 2019 at 09:54, Alexander Grund via Boost <
> Am 27.06.19 um 08:45 schrieb degski via Boost:
> > As from C++11 std::swap is marked noexcept, so yes. As from C++20 it's
> > constexpr, so now it can definitely cannot throw.
> > degski
> Are you sure? According to
> https://en.cppreference.com/w/cpp/algorithm/swap this is only
> non-throwing if it can be moved without throwing
Yes, but std::swap must also not invalidate any references, pointers, or
iterators referring to the elements of the containers being swapped, which
leaves the scope for throwing rather small [if at all possible].
-- @realdegski https://edition.cnn.com/interactive/2019/06/middleeast/saudi-teen-death-penalty-intl/ "Anyone who believes that exponential growth can go on forever in a finite world is either a madman or an economist" - Kenneth E. Boulding
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk