Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-10-29 05:24:16


Toon Knapen wrote:

> Almost all type_traits tests fail because of a problem in the test-program
> AFAICT (and not in the type_traits code itself). Maybe somebody more familiar
> with the test-program can help me out here : you can find the status at :
>
> http://boost.sourceforge.net/regression-logs/cs-vacpp-full_6.html
>
> and the error msg at :
>
> http://boost.sourceforge.net/regression-logs/cs-vacpp-links_6.html#has_trivial_constructor_test

The first error is:
"../libs/type_traits/test/has_trivial_constructor_test.cpp", line
13.1: 1540-0717 (S) The template argument cannot use an unnamed type.

The source line reads:

BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool>::value,
true);

This is a (well known? at least to me it is...) problem with
BOOST_STATIC_CONSTANT and boost.test and VACPP (well, other compilers
should be affected, too)

For VACPP, BOOST_STATIC_CONSTANT uses an unnamed enum to define
::tt::has_trivial_constructor<bool>::value. boost.test uses the
arguments to the test macro as parameters for a template an this
doesn't work as the compiler error tells us.

This fix should be easy:

BOOST_CHECK_INTEGRAL_CONSTANT(static_cast<bool>(::tt::has_trivial_constructor<bool>::value),
true);

Markus


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