Changes between Initial Version and Version 1 of MapGuideRfc172


Ignore:
Timestamp:
May 23, 2019, 3:59:09 AM (5 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc172

    v1 v1  
     1= !MapGuide RFC 172 - Adopt C++11 as the minimum compiler language version =
     2
     3This page contains a change request (RFC) for the !MapGuide Open Source project.
     4More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
     5
     6== Status ==
     7
     8||RFC Template Version||(1.0)||
     9||Submission Date||23 May 2019||
     10||Last Modified||23 May 2019||
     11||Author||Jackie Ng||
     12||RFC Status||draft||
     13||Implementation Status||||
     14||Proposed Milestone||3.0||
     15||Assigned PSC guide(s)||(when determined)||
     16||'''Voting History'''||(vote date)||
     17||+1||||
     18||+0||||
     19||-0||||
     20||-1||||
     21||no vote|| ||
     22
     23== Overview ==
     24
     25This RFC proposes to switch to
     26[http://en.wikipedia.org/wiki/C%2B%2B11 C++11] compilation mode as
     27default throughout the whole C++ source code of MapGuide.
     28
     29The goal of this RFC is to request and achieve agreement on using
     30C++11 as the minimum required version of the C++ programming language
     31standard.
     32
     33== Motivation ==
     34
     35C++11 is the first major update of the C++ standard since 1998. (?C++03 was a bug fix release.)
     36
     37Having fewer versions of C++ to support will reduce the load on developers and testing systems.
     38
     39C++11 features aim to promote writing clean, compact, type-safe and fast code. It also delivers better feature-wise compatibility with the C language (C99).
     40
     41The Wikipedia article at ?http://en.wikipedia.org/wiki/C++11 does a great job describing all changes in C++11 extensively.
     42
     43The std::auto_ptr smart pointer, together with a bunch of other features, were deprecated and will be removed from C++17. Features like std::unique_ptr provide much stronger replacements.
     44
     45Enabling C++11 compilation mode will improve the programming environment making it much friendlier than C++98.
     46
     47A social factor: since (many) C++ programmers no longer enjoy C++98, allowing C++11 mode may increase potential for new contributions.
     48
     49From a purely-MapGuide perspective:
     50
     51 * Establishing C++11 as the baseline puts us in a place to finally take advantage of some libraries which we couldn't in the past (hindering development of some new features as a result) as those libraries themselves require a C++11 compliant compiler to build.
     52 * Also FDO implicitly now requires a C++11 compliant compiler on Linux anyways due to the removal of boost and replacing them with C++11 standard library features (eg. `std::mutex`), so it make some sense to be on the same page regarding the expected C++ standards compilation mode.
     53
     54== Compilers Landscape ==
     55
     56Summary of compilers supported by GDAL with their minimal versions
     57required to compile source code based on
     58
     59http://en.cppreference.com/w/cpp/compiler_support C++11 features.
     60
     61=== C++11 ===
     62 
     63||GCC  ||4.8.1+      ||[https://gcc.gnu.org/projects/cxx-status.html#cxx11 C++11 status]    ||Debian 8 (stable), Ubuntu 15.04+, Ubuntu 14.04 `ppa:ubuntu-toolchain-r/test`, Fedora 19+, RHEL7 ||
     64||Clang||3.3+        ||[https://clang.llvm.org/cxx_status.html#cxx11 C++11 status]          ||Debian 8 (stable), Ubuntu 14.04+, Fedora 19+, CentOS 6(?)||
     65||MSVC ||14.0+ (2015)||[https://msdn.microsoft.com/en-us/library/hh567368.aspx C++11 status]||n/a||
     66
     67=== C++14 ===
     68
     69The C++14 compilers are listed for comparison only:
     70
     71||GCC  ||4.9+ ||
     72||Clang||3.4+ ||
     73||MSVC ||14.0+ (2015)||
     74
     75== Proposed Solution ==
     76
     77Windows: No changes required.
     78
     79Linux/CMake: The CMake build will set default compiler flags to build in C++11 standards mode.
     80
     81Actual porting of the MapGuide codebase to take advantage of C++11 language features and constructs is not in the scope of this RFC. This RFC is merely seeking consensus that we should now require a C++11 compliant compiler as a minimum requirement to build MapGuide.
     82
     83The porting of the codebase will be an on-going activity done after adoption of this RFC.
     84
     85== Implications ==
     86
     87Windows is not impacted, we will not make any compiler settings changes.
     88
     89When compiling on Linux, a C++11-compliant compiler is now required.
     90
     91== Test Plan ==
     92
     93Verify existing test suites still pass on Linux after activating C++11 compilation mode.
     94
     95== Funding / Resources ==
     96
     97Community