[prev in list] [next in list] [prev in thread] [next in thread]
List: oprofile-list
Subject: Re: include file order
From: John Levon <levon () movementarian ! org>
Date: 2002-08-05 9:34:04
[Download RAW message or body]
On Mon, Aug 05, 2002 at 09:56:17AM -0400, William Cohen wrote:
> Is there a particular reason the system includes (<>) come after the
> user includes ("") in the files? Here is an example from
> libop++/op_print_event.cpp:
>
> #include "op_print_event.h"
> #include "op_events_desc.h"
>
> #include <iostream>
> #include <iomanip>
Actually things are a little inconsistent, if you look around the
opposite case is pretty common too
> This is the reverse order of what I have seen in other projects, e.g.
> GCC. It would be unlikely that the system includes have any dependencies
> on the user includes, but it would be possible that a user include could
> have a dependency on a system include. Wouldn't it make more sense to
> have the system includes before the user includes? I have seen this
> particular example break on a gcc compiler.
I tend to prefer headers to include the system headers it depends on.
But TBH I have no strong feelings either way, and we should remain
consistent.
So I guess I will take any patches to move the system headers above the
user ones ...
regards
john
--
"It is unbecoming for young men to utter maxims."
- Aristotle
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic