ETLCPP / etl

Embedded Template Library
https://www.etlcpp.com
MIT License
2.04k stars 371 forks source link

Make include paths to private files relative. #879

Closed dhebbeker closed 2 months ago

dhebbeker commented 2 months ago

By removing etl/ from include paths (in #include statements), the path to the directory include/ doesn't need to be provided to the preprocessor as an include path if the files in include/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.

semanticdiff-com[bot] commented 2 months ago

Review changes with SemanticDiff.