vendredi 28 décembre 2018

Multiple standard headers with same name - which one gets included and how can I change it?

I'm getting an error that std::enable_if_t does not name a template type. Funny enough it is included by a line #include <type_traits> at the top of the file. But looking into some of the other standard headers, there is another file named type_traits in a different directory that doesn't define enable_if_t. How does gcc decide which of these files to use and how can I change it?

The path of the file I want to use is:

.../arm-none-eabi/include/c++/7.3.1/type_traits

I don't know what file gcc is using but these files do not have the definition that should solve my problem:

.../arm-none-eabi/include/c++/7.3.1/bits/cpp_type_traits.h
.../arm-none-eabi/include/c++/7.3.1/ext/type_traits.h
.../arm-none-eabi/include/c++/7.3.1/experimental/type_traits
.../arm-none-eabi/include/c++/7.3.1/tr2/type_traits
.../arm-none-eabi/include/c++/7.3.1/tr1/type_traits

Aucun commentaire:

Enregistrer un commentaire