Justin Erenkrantz wrote:
> --On Thursday, November 11, 2004 1:19 AM +0100 "Branko ?ibej"
> <brane@xbc.nu> wrote:
>
>>> I'm not sure how you'd have it defined to be the same. The expansion
>>> of assert() is different on each platform, IIRC.
>>
>>
>> Yes, but the following would almost do the trick:
>>
>> #define verify(x) do { assert(x); if (!(x)) abort(); } while(1)
>
>
> But, you'd incur a double penalty when assert is defined. That's
> badness, IMHO. -- justin
>
As an impartial, outside observer, would the following (or similar) be
appealing to people instead?
#ifdef NDEBUG
#define verify(x) <whatever you want to use>
#else
#define verify(x) <whatever you want to use>
#endif
Just my $0.02.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 11 02:05:06 2004