Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing unused includes

Tags:

c++

Are there any tools which parse .h files and recommend the removal of #includes. For example if the defines in the include are not being used or if it is possible to do a forward declaration instead.

I work on both windows and linux platforms.

like image 889
Baz Avatar asked Feb 18 '23 14:02

Baz


1 Answers

include-what-you-use is intended to do this.

like image 91
John Bartholomew Avatar answered Feb 21 '23 03:02

John Bartholomew