Boost logo

Boost :

From: Dave Harris (brangdon_at_[hidden])
Date: 2005-10-02 07:07:23


In-Reply-To: <200509282055.j8SKtbXI017230_at_[hidden]>
stewart_at_[hidden] (Rob Stewart) wrote (abridged):
> if (!e)
> {
> BOOST_ASSERT(false);
> __assume(false);
> }
>
> The optimizer can't elide the entire else clause because
> BOOST_ASSERT(false) is in it.

Do you agree that if the code was:

    int x = 0;
    if (!e) {
        ++x;
        __assume(false);
    }
    cout << x;

then the compiler can elide the increment?

At this stage I am trying to convince myself that you understand the point
I was making, whether or not you agree with how it applies to
BOOST_ASSERT. __assume(false) can have retrospective effects.

-- Dave Harris, Nottingham, UK.


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