Skip to content
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

Decide on #include style #991

Open
lilleyse opened this issue Nov 13, 2024 · 1 comment
Open

Decide on #include style #991

lilleyse opened this issue Nov 13, 2024 · 1 comment

Comments

@lilleyse
Copy link
Contributor

We're not totally consistent with how we include headers. What about something like this?

  • Use quotation marks for header files in the same directory e.g. #include "Library.h"
  • Use angle braces for everything else e.g. #include <CesiumUtility/JsonValue.h>

It would be great if clang-format could enforce this. In any case, once we agree on something it should go in the C++ Style Guide.

@kring
Copy link
Member

kring commented Nov 14, 2024

Previous issue about this:
#80
Which pretty much came to the same conclusion that you wrote above. I think that's been the decision all along, we just haven't enforced it, or retroactively converted all code to that style.

In theory we don't need to put this in the Style Guide, because it's already in the C++ Core Guidelines, which are included by reference. 🤷
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf12-prefer-the-quoted-form-of-include-for-files-relative-to-the-including-file-and-the-angle-bracket-form-everywhere-else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants