[gdal-dev] C++11 timeline

Kurt Schwehr schwehr at gmail.com
Fri Dec 23 10:05:46 PST 2016

Hi all,

I would like to continue the C++11 discussion over the next couple weeks
while many people are on slower development cycles with a proposal:

* Starting 2017-Mar-01, we switch GDAL trunk to require C++11 support from
the compiler.
* All prior branches would stick with their existing requirements for C++03

I had come up with a bunch of other things for a timeline, but they all see
like noise after Even pointed out a whole ton of issues my thoughts.  This
isn't as aggressive as I would like, but it would definitely help reduce
the maintenance burden on humans and reduce the test load for continuous
integration.  I removed explicit mention of OS or compiler versions which I
had in my initial thoughts.

This would not be a free-for-all on C++11 features.  I think we would want
to just start with removing some of the macros and workarounds that are
currently in the code base.  Until we decide to go forward with other
features, the main changes that would happen in C++ only code after this
would be:

- Change NULL to nullptr
- Drop virtual when using the override keyword (this becomes a req with
- CPL_OVERRIDE -> override
- Remove HAVE_CXX11 #ifs
- And maybe some other things I missed

Once those are all done, we can then discuss when to allow things like
unique_ptr internally (which will allow some serious simplification of some

Then at some later time, we can discuss what API changes to allow, when to
require C++14, C++17, C11, etc.




find . -name \*.cpp -o -name \*.h | xargs grep -i override | grep virtual |
wc -l

find . -name \*.cpp -o -name \*.h | xargs grep CPL_OVERRIDE | wc -l

find . -name \*.cpp -o -name \*.h | xargs grep HAVE_CXX11 | wc -l
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161223/2259125b/attachment.html>

More information about the gdal-dev mailing list