Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2005-05-15 19:34:34


Rene Rivera wrote:

> Aha, fixed it!!
>
> There is now a custom version of static_assert for CW-8.x:
>
> // special version for CodeWarrior <= 8.x
> #define BOOST_STATIC_ASSERT( B ) \
> BOOST_STATIC_CONSTANT(int, \
> BOOST_JOIN(boost_static_assert_test_, __LINE__) = \
> sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) )
>
> Which, for example, translates to:
>
> static const int boost_static_assert_test_10 =
> sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( N < 2 ) >) ;
>
> This forces the template instantiation on both function and non-function
> context. So for the first time all static_assert tests pass for this
> compiler :-) -- And this should also clear all the Spirit tests.

Wow! Thanks a bunch! Rene!

Cheers,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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