weixin_39822993 2020-11-30 11:25
浏览 0

fstream include removed while required

Originally reported on Google Code with ID 90


What is the expected output? What do you see instead?

I run include-what-you-use on a large source file containing Google Test test cases.
On this particular file, there is a class extending 'testing::Test', which has protected
members of type 'ifstream'. As a result, an include is needed: '#include <fstream>'

However, IWYU suggests removing the '<fstream>' include, and I can't find out why.
I've created a smaller test case.


What version of the product are you using? On what operating system?
I'm afraid I'm using an older IWYU version (revision 352), since I had issues compiling
the newer version.
I'm running Ubuntu Linux 64-bit.

Please provide any additional information below.


</fstream></fstream>

Reported by mathias.demare on 2013-01-04 16:03:30

该提问来源于开源项目:include-what-you-use/include-what-you-use

  • 写回答

4条回答 默认 最新

  • weixin_39822993 2020-11-30 11:25
    关注
    
    Note: in the smaller test case, '<fstream>' is not present. It's needed for compilation,
    but IWYU does not suggest to add it.
    
    If you add '#include <fstream>', IWYU suggests to remove it.
    </fstream></fstream>

    Reported by mathias.demare on 2013-01-04 16:04:35

    评论

报告相同问题?