Using -std=C++17 in AOSP healthd

  android, android-10.0, android-source, c++, c++17

I would like to use a C++17 feature in an extended healthd that I am creating for a custom product.

I have added the -std=gnu++17 line to hardware/interfaces/health/2.0/default/Android.bp:

cc_defaults {
    name: "[email protected]_defaults",

    recovery_available: true,
    cflags: [

    shared_libs: [

The Android build completes successfully.

Is C++17 safe to use in healthd?

Source: Windows Questions C++