BOOST_STATIC_ASSERTはC++0x対応してる

だいぶ前(少なくても1.40.0以降)から対応してるみたいですが、C++0xのstatic_assertを持っている環境では、BOOST_STATIC_ASSERTの中身が以下のようになるようです。

#define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)

GCC 4.5で検証した結果。

#include <boost/static_assert.hpp>

BOOST_STATIC_ASSERT(1 == 2);
int main(){}

C++03

main.cpp:3:1: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'
main.cpp:3:1: error: template argument 1 is invalid
main.cpp:3:28: error: invalid type in declaration before ';' token

C++0x(-std=c++0xオプション)

main.cpp:3:1: error: static assertion failed: "1 == 2"