12 | | ...long way to go, tbc. |
| 12 | The document proposes to enable [https://en.wikipedia.org/wiki/C%2B%2B11 C++11] compilation mode throughout the whole C++ source code of GEOS. |
| 13 | |
| 14 | The goal of the document is to request and achieve agreement on using C++11 as the minimum required version of the C++ programming language standard. |
| 15 | |
| 16 | == Motivation == |
| 17 | |
| 18 | The C++11 is the first major update of the C++ standard since 1998. (C++03 was a bug fix release.) |
| 19 | |
| 20 | The C++11 features aim to promote writing clean, compact, type-safe and fast code. It also delivers better feature-wise compatibility with C language (C99). |
| 21 | |
| 22 | The Wikipedia article at https://en.wikipedia.org/wiki/C++11 does a great job describing all changes in C++11 extensively. |
| 23 | |
| 24 | The `std::auto_ptr` smart pointer, together with a bunch of other features, has been deprecated and will be removed from C++17. |
| 25 | |
| 26 | The new compilers provide better diagnostics. |
| 27 | |
| 28 | Enabling C++11 compilation mode will improve the programming environment making it much friendlier than C++98. |
| 29 | |
| 30 | A social factor: since C++ programmers no longer enjoy C++98, allowing C++11 mode may increase potential for new contributions. |
| 31 | |
| 32 | == Plan == |
| 33 | |
| 34 | This proposal only requests agreement for the C++11 compilation mode. |
| 35 | |
| 36 | This proposal does not suggest any detailed roadmap of big refactoring committed in one go. |
| 37 | |
| 38 | The GEOS codebase is around 150 KLOC and given the available man-power to LOCs ratio, such one-step refactoring would not be feasible. |
| 39 | |
| 40 | Instead, the task will be tackled with the baby step approach gradually transforming the codebase according to priorities set along the way. Any disruptive refactoring, changes in interfaces of C++ classes, breaking changes in C++ API must be announced and discussed on the mailing list or the bug tracker. |
| 41 | |
| 42 | **IMPORTANT**: C++11 refactoring must not change the C API or break C API compatibility, unless agreed upon based on prior RFC proposed. |
| 43 | |
| 44 | However, if the proposal is accepted, any new C++ code written for GEOS can be C++11-compliant. |
| 45 | |
| 46 | Prior acceptance of this proposal is necessary in order to start any source code refactoring using C++11 features. |
| 47 | |
| 48 | Once accepted, first step will be to update the build configurations to require C++11-compliant compiler. |
| 49 | |
| 50 | == Release == |
| 51 | |
| 52 | First release of C++11-enabled GEOS could be 3.7.0 or, perhaps, 4.0.0. |