Boost logo

Boost :

Subject: Re: [boost] rvalue ref best practices?
From: bibil (bibil.thaysose_at_[hidden])
Date: 2012-06-16 00:48:00


On 6/16/2012 12:24 AM, Dave Abrahams wrote:
> on Fri Jun 15 2012, Mathias Gaunard <mathias.gaunard-AT-ens-lyon.org> wrote:
>
>> On 15/06/2012 17:59, Dave Abrahams wrote:
>>
>> 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?
> Usually you want to do something with the exception once caught; your
> code doesn't do that. And code where the catch block doesn't rethrow
> tends to be incredibly rare.
>

I hope this isn't too OT, but this statement, although subjective,
doesn't seem true to me:

"... code where the catch block doesn't rethrow tends to be incredibly
rare."

Is there more context to this statement, or is that intended to be a
general truth? If you're talking about writing a library then it seems
natural that you want the users of that library to make decisions about
how to handle exceptions, but OTOH I don't think you want to terminate
an application every time an exception is thrown (do you?). Since this
is a Boost mailing list you probably mean that _library_ code that isn't
exception neutral is incredibly rare. That seems more true to me, but I
would only add 'well-written' before library.

Greg


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk