|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-12-04 14:16:11
Gennaro Prota <gennaro_prota_at_[hidden]> writes:
> On Wed, 04 Dec 2002 10:07:48 -0500, David Abrahams
> <dave_at_[hidden]> wrote:
>
>
>>No. There are several instances like the one I cited in our test suite
>>(the function lib, I think).
>
> Now I see, thanks. Unfortunately this is one of those typical
> situations where if one writes the code in order to silent a warning
> (or worse, an error) with a given compiler he gets the opposite
> warning (in this case an "unreachable code") with others. With simple
> functions like e.g.
>
>
> int f() { throw xyz(); }
>
> one can get out of trouble with a (well-commented)
>
> int f() { return throw xyz(), 0; }
>
>
> but I don't know if that's ok for your case (and anyway whether you
> find it preferable to a macro)
I don't. The macro is clearer.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk