On Mon, Nov 17, 2014 at 10:47:31PM +0100, FRIGN wrote:
> > headers
> > =======
> > system headers (#include <...>) in alphabetical order
> > empty line
> > local headers (#include "...") in alphabetical order
> > if there is any reason to change order, comment to explain
> 
> If headers depend on order, the headers are broken. Dismissed.

system headers should come first, then a newline, then libc headers
then a newline then local headers.

the libc headers are guaranteed to work regardless of the order of
inclusion but need to come after the system headers.  From what I
recall this is not the case with system headers and you might have
to include them in a certain order (i.e. sys/types.h might need to come
first let's say).

Reply via email to