If I have an object e
of type Error
which implements a move constructor, will throwing std::move( e )
use the move constructor of Error
to "duplicate" e
, so does it avoid making an actual copy of the object? So if I have
Error e;
throw std::move( e );
will the copy constructor of Error
be called or not? This is of interest when your move constructor is noexcept
(as it should be), but your copy constructor isn't.