Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-05 06:59:00

Alan Bellingham wrote:
>>That's more or less the same as contained in almost every <assert.h> header.
>>So what's new with your suggestion?
> Not only is it very similar to the assert macro, but it _isn't_
> consistent with the VERIFY macro offered by Microsoft in MFC.

Damn MS! I wasn't aware; never used MFC...

> In MFC, VERIFY(x) expands to (void)(x) in release mode - meaning that
> the expression is always evaluated, unlike the ASSERT macro which
> disappears in release mode. This distinction is useful because sometimes
> you do want the expression evaluated in order to achieve the side
> effects.

Not as an argument, just a personal comment...


  I find that SOOOO distasteful! In my coding I religiously respect
command <-> query separation: Either a function returns a value but has
no side-effects; or has side-effects but returns void. And it has
served me well.

And to think that such constructs must be supported and be mindful of,
just makes my blood boil..


> Oh, I'd also strongly recommend _not_ introducing new macros with
> lowercase names - they're much less likely to cause naming clashes.

Allright, will ENSURE() do?

Boost list run by bdawes at, gregod at, cpdaniel at, john at