diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-22 20:38:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-22 20:38:28 +0100 |
commit | 9a55f1564c96baff19c5595aa3e1ea296f9bd260 (patch) | |
tree | 0e447400fd99250304cb5c8eaed4dd805443a0d3 /SConstruct | |
parent | 92332eb23d7b000cbd0b7838b355c9f9f3ad4d0e (diff) | |
parent | 6bb075a53f5c4e253ae6007418a22b59593073b8 (diff) |
Merge pull request #36457 from akien-mga/c++-standard-gnu++17
SCons: Bump required C++ standard to C++17
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct index 785686d428..eb59db006d 100644 --- a/SConstruct +++ b/SConstruct @@ -310,17 +310,17 @@ if selected_platform in platform_list: env.Append(LINKFLAGS=str(LINKFLAGS).split()) # Set our C and C++ standard requirements. - # Prepending to make it possible to override + # C++17 is required as we need guaranteed copy elision as per GH-36436. + # Prepending to make it possible to override. if not env.msvc: # Specifying GNU extensions support explicitly, which are supported by - # both GCC and Clang. This mirrors GCC and Clang's current default - # compile flags if no -std is specified. + # both GCC and Clang. Both currently default to gnu11 and gnu++14. env.Prepend(CFLAGS=['-std=gnu11']) - env.Prepend(CXXFLAGS=['-std=gnu++14']) + env.Prepend(CXXFLAGS=['-std=gnu++17']) else: # MSVC doesn't have clear C standard support, /std only covers C++. # We apply it to CCFLAGS (both C and C++ code) in case it impacts C features. - env.Prepend(CCFLAGS=['/std:c++14', '/permissive-']) + env.Prepend(CCFLAGS=['/std:c++17', '/permissive-']) # Platform specific flags flag_list = platform_flags[selected_platform] |