Exceptional safety: the benefits of nothrow replacement
If a type has a swap function that cannot fail, it can make it easier for other functions to provide a strong security guarantee . This is due to the fact that we can first do all the work of the function, which can go out of order, and then do the work using non-flipping swaps.
However, are there any other benefits of making sure swap never fails?
For example, is there a situation where having a no-fail shift makes it easier to provide another function with a basic guarantee?
+3
source to share