Wrapping #includes in #ifndef's - adds any value?
I have inherited C /C++ code base, and in a number of .cpp files the #include directives are wrapped in #ifndef's with the headers internal single include #define . for example #ifndef _INC_WINDOWS #include <windows.h> #endif and windows.h looks like #ifndef _INC_WINDOWS #define _INC_WINDOWS ...header file stuff.... #endif // _INC_WINDOWS I assume this was done to speed up the compile/preprocess of the code. I think it's ugly and a premature optimisation, but as the project has a 5 minute build time from clean, I don't want to makes things worse. So does the practice add any value or speed