summaryrefslogtreecommitdiff
path: root/native/android/Android.bp
diff options
context:
space:
mode:
author Bart Van Assche <bvanassche@google.com> 2022-11-21 15:49:17 -0800
committer Bart Van Assche <bvanassche@google.com> 2022-11-29 09:42:48 -0800
commitb66923ab2d0deb82ca35dcdcb7f577bb0b887372 (patch)
treecbee1721b8723b26d90f7ed1fba2d26cba04d566 /native/android/Android.bp
parent282a29b8ba28ccd5c10409809ee3cab8b27b7e6f (diff)
Switch to C++20
Prepare for using std::array<> and std::span<> in headers included from this library. Remove the AFont constructors to prevent that the build fails as follows: frameworks/base/native/android/system_fonts.cpp:265:35: error: no matching member function for call to 'insert' fonts.insert( ~~~~~~^~~~~~ Removing these constructors is necessary because of the following rule: "An aggregate is one of the following types [...] class type (struct or union) that has [...] no user-declared or inherited constructors (since C++20)". Source: https://en.cppreference.com/w/cpp/language/aggregate_initialization. Bug: 260725458 Change-Id: I384d05f5d3e471f8f58294119d04eb8ab16697ba Signed-off-by: Bart Van Assche <bvanassche@google.com>
Diffstat (limited to 'native/android/Android.bp')
-rw-r--r--native/android/Android.bp1
1 files changed, 1 insertions, 0 deletions
diff --git a/native/android/Android.bp b/native/android/Android.bp
index 8594ba5ca2da..f1b1d79265de 100644
--- a/native/android/Android.bp
+++ b/native/android/Android.bp
@@ -34,6 +34,7 @@ ndk_library {
cc_defaults {
name: "libandroid_defaults",
+ cpp_std: "gnu++20",
cflags: [
"-Wall",
"-Werror",