Skip to content

Commit 86f410a

Browse files
committed
Fix Visual Studio specific compile-time configuration broken by 37b99bd.
1 parent e84e7bb commit 86f410a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

windows/povconfig/syspovconfig_msvc.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
#define POV_COMPILER_VER "msvc14"
103103
#define METADATA_COMPILER_STRING "msvc 14.0"
104104
// Visual C++ 2015 defines `__cplusplus` as `199711L` (C++98),
105-
// but supports all the C++11 features we need
105+
// but supports all the C++11 features we need.
106106
#define POV_CPP11_SUPPORTED 1
107107
#ifndef DEBUG
108108
// Suppress erroneous warning about `string` having different alignment in base and parser.
@@ -112,16 +112,22 @@
112112
// MS Visual C++ 2017 (aka 14.1x)
113113
#define POV_COMPILER_VER "msvc141"
114114
#define METADATA_COMPILER_STRING "msvc 14.1x"
115-
// Visual C++ 2017 15.6 (and earlier) defines `__cplusplus` as `199711L` (C++98),
116-
// but supports all the C++11 features we need (and also pretty much all of C++14)
115+
// Visual C++ 2017 defines `__cplusplus` as `199711L` (C++98) when in default (C++11-ish) mode,
116+
// but supports all the C++11 features we need.
117+
// Later versions of Visual C++ 2017 allegedly support C++14, but allegedly need the `/std` switch
118+
// to turn it on, in which case support can allegedly be detected properly by probing `__cplusplus`.
117119
#define POV_CPP11_SUPPORTED 1
118-
#define POV_CPP14_SUPPORTED 1
119120
// TODO - This compiler version has been tested, but no effort has been made yet
120121
// to iron out any inconveniences such as unwarranted warnings or the like.
121122
#elif _MSC_VER >= 1920 && _MSC_VER < 1930
122123
// MS Visual C++ 2019 (aka 14.2x)
123124
#define POV_COMPILER_VER "msvc142"
124125
#define METADATA_COMPILER_STRING "msvc 14.2x"
126+
// Visual C++ 2019 defines `__cplusplus` as `199711L` (C++98) when in default (C++11-ish) mode,
127+
// but supports all the C++11 features we need.
128+
// It also allegedly supports C++14 (and later standards), but allegedly need the `/std` switch
129+
// to turn it on, in which case support can allegedly be detected properly by probing `__cplusplus`.
130+
#define POV_CPP11_SUPPORTED 1
125131
// (no need to set `POV_*_SUPPORTED for VS 2019 and later, we can probe `__cplusplus`)
126132
// TODO - This compiler version has been tested, but no effort has been made yet
127133
// to iron out any inconveniences such as unwarranted warnings or the like.
@@ -130,6 +136,7 @@
130136
#error("Your version of MS Visual C++ is still unknown to us. Proceed at your own risk.")
131137
#define POV_COMPILER_VER "msvc"
132138
#define METADATA_COMPILER_STRING "msvc"
139+
#define POV_CPP11_SUPPORTED 1
133140
#endif
134141
#define COMPILER_NAME "Microsoft Visual C++"
135142
#define COMPILER_VERSION _MSC_VER

0 commit comments

Comments
 (0)