FlightGear and C++11

From FlightGear wiki
Jump to navigation Jump to search
This article has been nominated for deletion. To discuss it, please visit the talk page.

Do not remove this tag until the discussion is closed.


Reason for the nomination: Outdated now that FlightGear already uses C++11


Background

The hope is to start using C++11 soon, and gradually reduce / replace our Boost usage with inlined versions of whatever functionality we need (eg bind). [1]


conditionally using C++11 features is not a good idea, let’s wait until we use them /everywhere/, since there are a bunch of mechanical changes, eg using ‘auto’ for most loop iterator types, and I don’t think that will be simplified by having to remove conditionals. If you really want to use use conditional features, let’s mimic Qt and add some custom SG #defines like SG_OVERRIDE and SG_CPP11 so they are at least easy to grep for.[2]


Once C++11 is mandatory we will for sure s/auto_ptr/uniqe_ptr and make SGSharedPtr a typdef for std::shared_ptr or something, but anyway I’m not worried about the deprecation - auto-ptr is a very simple beast.[3]


I was hoping to use CXX_STANDARD_REQUIRED and be done it. If Cmake 3.0 is an easier version to stick with for now, James Turner can live with it. Imported targets are a much bigger improvement and should work in 3.0[4]

References
  1. James Turner  (Oct 15th, 2016).  Re: [Flightgear-devel] apt.dat - add local version ? .
  2. James Turner  (Oct 17th, 2016).  Re: [Flightgear-devel] apt.dat - add local version ? .
  3. James Turner  (Oct 19th, 2016).  Re: [Flightgear-devel] apt.dat - add local version ? .
  4. James Turner  (Oct 19th, 2016).  Re: [Flightgear-devel] requiring cmake 3.1+? .