Switch from C++11 to C++17.
Fixes #16684 ("Discussion: upgrading to C++17").
This is work in progress and thus not ready to merge. C++17 is optimistically planned for 0.21.0.
- build: Update
ax_cxx_compile_stdcxx.m4to latest version which supports C++17 checking - build: Use C++17 mode when compiling. Require a compiler with support for C++17 language features.
- ci: Add
-fsanitize=integersuppression (unsigned-integer-overflow) forlibstdc++C++17'sbasic_string(rfind) - Use
std::make_unique(C++14) instead of legacyMakeUniquewrapper - Use
std::optional(C++17) instead ofboost::optional - Use
[[nodiscard]](C++17) instead of legacyNODISCARDmacro
Left to do:
- Make AppVeyor compile using MSVC in C++17 mode.
- Revert temporary commit "Temporarily disable Travis build jobs without a C++17 compiler" and apply proper fix instead
- Revert temporary commit "Temporarily disable
test_spanparsing" (test_spanparsingdoes not not compile in C++17 mode) and apply proper fix instead