Boost logo

Boost :

From: Bronek Kozicki (brok_at_[hidden])
Date: 2004-01-05 07:07:32


Dan W. <danw_at_[hidden]> wrote:
>>> #ifdef _DEBUG
>>> # define verify(x) do{if(!((x)))asm int 3;}while(0)

> The only problem with it is that it breaks the C/C++ tradition of
> naming things something completely removed from what they actually
> do... :)

there is another problem. I could have somewhere:

class A {
// ...
  void verify(bool);
};

... and macro named "verify" will completly destroy my project. I
suggest 2 solutions:
- give it different name (uppercase ONE !)
- #undef assert and make it just better "assert" macro

Anyway I remember that John Torjo already posted similar library (named
smart_assert) to boost.

B.


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