On Sun, 09 Mar 2003 20:23:39 -0500, David Abrahams <[EMAIL PROTECTED]> wrote:
>is ";" legal where a declaration is expected? > >class X >{ > ; // legal? >}; No. C++ has a "null statement" (expression-statement without the expression part) but not no "null declaration". The grammar seems to allow it but that is incompatible with the semantic restrictions in clause 7. So, in any context where you can have declarations but not statements (e.g. namespace scope) you can't put a free semicolon. 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. But all this conjectures should be backed up by some measurement. Jaap? Genny. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost