Enable C++17 features when __cplusplus >= 201703.

This will keep them enabled even when compiling with later
standards or experimental standards such as -std=c++2a.
This commit is contained in:
David P. Sicilia 2019-09-13 14:43:59 -04:00 committed by The Phantom Derpstorm
parent bafac3abbd
commit b545e1bf1b

View File

@ -24,7 +24,7 @@
#ifndef SOL_FEATURE_TEST_HPP #ifndef SOL_FEATURE_TEST_HPP
#define SOL_FEATURE_TEST_HPP #define SOL_FEATURE_TEST_HPP
#if (defined(__cplusplus) && __cplusplus == 201703L) || (defined(_MSC_VER) && _MSC_VER > 1900 && ((defined(_HAS_CXX17) && _HAS_CXX17 == 1) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201402L)))) #if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSC_VER) && _MSC_VER > 1900 && ((defined(_HAS_CXX17) && _HAS_CXX17 == 1) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201402L))))
#ifndef SOL_CXX17_FEATURES #ifndef SOL_CXX17_FEATURES
#define SOL_CXX17_FEATURES 1 #define SOL_CXX17_FEATURES 1
#endif // C++17 features macro #endif // C++17 features macro