Skip to content

Move to C++17 #164

Description

@HugoFara

@filippi: this needs your agreement. Do any of your pipelines use a compiler without C++17 support (GCC < 5)? If so, which machines?

Proposal: raise CMAKE_CXX_STANDARD from 11 to 17 (CMakeLists.txt:59). The code already builds unchanged under C++17 and C++20, and passes the tests under C++20 (22/22, runff OK). GCC 16 defaults to C++20, so today we force the compiler down to C++11.

Meso-NH does not constrain this: it only compiles C_ForeFire_Interface.c and loads libForeFire.so through dlsym. Only the build machines could.

What C++17 gives us: unique_ptr ownership (the root of #159, #160 and the leaks in #162), std::optional instead of the "1234567890" sentinel, [[maybe_unused]] for #161, and std::filesystem.

Do after #161, so the two diffs stay separate.


Drafted with Claude Opus 5, reviewed by a maintainer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions