-
Notifications
You must be signed in to change notification settings - Fork 251
Use #include "..." instead of #include <...> to include internal #71
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
BTW, the motivation of this issue is at online-judge-tools/verification-helper#345, which is an issue about the combination of our |
yosupo06
added a commit
that referenced
this issue
Nov 14, 2020
yosupo06
added a commit
that referenced
this issue
Nov 14, 2020
yosupo06
added a commit
that referenced
this issue
Nov 14, 2020
Ah, your indication make sense. We don't have any strong opinion whether |
yosupo06
added a commit
that referenced
this issue
Nov 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To include headers from other headers in the same library, we should use
#include "..."
. This is a common manner (examples: 1, 2, 3).However, the current AtCoder Library uses
#include <...>
(e.g. https://github.com/atcoder/ac-library/blob/114e690ade7fe839db3ea0e5f169207672ef0886/atcoder/all).#include <...>
is for headers in the standard system directories (see https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html), but AtCoder Library is not system's one.IIUC, if you use
#include <...>
, a problem will happen when multiple versions of the this library are installed.For example, let say we have
/usr/include/atcoder/segtree.hpp
,/home/user/kimiyuki/GitHub/ac-library/atcoder/segtree.hpp
, and/home/user/kimiyuki/GitHub/ac-library/atcoder/all
. Under such situation, even when you include/home/user/kimiyuki/GitHub/ac-library/atcoder/all
with#include "atcoder/all"
, thisatcoder/all
ignores/home/user/kimiyuki/GitHub/ac-library/atcoder/segtree.hpp
and includes/usr/include/atcoder/segtree.hpp
. This will cause mysterious bugs.The text was updated successfully, but these errors were encountered: