Boost logo

Boost :

From: Arturo R Montesinos (aramirez_at_[hidden])
Date: 2000-11-05 14:07:39

> Accepted, however how do people want the error message to read, retain
> for consistency?

I would argue that "compile-time assert" is MUCH less confusing.

When I do something like this at file scope:

#define AUX2_PASTE(X,Y) X##Y
#define PASTE(X,Y) AUX1_PASTE(X,Y)
#define assertonexit(x) static struct PASTE(STATICCHECK,__LINE__) \


bool initd = false;
assertonexit( initd==false ); // assert that initd is false on shutdown

Can I not call this a "static assert" with more property than boost's
proposed usage?

One of the more original meanings of "static" refers only to the lifetime
of an object, and I would venture that anyone would be hard pressed to
find anything "static" about what is essentially a compile-time assertion.

There are already too many meanings for "static" going around (plus we
all know how badly C++ overloaded THAT keyword), so why add even more?

Arturo R Montesinos
arturorm_at_[hidden], aramirez_at_[hidden]
Madrid, Spain

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