[gdal-dev] Starting a discussion on style and coding guidelines
Even Rouault
even.rouault at spatialys.com
Thu May 5 14:25:11 PDT 2016
> I misinterpreted this thread because of the title. It seems this isn't
> really about code style or C++ 11.
I agree this thread mixes different topics, which causes some confusion. The
word C++11 appearing in a doc has created some passion, whereas it is probably
not the heart of the subject.
Kurt has contributed to a lot of cleanup in the code base over the last
months, mostly in applying stricter formatting rules, bool'ifying,
const'ifying when possible, moving variable declarations close to their
initialization, etc.. (Kurt, correct me if I'm wrong.), also addressing a
bunch of Covertiy Scan warnings, etc.
I've actually encouraged him to share his thoughts regarding cleanups with the
rest of the community so that we can decide which are worth to be rules that
apply to the project as a whole, and if some tooling is needed to
automate/enforce them.
> It's really about Google wanting to use
> heap over stack because of its particular use of the library. There is no
> need for C++ 11 for that and it would seem that doing a compile-time
> policy-based array isn't too hard (proof of concept below). Perhaps Google
> could flush something like this out to its liking and replace current stack
> allocations that cause it issues.
This use case is probably shared by other actors that use GDAL for massive
data processing, and if the solution to reduce stack usage doesn't hurt more
mundane use cases, we probably don't need the #ifdef complication.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list