Re: Issue 752 in include-what-you-use: Using declaration in namespace in header is mishandled

0 views
Skip to first unread message

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

unread,
Oct 31, 2021, 5:33:55 AM10/31/21
to include-wh...@googlegroups.com
Comment #12 on issue 752 by leinjay: Using declaration in namespace in header is mishandled
https://github.com/include-what-you-use/include-what-you-use/issues/752

So is there a solution to this problem now?
For example:
In “foo.h”,I used "using namespace std".
In file "bar.h",I declared "#include foo.h" and "#include <vector>"at first, then i defined "vector<int> vec;"directly
According to the syntax of C++, it can be compiled completely.
but when I used "fix_include.py" to remove "#include foo.h" in "bar.h" as iwyu suggested ,it occurs an error : "vector is not declare"
Do you have a better way to solve this problem


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

unread,
Oct 31, 2021, 5:37:16 AM10/31/21
to include-wh...@googlegroups.com
Comment #13 on issue 752 by leinjay: Using declaration in namespace in header is mishandled

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

unread,
Oct 31, 2021, 5:38:20 AM10/31/21
to include-wh...@googlegroups.com

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

unread,
Oct 31, 2021, 5:52:49 AM10/31/21
to include-wh...@googlegroups.com

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

unread,
Oct 31, 2021, 5:54:55 AM10/31/21
to include-wh...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages