Boost logo

Boost :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-02-05 12:29:45


--- In boost_at_y..., Darin Adler <darin_at_b...> wrote:
> On 2/5/02 8:17 AM, "Alisdair Meredith" <alisdair.meredith_at_u...>
> wrote:
>
> > Shouldn't that be
> >
> > #include <cassert>
> >
> > or have I been picking up odd habits again?
>
> For most C headers, it's necessary to use the C++ version, <cxxx>,
because
> then you don't get identifiers intruding on the global namespace;
they stay
> in namespace std.
>
> But <assert.h> defines only a macro, so there's no difference
between
> <cassert> and <assert.h> except that some platforms lack an
<assert.h>.

Do you mean lack <cassert>. Otherwise the following makes no sense.

> That's why Peter (and then I) used <assert.h>.

<assert.h> is deprecated, so I'd think we'd want to use <cassert>
when possible (i.e. we may need a macro to indicate that some
platform doesn't include a <cassert> and should instead include
<assert.h>). I realize that this seems picky since they are
basically equivalent, but I don't think Boost should use the
deprecated C headers.

Bill Kempf


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