-
Notifications
You must be signed in to change notification settings - Fork 5.5k
SF.12 is ambiguous when a library uses a unique include subfolder #1980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This seems to be, in essence, what #1596 (comment) talks about |
@cubbimew : Definitely very related to this issue. It seems like we (or I should say, you) need to decide what you think about "a user of compiler supplanting |
For libstdc++ this is at least partly because there isn't a single directory containing all the libstdc++ headers, and it's just simpler to use a consistent style. For example, |
I'm saying the compiler's own headers are not representative of "normal" code. |
@jwakely : Fair enough, dropped that as an example. I wonder which large (set of) libraries I should refer to other than Boost though. |
Editors call: We should just say what we mean, which is to use quotes if the #include'd file is in the same component as the #include-ing file, and angles if not. |
@hsutter : So, a clarification then (option (2.) in my opening comment)? |
(See also this SO question.)
Rule SF.12 says we should
because:
and
but - what about the case where locality is clear, because the library uses a unique include subfolder? e.g.
#include <my_lib/some_file.hpp>
? In fact, in this case, another, more specific part of SF.12 seems to apply:as a library's include file is also a "client" of the library's (other) include files.
It is also worth mentioning that the Boost libraries seem to prefer angle-brackets for files known to be accessible via relative paths.
So, I suggest one of two things:
I'm a bit partial to (1.) - it's my personal style so far - but don't have a strong opinion.
The text was updated successfully, but these errors were encountered: