|
102 | 102 | #define POV_COMPILER_VER "msvc14" |
103 | 103 | #define METADATA_COMPILER_STRING "msvc 14.0" |
104 | 104 | // 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. |
106 | 106 | #define POV_CPP11_SUPPORTED 1 |
107 | 107 | #ifndef DEBUG |
108 | 108 | // Suppress erroneous warning about `string` having different alignment in base and parser. |
|
112 | 112 | // MS Visual C++ 2017 (aka 14.1x) |
113 | 113 | #define POV_COMPILER_VER "msvc141" |
114 | 114 | #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`. |
117 | 119 | #define POV_CPP11_SUPPORTED 1 |
118 | | - #define POV_CPP14_SUPPORTED 1 |
119 | 120 | // TODO - This compiler version has been tested, but no effort has been made yet |
120 | 121 | // to iron out any inconveniences such as unwarranted warnings or the like. |
121 | 122 | #elif _MSC_VER >= 1920 && _MSC_VER < 1930 |
122 | 123 | // MS Visual C++ 2019 (aka 14.2x) |
123 | 124 | #define POV_COMPILER_VER "msvc142" |
124 | 125 | #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 |
125 | 131 | // (no need to set `POV_*_SUPPORTED for VS 2019 and later, we can probe `__cplusplus`) |
126 | 132 | // TODO - This compiler version has been tested, but no effort has been made yet |
127 | 133 | // to iron out any inconveniences such as unwarranted warnings or the like. |
|
130 | 136 | #error("Your version of MS Visual C++ is still unknown to us. Proceed at your own risk.") |
131 | 137 | #define POV_COMPILER_VER "msvc" |
132 | 138 | #define METADATA_COMPILER_STRING "msvc" |
| 139 | + #define POV_CPP11_SUPPORTED 1 |
133 | 140 | #endif |
134 | 141 | #define COMPILER_NAME "Microsoft Visual C++" |
135 | 142 | #define COMPILER_VERSION _MSC_VER |
|
0 commit comments