Define static_assert in the same way

Hopefully this won't change anything as we already had a check for it.
However, it is now based compiler checks rather than version numbers.

We haven't use static_assert anywhere in code yet anyway.
This commit is contained in:
Matt Williams 2012-11-23 12:02:57 +00:00
parent c8657943c8
commit 4b2c899dc6
2 changed files with 9 additions and 4 deletions

View File

@ -3,4 +3,6 @@
#cmakedefine HAS_CXX11_CONSTEXPR
#cmakedefine HAS_CXX11_STATIC_ASSERT
#endif

View File

@ -77,9 +77,6 @@ freely, subject to the following restrictions:
#define polyvox_bind boost::bind
#define polyvox_placeholder_1 _1
#define polyvox_placeholder_2 _2
#include <boost/static_assert.hpp>
#define static_assert BOOST_STATIC_ASSERT
//As long as we're requiring boost, we'll use it to compensate
@ -101,7 +98,6 @@ freely, subject to the following restrictions:
#define polyvox_bind std::bind
#define polyvox_placeholder_1 std::placeholders::_1
#define polyvox_placeholder_2 std::placeholders::_2
//#define static_assert static_assert //we can use this
#endif
#if defined(HAS_CXX11_CONSTEXPR)
@ -112,4 +108,11 @@ freely, subject to the following restrictions:
#define polyvox_constexpr
#endif
#if defined(HAS_CXX11_STATIC_ASSERT)
//In this case we can just use static_assert
#else
#include <boost/static_assert.hpp>
#define static_assert BOOST_STATIC_ASSERT
#endif
#endif