Boost logo

Boost :

From: Nathan Myers (ncm_at_[hidden])
Date: 2000-07-29 13:49:00

David Abrahams wrote:
> From: "Nathan Myers" <ncm_at_[hidden]>
> > I agree BOOST_COMPILE_TIME_ASSERT() would work, but [...]
> > "there's a lot to be said for brevity".
> ...
> > BOOST_PROVEN() is simply a lot shorter, leaving room for a lot
> > more expression in the parentheses. Likewise BOOST_BEHOLD() or
> > BOOST_WE_KNOW(). BOOST_STATIC_ASSERT() is at least shorter than
> > Dave's current favorite.
> I actually like BOOST_STATIC_ASSERT, but was afraid to induce the wrath of
> the "static overloading" gods.

Boldness and courage are indispensable design tools. "Static" as used
here is precisely correct in the original sense.
> I'm not so happy with those others. If you think X is proven to be true,
> there's no point in adding a construct that breaks the compile if X is
> false. Or let me say that differently: we often want to assert a condition
> which is manifestly _not_ proven to be true so that we can enforce proper
> usage.

The point was that by the time the program has compiled successfully,
it _has_ been proven true. Maybe that's too subtle.

> That works against BOOST_PROVEN and BOOST_WE_KNOW. BOOST_BEHOLD is
> just too prestidigitatory (?) for my taste ;)

I take it that BOOST_VOILA is right out?

OK, I'm with Dave for BOOST_STATIC_ASSERT().

Nathan Myers
ncm at cantrip dot org

Boost list run by bdawes at, gregod at, cpdaniel at, john at