> Anyway, as Terje says, if the compile-time cost of the static
> assertion is mainly in the evaluation of the condition then the
> 'release mode' definition could simply be
>
> #define BOOST_STATIC_ASSERT(c)  \
>            typedef char boost_static_assert_typedef
>
> When using several asserts in the same context some compilers could
> complain about the duplicate typedef; if so pasting the expansion of
> __LINE__ shouldn't be that expensive either.

That seems indeed the best solution to me (with the __LINE__ included) as
most of the time is spend in calculations for the actual expression.

> But all this conjectures
> should be backed up by some measurement. Jaap?

Agreed. I will do some measurements this week and report back in a few days.

Regards,

Jaap Suter





_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to