@@ -47,8 +47,10 @@ Please read the leading comments before using the class.
4747#define CPLUSPLUS_STD CPLUSPLUS_98
4848#elif __cplusplus < 201402L
4949#define CPLUSPLUS_STD CPLUSPLUS_11
50- #else
50+ #elif __cplusplus < 201703L
5151#define CPLUSPLUS_STD CPLUSPLUS_14
52+ #else
53+ #define CPLUSPLUS_STD CPLUSPLUS_17
5254#endif
5355
5456#elif SAFEINT_COMPILER == VISUAL_STUDIO_COMPILER
@@ -60,10 +62,13 @@ Please read the leading comments before using the class.
6062#elif _MSC_VER < 1910 // VS 2015
6163#define CPLUSPLUS_STD CPLUSPLUS_11
6264
63- #else // VS 2017 or later
65+ #elif _MSC_VER < 1926 // VS 2017
66+ #define CPLUSPLUS_STD CPLUSPLUS_14
67+
68+ #else // VS 2019 or later
6469// Note - there is a __cpp_constexpr test now, but everything prior to VS 2017 reports incorrect values
6570// and this version always supports at least the CPLUSPLUS_14 approach
66- #define CPLUSPLUS_STD CPLUSPLUS_14
71+ #define CPLUSPLUS_STD CPLUSPLUS_17
6772
6873#endif
6974
@@ -72,8 +77,8 @@ Please read the leading comments before using the class.
7277#define CPLUSPLUS_STD CPLUSPLUS_98
7378#endif // Determine C++ support level
7479
75- #if (SAFEINT_COMPILER == CLANG_COMPILER || SAFEINT_COMPILER == GCC_COMPILER) && CPLUSPLUS_STD < CPLUSPLUS_11
76- #error Must compile with --std=c++11, preferably --std=c++14 to use constexpr improvements
80+ #if (SAFEINT_COMPILER == CLANG_COMPILER || SAFEINT_COMPILER == GCC_COMPILER) && CPLUSPLUS_STD < CPLUSPLUS_17
81+ #error Must compile with --std=c++17
7782#endif
7883
7984#define CONSTEXPR_NONE 0
0 commit comments