Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2003-05-08 02:46:40


"John Torjo" <john_at_[hidden]> wrote in message
news:004c01c31529$5af25820$01211bac_at_PEOPLEFIRST...
> > I wonder it something like this would be possible:
> > void foo() {
> > int* x = ENFORCE_ASSERT(get_something());
> > // equivalent to:
> > // int* x = get_something();
> > // if (!x) { assert(false); return; }
>
> TRUE!!!
> I could allow for BOOST_VERIFY - something like the MFC's VERIFY.
> And, I will have to allow for some syntax to be able to return something
> from the function.

I think ENFORCE_ASSERT would be a bit confusing. Enforcements and assertions
serve very very different purposes. How about ALWAYS_ASSERT?

Andrei


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