| 1 | |
| 2 | // Boost substitute. For full boost library see http://boost.org |
| 3 | |
| 4 | #ifndef BOOST_STATIC_ASSERT_HPP |
| 5 | #define BOOST_STATIC_ASSERT_HPP |
| 6 | |
| 7 | #if defined (_MSC_VER) && _MSC_VER <= 1200 |
| 8 | // MSVC6 can't handle the ##line concatenation |
| 9 | #define BOOST_STATIC_ASSERT( expr ) struct { int n [1 / ((expr) ? 1 : 0)]; } |
| 10 | |
| 11 | #else |
| 12 | #define BOOST_STATIC_ASSERT3( expr, line ) \ |
| 13 | typedef int boost_static_assert_##line [1 / ((expr) ? 1 : 0)] |
| 14 | |
| 15 | #define BOOST_STATIC_ASSERT2( expr, line ) BOOST_STATIC_ASSERT3( expr, line ) |
| 16 | |
| 17 | #define BOOST_STATIC_ASSERT( expr ) BOOST_STATIC_ASSERT2( expr, __LINE__ ) |
| 18 | |
| 19 | #endif |
| 20 | |
| 21 | #endif |
| 22 | |
| 23 | |