-
Notifications
You must be signed in to change notification settings - Fork 399
Open
Description
Given the following input, IWYU produces an incorrect output:
main.cpp:
struct Foo
{
static constexpr int num = 10;
};
#include "NumGetter.h"
#include "IntegerWrapperFoo.h"
int dummy()
{
NumGetter<Foo> x;
return x.GetNum();
}
NumGetter.h:
template<typename T>
struct IntegerWrapper
{};
template<typename T>
struct NumGetter
{
int GetNum()
{
return IntegerWrapper<T>::num;
}
};
IntegerWrapperFoo.h:
template<>
struct IntegerWrapper<Foo>
{
static constexpr int num = Foo::num;
};
IWYU output:
>include-what-you-use.exe main.cpp
main.cpp should add these lines:
main.cpp should remove these lines:
- #include "IntegerWrapperFoo.h" // lines 8-8
The full include-list for main.cpp:
#include "NumGetter.h" // for NumGetter
---
I am on the master
branch of IWYU at commit b4838853e5c906854a616d9e975b53c164950174
from May 24 2020.
dbear496
Metadata
Metadata
Assignees
Labels
No labels