Updated static assert

This commit is contained in:
Christophe Riccio 2011-01-18 22:31:06 +00:00
parent 20e52ebdab
commit 2a9bf3951a
2 changed files with 7 additions and 5 deletions

View File

@ -41,6 +41,7 @@ namespace glm
typename vecType<bool>::bool_type Result(vecType<bool>::null); typename vecType<bool>::bool_type Result(vecType<bool>::null);
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i) for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
Result[i] = x[i] < y[i]; Result[i] = x[i] < y[i];
return Result; return Result;
} }

View File

@ -13,7 +13,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Version // Version
#define GLM_VERSION 90 #define GLM_VERSION 91
#define GLM_VERSION_MAJOR 0 #define GLM_VERSION_MAJOR 0
#define GLM_VERSION_MINOR 9 #define GLM_VERSION_MINOR 9
#define GLM_VERSION_PATCH 1 #define GLM_VERSION_PATCH 1
@ -376,12 +376,13 @@
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Static assert // Static assert
// TODO: Added static_assert support for G++ when C++0x is used.
#if((GLM_COMPILER & GLM_COMPILER_VC && GLM_COMPILER >= GLM_COMPILER_VC2010) || (GLM_COMPILER & GLM_COMPILER_GCC && GLM_COMPILER >= GLM_COMPILER_GCC47)) #if((GLM_COMPILER & GLM_COMPILER_VC && GLM_COMPILER >= GLM_COMPILER_VC2010) || (GLM_COMPILER & GLM_COMPILER_GCC && GLM_COMPILER >= GLM_COMPILER_GCC47))
#define GLM_STATIC_ASSERT(x, message) static_assert(x, message) # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
#elif(defined(BOOST_STATIC_ASSERT)) #elif(defined(BOOST_STATIC_ASSERT))
#define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x) # define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
#else #else
#define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1] # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
#endif//GLM_DEPENDENCE #endif//GLM_DEPENDENCE
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////