Make include paths to private files relative #946
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Analog to #879
By removing
etl/
from include paths (in#include
statements), the path to the directoryinclude/
doesn't need to be provided to the preprocessor as an include path if the files ininclude/etl/
are included by other means. This has no disadvantages.Actually the form
#include "..."
is intended to be used for relative paths in the first place.This is relevant if one wants to include the source files from
include/etl
only indirectly.For example we use special generated header files which wrap the include statement of the vanilla header files with diagnostic commands. Those commands disable some compiler diagnostics for ETL's files and re-enable them after the file inclusion. Wrapper files are generated for every non-private header file. We provide the directory with the wrapper files as include path to the preprocessor instead of the normal
include/
directory. Thus include statements like#include "etl/private/..."
are invalid in that case.This may be beneficial only in special cases like ours. But it should have no disadvantages. In contrary, it uses the
#include "..."
form as intended.