From c79d9e30532514560e0f7cadc4395a14aaa229e0 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 13 Jan 2022 14:56:02 -0800 Subject: [PATCH] Bump the default from gnu++17 to gnu++20. We should update gnu++2a to gnu++2b too, but not in this CL. Bug: 311052584 Test: treehugger Test: m checkbuild Change-Id: I3637444d74868b3a29b425fd749ecbbe1a45fbf7 --- cc/cc_test.go | 2 +- cc/config/global.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/cc_test.go b/cc/cc_test.go index 794c5ee51..14817a177 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -4818,7 +4818,7 @@ func TestIncludeDirectoryOrdering(t *testing.T) { cflags := []string{"-Werror", "-std=candcpp"} cstd := []string{"-std=gnu17", "-std=conly"} - cppstd := []string{"-std=gnu++17", "-std=cpp", "-fno-rtti"} + cppstd := []string{"-std=gnu++20", "-std=cpp", "-fno-rtti"} lastIncludes := []string{ "out/soong/ndk/sysroot/usr/include", diff --git a/cc/config/global.go b/cc/config/global.go index 2ca9df9a1..bc067ad17 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -357,7 +357,7 @@ var ( } CStdVersion = "gnu17" - CppStdVersion = "gnu++17" + CppStdVersion = "gnu++20" ExperimentalCStdVersion = "gnu2x" ExperimentalCppStdVersion = "gnu++2a"