Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2019-06-27 15:16:18

On 6/26/19 11:45 PM, degski via Boost wrote:
> On Thu, 27 Jun 2019 at 09:35, Robert Ramey via Boost <boost_at_[hidden]>
> wrote:
>> From time to time I think about this. Is swap guarenteed not to throw?
> As from C++11 std::swap is marked noexcept, so yes. As from C++20 it's also
> constexpr, so now it can definitely cannot throw.

Hmmm - my understanding of noexcept was not that it couldn't throw but
than any attempt to throw would result in immediate termination rather
than an exception. (I'm confused about noexcept as well). In anycase I
should have phrased the above as:

Is swap guaranteed to succeed?

Robert Ramey

Boost list run by bdawes at, gregod at, cpdaniel at, john at