You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// a.h
template <typename A, typename B>
struct is_base_of {
constexpr static bool value = __is_base_of(A, B);
};
template <class Base, class Derived>
inline constexpr bool is_base_of_v = is_base_of<Base, Derived>::value;
// b.cc
#include "a.h"
class Foo {};
template <typename T>
struct Bar {
static const bool y = is_base_of_v<T, Foo>;
};
bool foo() { return Bar<Foo>::y; }
$ ./include-what-you-use b.cc -std=c++20
b.cc should add these lines:
b.cc should remove these lines:
- #include "a.h" // lines 1-1
The full include-list for b.cc:
---
iwyu suggests that I remove the include for a.h even though is_base_of_v is only defined in a.h and it is clearly used in b.cc
The text was updated successfully, but these errors were encountered:
iwyu suggests that I remove the include for a.h even though is_base_of_v is only defined in a.h and it is clearly used in b.cc
The text was updated successfully, but these errors were encountered: