> Then how about simply: > > #ifndef STATIC_NDEBUG > # define BOOST_STATIC_ASSERT2(e) BOOST_STATIC_ASSERT(e) > #else > # define BOOST_STATIC_ASSERT2(e) > #endif
I guess that ';' would work in most cases. I can't think of a case where it wouldn't, although it can give warnings on some compilers (try closing a namespace with curly-brace-semi-colon on some compilers). Alternatively, we could use:: > #ifndef STATIC_NDEBUG > # define BOOST_STATIC_ASSERT2(e) BOOST_STATIC_ASSERT(e) > #else > # define BOOST_STATIC_ASSERT2(e) BOOST_STATIC_ASSERT(true) > #endif I'm wondering why we want to make this a 2nd static_assert at all. It seems to me that once we acknowledge that a compile-time program 'runs' at compile time, we have a compile time 'debug' and 'release' mode with the accompanying debug and release versions of the compile time assert. I would like to see the primary STATIC_ASSERT defined this way, but that's just me of course :). Regards, Jaap Suter _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
