Use relative paths for includes? #1393
Please-just-dont
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
The use of "glaze/..." in the headers is intentional and necessary. It prevents clashes between headers that have the same name in different dependencies. Consider we have a dependency that includes "foo/csv.hpp". If we only included "csv.hpp" then this header would collide with Glaze's header and we wouldn't be able to use both libraries in the same codebase. This is a common practice and recommended for C++ libraries. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's your thought about relative includes? In my opinion instead of:
#include "glaze/beve.hpp"
#include "glaze/beve/beve_to_json.hpp"
#include "glaze/csv.hpp"
have:
#include "beve.hpp"
#include "beve/beve_to_json.hpp"
#include "csv.hpp"
Or so that it's obvious to the reader:
#include "./beve.hpp"
#include "./beve/beve_to_json.hpp"
#include "./csv.hpp"
Now I don't have to set the glaze folder as an include directory when I compile.
Beta Was this translation helpful? Give feedback.
All reactions