Boost logo

Boost :

From: Daryle Walker (dwalker07_at_[hidden])
Date: 2003-06-14 17:01:34

On Saturday, June 14, 2003, at 9:45 AM, Robert Ramey wrote:

> I find BOOST_STATIC_ASSERT(...) extremely useful.
> I would also find BOOST_STATIC_WARNING(...) extremely useful.
> I've looked in boost and now found such a thing. Am I missing
> something? Is there something equivalent? Can such a thing
> be added?
> I envision an implementation of BOOST_STATIC_WARNING that
> would display a compile time warning message but permit
> compilition to successfully complete. Its usage would be
> to notify library users of legal but suspect library usage.

I'm not sure that it can be done, or at least done in a way that's
worth it.

Warnings are completely non-portable, since:

1. They have no official standing in the standard, just errors do
2. They are made up by each compiler vendor
3. They are 100% legal code, the vendor just doesn't like it

These combine into something that cannot be generally tested. We would
have to examine every compiler and make huge conditional test cases.
And what would happen if someone hates warnings and turns them all off?
  It's not practical.


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