VS2015 did not support constexpr usage yet

0.8
Bruno Van de Velde 2017-08-31 14:32:55 +02:00
parent 324588a380
commit 71fa5ae9db
1 changed files with 8 additions and 2 deletions

View File

@ -70,8 +70,14 @@
#define TGUI_VERSION_MINOR 8
#define TGUI_VERSION_PATCH 0
// All supported compilers except GCC 4.9 support constexpr
#if __GNUC__
// Enable constexpr when using Clang or at least GCC 5 or MSVC++ 14.1 (VS2017)
#if _MSC_VER
#if _MSC_VER >= 1910
#define TGUI_CONSTEXPR constexpr
#else
#define TGUI_CONSTEXPR
#endif
#elif __GNUC__
#if __cpp_constexpr >= 201304
#define TGUI_CONSTEXPR constexpr
#else