Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 1999-09-01 22:32:21


>I don't think we want to supply headers with even potential ODR
>violations in them.

I don't think this is so cut-and-dried. Any header has a potential ODR
violation in it if you let people use macros:

// foo.h
namespace boost
{
    struct foo { int x; };
}

// f1.cpp
#define int long
#include <boost/foo.h>

// f2.cpp
#include <boost/foo.h>

That's not so far from what NDEBUG does.

> Dave Abrahams must be gnashing his teeth - it was his desire for the
> non-throwing version (with assert) of polymorphic_cast that started
> the whole idea of boost casts.

Actually, I haven't been paying attention. I practice a style of C++ where I
can't get myself in trouble by moving implementations into inline functions
in header files. That means a single value of NDEBUG for an entire project.

My impression is that this whole thing has gotten way out-of-hand.

-Dave


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