diff options
author | fanquake <fanquake@gmail.com> | 2021-02-23 12:49:56 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-02-23 12:51:50 +0800 |
commit | 5e531e6beb5381c0be5efaa24b7e423e593568e4 (patch) | |
tree | 0f4ff89e9a5ea6d00f3074284c2826059bc11954 /src/compat/assumptions.h | |
parent | c7b46489f8c4d880382248fb47266d81948bbce0 (diff) |
assumptions: check C++17 assumption with MSVC
From my reading of
https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160
and
https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
if we set the `/Zc:__cplusplus` switch in additional options, MSVC will
report the correct value for `__cplusplus`.
Diffstat (limited to 'src/compat/assumptions.h')
-rw-r--r-- | src/compat/assumptions.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/compat/assumptions.h b/src/compat/assumptions.h index e8d0c7d56e..5f50cde3ff 100644 --- a/src/compat/assumptions.h +++ b/src/compat/assumptions.h @@ -19,14 +19,10 @@ // Assumption: We assume a C++17 (ISO/IEC 14882:2017) compiler (minimum requirement). // Example(s): We assume the presence of C++17 features everywhere :-) -// Note: MSVC does not report the expected __cplusplus value due to legacy -// reasons. -#if !defined(_MSC_VER) // ISO Standard C++17 [cpp.predefined]p1: // "The name __cplusplus is defined to the value 201703L when compiling a C++ // translation unit." static_assert(__cplusplus >= 201703L, "C++17 standard assumed"); -#endif // Assumption: We assume the floating-point types to fulfill the requirements of // IEC 559 (IEEE 754) standard. |