Closed lmdsp closed 6 years ago
This is the way we choose some years ago...this will be not changed... root is defined as include path.
@ygrabit That's a pity, it seems overly complicated and error prone to reference an include from the same folder by going up to root and then down again. Also needs a lot more typing whenever files are moved around .. Just my 2 cents
@ygrabit @lmdsp I'm actually not so critical on the existing approach, it even looks less problematic and confusing to me, considering namespace features of C++. Filesystem structure usually reflects the namespace hierarchy in the code, so it's quite often, that you have some types of usual name (e.g. device
or buffer
) here and there in different namespaces in the corresponding files, and only more qualified names allow one to avoid collisions. Generally, the more relative includes are, the more they depend on the include path of the compiler. I agree, that there's no problem with relative includes in the same directory, but, in my opinion, existing includes look equally neat.
Many files have includes which cause build errors if additional include paths are not defined / amalgamated builds.
For example in
plugininterfaces/base/funknown.h
:There is no need to repeat the
"pluginterfaces/base
part as they're in the same folder !This works fine: