$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] rvalue ref best practices?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-06-15 13:46:19
On 15/06/2012 17:59, Dave Abrahams wrote:
> 1. How can you tell whether bar failed or the assignment failed, here?
If I know that T::operator= has the strong guarantee, I know that foo
will always be in either of two states: either bar() succeeds, and it
has the new value returned by bar(), or it failed, and it has the old value.
If overloading were allowed to take foo, half-modify it, then fail, then
that wouldn't be true anymore.
> 2. Do you really write code like that?
Of course, what would be the point of exceptions is not to catch them?