Skip to content

C++23 build errors in Android #172

@Sharjeel-Khan

Description

@Sharjeel-Khan

In Android, we have been seeing this issue with C++23:

In file included from external/google-fruit/src/binding_normalization.cpp:21:
In file included from external/google-fruit/include/fruit/impl/util/type_info.h:111:
external/google-fruit/include/fruit/impl/util/type_info.defn.h:31:47: error: no member named 'is_abstract' in namespace 'std'
   31 | template <typename T, bool is_abstract = std::is_abstract<T>::value>
      |                                               ^~~~~~~~~~~
external/google-fruit/include/fruit/impl/util/type_info.defn.h:31:59: error: 'T' does not refer to a value
   31 | template <typename T, bool is_abstract = std::is_abstract<T>::value>
      |                                                           ^
external/google-fruit/include/fruit/impl/util/type_info.defn.h:31:20: note: declared here
   31 | template <typename T, bool is_abstract = std::is_abstract<T>::value>
      |                    ^
external/google-fruit/include/fruit/impl/util/type_info.defn.h:31:63: error: no type named 'value' in the global namespace
   31 | template <typename T, bool is_abstract = std::is_abstract<T>::value>
      |                                                             ~~^
external/google-fruit/include/fruit/impl/util/type_info.defn.h:31:68: error: expected unqualified-id
   31 | template <typename T, bool is_abstract = std::is_abstract<T>::value>
      |                                                                    ^
external/google-fruit/include/fruit/impl/util/type_info.defn.h:47:8: error: explicit specialization of undeclared template struct 'GetConcreteTypeInfo'
   47 | struct GetConcreteTypeInfo<T, true> {
      |        ^                  ~~~~~~~~~
5 errors generated.

It can be fixed by adding <type_traits> in the correct header

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions