Repository navigation
build: move to C++17 - #226
Merged
Merged
Conversation
CMAKE_CXX_STANDARD 11 -> 17, ISO (CMAKE_CXX_EXTENSIONS OFF) so GCC, Clang and Emscripten all compile the same language instead of gnu++17. With C++17, std::make_unique sits in namespace std and ANN.h's own make_unique shim (needed back in 2011) became ambiguous with it; the shim is removed and the single call site now uses std::make_unique. The comments that described the core as C++11 and the WASM translation unit as the one exception are updated: the whole project is on 17 now. Verified NetCDF OFF release build: 0 errors with GCC 16.2 and Clang 22.1, warning count identical to the C++11 baseline (334, same 57 unique messages), 8/8 ctest on C++17 and on C++11, and -std=c++17 confirmed in the compile flags.
filippi
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
c++17, without the GNU extensions).make_uniquefromANN.h, since C++17 already hasstd::make_unique.Tests (Ubuntu 24.04, NetCDF and MPI on), building
devand this branch from scratch:devctestrunff+runANNoutputsdev, bit by bitpip install .+tests/pythondev, bit by bitFor the coupled test I ran
tests/mnh_real_nested(MPI, 4 processes) four times: dev, branch, dev, branch, changing only thelibForeFire.sothat Meso-NH loads. The only differences are the ones that also show up between twodevruns:air_densityand a few bytes of timestamp in the.ncfiles.