Closed GoogleCodeExporter closed 9 years ago
Thanks for the report! I believe this is the same problem as issue 118. IWYU is
more aggressive than a C++ compiler about instantiating templates, because it
needs to check the template pattern for uses, independent of whether it's
instantiated or not.
We can use this as an additional test case, but otherwise I think it's a plain
duplicate.
Original comment by kim.gras...@gmail.com
on 28 May 2014 at 5:50
roland, could you try the last patch attached to issue 118 and see if it fixes
this problem as well? It looks slightly different, but I don't have access to a
libstdc++ toolchain so I can't readily test it.
Original comment by kim.gras...@gmail.com
on 29 May 2014 at 8:32
Yes. The patch fixes this problem. Now with both libc++ and libstdc++ I get:
pair.cc should add these lines:
#include <type_traits> // for remove_reference<>::type
Given that remove_reference isn't used directly put only indirectly through
move this shouldn't be suggested.
For libc++ it also suggests:
#include "iosfwd" // for string
#include "new" // for operator new
It seems there isn't a correct mapping for libc++ yet.
Should I create 2 new issues for each of those?
Original comment by rol...@rschulz.eu
on 30 May 2014 at 3:21
Great!
Yes, please create new issues for the other two cases.
Original comment by kim.gras...@gmail.com
on 30 May 2014 at 6:20
Roland has created issue #142 for unnecessary type_traits and issue #141 for
unnecessary iosfwd.
Roland, is it OK to close the current issue?
Original comment by vsap...@gmail.com
on 3 Jun 2014 at 10:18
Yes. It can be closed.
Original comment by rol...@rschulz.eu
on 5 Jun 2014 at 5:40
Original comment by vsap...@gmail.com
on 5 Jun 2014 at 8:04
Original issue reported on code.google.com by
rol...@rschulz.eu
on 28 May 2014 at 7:19