Originally reported on Google Code with ID 105
1. Run IWYU on a subclass that overrides a virtual function that uses a type, and has
the c++11 override specifier.
2. IWYU suggests that the subclass should provide an include for the type in the overridden
method.
> What is the expected output? What do you see instead?
The base class header file must somehow include the type, and so the subclass header
is guaranteed to have a definition of the type since it must include the base header
(otherwise "override" will cause an error). Therefore it is redundant to include the
type's header in the subclass.
> What version of the product are you using? On what operating system?
SVN linux build from 2013-08-27.
Reported by mostynb.com on 2013-08-29 20:05:21
- Attachment: override-include.tar.gz
该提问来源于开源项目:include-what-you-use/include-what-you-use