jbb at kdevelop.org
Fri Dec 1 20:59:47 UTC 2000
A golden rule of thumb with including header files is
if you have this.cpp with corresponding this.h always include this.h _first_
This way you guarantee that your header files are "complete" and don't depend
on header files being included prior to it.
Another (more minor) rule of thumb is
group the headers in .cpp file as follows
#include other headers in this project
#include toplevel toolkit
#include base toolkit
Within each group, the include order is alphabetic, (alphabetic is an
arbitary order that makes it much easier for humans to read). Why group them?
Well it helps to catch bad dependencies in the headers.
Of course, before this you've made sure that your header only includes other
headers that are _essential_ to it.
... and hence world peace will surely follow
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
More information about the KDevelop-devel