Autodetect C++ version using __cplusplus value, issue #62

This commit is contained in:
Christophe Riccio 2013-03-17 12:59:59 +01:00
parent 96ecbbb28b
commit 356e70e653

View File

@ -432,20 +432,19 @@
#elif(defined(GLM_FORCE_CXX98))
# define GLM_LANG GLM_LANG_CXX98
#else
// -std=c++0x or -std=gnu++0x
# if(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__))
# if(__cplusplus >= 201103L)
# define GLM_LANG GLM_LANG_CXX11
# elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__))
# define GLM_LANG GLM_LANG_CXX0X
# elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && defined(_MSC_EXTENSIONS))
# define GLM_LANG GLM_LANG_CXXMS
# elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && !defined(_MSC_EXTENSIONS))
# if(GLM_COMPILER >= GLM_COMPILER_VC2010)
# if(GLM_COMPILER == GLM_COMPILER_VC2010)
# define GLM_LANG GLM_LANG_CXX0X
# else
# define GLM_LANG GLM_LANG_CXX98
# endif//(GLM_COMPILER == GLM_COMPILER_VC2010)
# elif((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) //&& defined(__STRICT_ANSI__))
# define GLM_LANG GLM_LANG_CXX98
# elif((GLM_COMPILER & GLM_COMPILER_CLANG) == GLM_COMPILER_CLANG)
# elif(__cplusplus >= 199711L)
# define GLM_LANG GLM_LANG_CXX98
# else
# define GLM_LANG GLM_LANG_CXX