File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -791,6 +791,8 @@ else:
791791 # Note that this is still not complete conformance, as certain Windows-related headers
792792 # don't compile under complete conformance.
793793 env .Prepend (CCFLAGS = ["/permissive-" ])
794+ # Allow use of `__cplusplus` macro to determine C++ standard universally.
795+ env .Prepend (CXXFLAGS = ["/Zc:__cplusplus" ])
794796
795797# Disable exception handling. Godot doesn't use exceptions anywhere, and this
796798# saves around 20% of binary size and very significant build time (GH-80513).
Original file line number Diff line number Diff line change 4444#include " core/error/error_list.h"
4545#include < cstdint>
4646
47+ // Ensure that C++ standard is at least C++17. If on MSVC, also ensures that the `Zc:__cplusplus` flag is present.
48+ static_assert (__cplusplus >= 201703L );
49+
4750// Turn argument to string constant:
4851// https://gcc.gnu.org/onlinedocs/cpp/Stringizing.html#Stringizing
4952#ifndef _STR
You can’t perform that action at this time.
0 commit comments