|
Boost : |
From: Gavin Lambert (boost_at_[hidden])
Date: 2021-04-12 02:23:47
On 9/04/2021 10:05 pm, Mike wrote:
> I haven't checked the concrete projects, so would be curious too, but what
> I'd expect from the description is the following (or similar) structure:
>
> <libfoo-root>
> - libfoo
> - libfoo.hpp
> - src
> - src1.cpp
> - src2.cpp
> - VERSION <- this isn't a c++ file
> - ...
>
>
> and because the suggested include scheme is
>
> #include <libfoo/libfoo.hpp>
>
> the search path that gets added to the parent project is -I<libfoo-root>.
Which is entirely the wrong thing to be doing. The "libfoo" directory
should be under an "include" parent directory, and *that* is what should
be added to the include path.
Otherwise all the extraneous files in the root are going to pollute the
include path. While you could frequently get away with that in the
past, C++'s poor decision to use include files without extensions and
GNU's poor decision to use documentation files without extensions are
inevitably on a collision course to failure.
#include <license> is another name that won't cause any problems now,
but is potentially risky if the standard ever adopts some similar concept.
It's just developers being lazy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk