Compile with C++17.
Switches from C++14 to C++17 standards.
Removes disabling the no-c++11-narrowing warning. We compile OK
with this warning enabled.
No code change.
Change-Id: Icb6479b0d9ef930b961f1ef965c18f22b6d847ff
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/6000
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
diff --git a/build/gen.py b/build/gen.py
index 38085b4..4c3f716 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -324,7 +324,7 @@
'-fno-rtti',
'-fdiagnostics-color',
])
- cflags_cc.extend(['-std=c++14', '-Wno-c++11-narrowing'])
+ cflags_cc.extend(['-std=c++17'])
if platform.is_linux():
ldflags.append('-Wl,--as-needed')
@@ -378,6 +378,7 @@
'/wd4996',
])
cflags_cc.extend([
+ '/std:c++17',
'/GR-',
'/D_HAS_EXCEPTIONS=0',
])