|
Boost : |
From: Jon Kalb (jonkalb_at_[hidden])
Date: 2003-05-07 21:29:11
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Thorsten Ottosen
> Sent: Wednesday, May 07, 2003 3:32 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: smart assert (was: ENFORCE/ better
> assertion technique)
>
>
> "John Torjo" <john_at_[hidden]> wrote in message
> news:002b01c314a5$f4e58df0$01211bac_at_PEOPLEFIRST...
> > Hi all,
>
> > BOOST_ASSERT:
> > (a full-featured ASSERT)
>
> I know there is this thing with macros that makes all boost
> macros into BOOST_XX, but for something that is widely used
> in "normal" code I would prefer just ASSERT. How many
> libraries/compilers will we clash with for this to happen?
> Don't MFC uses ASSERT? Anyway, couldn't we just do something like
>
> #ifdef ASSERT
> #undef ASSERT
> #define ASSERT ...
This works for Boost code, but developers of projects that do have
ASSERT defined may not be too thrilled to include a header that
redefines their macro.
If you think BOOST_ASSERT is too much to type you can define a shorter
macro for use in your project(s). It won't be hard for you to choose a
name that isn't currently used in *your* project(s), but it would be
hard to choose a shorter name for BOOST_ASSERT that wouldn't collide
with some name on *any* project.
Jon Kalb
jonkalb_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk