Mercurial > audlegacy
diff Plugins/Input/console/boost/static_assert.hpp @ 90:252843aac42f trunk
[svn] Import the initial sources for console music support.
author | nenolod |
---|---|
date | Tue, 01 Nov 2005 19:57:26 -0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/console/boost/static_assert.hpp Tue Nov 01 19:57:26 2005 -0800 @@ -0,0 +1,22 @@ + +// Boost substitute. For full boost library see http://boost.org + +#ifndef BOOST_STATIC_ASSERT_HPP +#define BOOST_STATIC_ASSERT_HPP + +#if defined (_MSC_VER) && _MSC_VER <= 1200 + // MSVC6 can't handle the ##line concatenation + #define BOOST_STATIC_ASSERT( expr ) struct { int n [1 / ((expr) ? 1 : 0)]; } + +#else + #define BOOST_STATIC_ASSERT3( expr, line ) \ + typedef int boost_static_assert_##line [1 / ((expr) ? 1 : 0)] + + #define BOOST_STATIC_ASSERT2( expr, line ) BOOST_STATIC_ASSERT3( expr, line ) + + #define BOOST_STATIC_ASSERT( expr ) BOOST_STATIC_ASSERT2( expr, __LINE__ ) + +#endif + +#endif +