Issue 1149 in include-what-you-use: `<tuple>` suggested for `std::array` - confused by `<map>`

0 views
Skip to first unread message

notifi...@include-what-you-use.org

unread,
Nov 26, 2022, 5:37:58 AM11/26/22
to include-wh...@googlegroups.com
New issue 1149 by firewave: `<tuple>` suggested for `std::array` - confused by `<map>`
https://github.com/include-what-you-use/include-what-you-use/issues/1149

```cpp
#include <array>
#include <cstddef>
#include <string>
#include <map> // removing this will get rid of the messages
#include <utility>

template<std::size_t N>
static void f(const std::array<std::pair<std::string, std::string>, N>&)
{
std::map<int, int> m; // added so <map> is not unused
}
```

```
test.cpp should add these lines:
#include <tuple> // for array

test.cpp should remove these lines:
- #include <array> // lines 1-1

The full include-list for test.cpp:
#include <cstddef> // for size_t
#include <map> // for map
#include <string> // for string
#include <tuple> // for array
#include <utility> // for pair
---
```

I am using `include-what-you-use 0.18 based on Debian clang version 14.0.6-2`.


Reply all
Reply to author
Forward
0 new messages