Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-11-14 14:06:37


static_assert should be accepted by boost, assuming the issues below can be
resolved without turning up any serious problems (other than the usual
compiler bugs).

Issues:

* static_assert_test.cpp, static_assert_example_1.cpp, etc, assume
sizeof(int)==4 in several places, and sizeof(int)>=4 in others. Neither is
correct; sizeof(int)==2 is not unheard of, for example.

* static_assert_example_1.cpp uses WCHAR_MIN, which apparently isn't
defined in any Borland headers.

* static_assert_example_2.cpp contains two calls to the function template.
The last one is supposed to fail, but even after commenting it out, the
supposedly correct first one still fails for the Borland and Metrowerks
compilers.

* static_assert_example_3.cpp contains three example instantiations. The
last 2 are supposed to fail, but even after commenting those out, the
supposedly correct first one still fails for the Borland and Metrowerks
compilers.

* static_assert_test_fail_5.cpp, static_assert_test_fail_7.cpp, and
static_assert_test_fail_8.cpp compile without error on Metrowerks CW
6.0. They fail as expected with Borland and Microsoft.

Comments:

The example programs should uniformly compile OK without commenting
anything out. This is particularly expected since the
static_assert_test_fail_* programs uniformly are supposed to fail to
compile.

The docs should link to each of the example and test_fail programs, perhaps
in a table with a 2nd column explaining what each program is supposed to
illustrate.

I'm satisfied with the BOOST_STATIC_ASSERT name.

--Beman


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