assumptions: assume a C++17 compiler

This has already been the case since #20413.
pull/826/head
fanquake 4 years ago
parent 1e7dd584a5
commit c7b46489f8
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -17,15 +17,15 @@
# error "Bitcoin cannot be compiled without assertions." # error "Bitcoin cannot be compiled without assertions."
#endif #endif
// Assumption: We assume a C++11 (ISO/IEC 14882:2011) compiler (minimum requirement). // Assumption: We assume a C++17 (ISO/IEC 14882:2017) compiler (minimum requirement).
// Example(s): We assume the presence of C++11 features everywhere :-) // Example(s): We assume the presence of C++17 features everywhere :-)
// Note: MSVC does not report the expected __cplusplus value due to legacy // Note: MSVC does not report the expected __cplusplus value due to legacy
// reasons. // reasons.
#if !defined(_MSC_VER) #if !defined(_MSC_VER)
// ISO Standard C++11 [cpp.predefined]p1: // ISO Standard C++17 [cpp.predefined]p1:
// "The name __cplusplus is defined to the value 201103L when compiling a C++ // "The name __cplusplus is defined to the value 201703L when compiling a C++
// translation unit." // translation unit."
static_assert(__cplusplus >= 201103L, "C++11 standard assumed"); static_assert(__cplusplus >= 201703L, "C++17 standard assumed");
#endif #endif
// Assumption: We assume the floating-point types to fulfill the requirements of // Assumption: We assume the floating-point types to fulfill the requirements of

Loading…
Cancel
Save