About Newsroom
Monday, November 30, 2026 Today’s Paper
Primary-Sourced Edition About & sourcing →

Hacker News

C++ template drops experimental import-std switch after CMake update

The continuous-cpp project now requires CMake 4.5 and removes explicit module metadata paths from its compiler profiles.

A C++ project template has raised its minimum CMake version to 4.5 and removed an experimental switch it previously used for standard-library module imports. The continuous-cpp pull request was merged on November 29. [1]

The change also removes explicit standard-library module metadata paths from compiler profiles. Developer John McFarlane described the simplification in a Mastodon post; Fediwire has not independently compiled the project. [1][5]

A smaller configuration

The project's diff replaces the CMake 4.4 minimum with 4.5 and deletes the experimental import-std gate, while retaining the setting that enables the standard-library module for the target. It removes explicit metadata paths from GCC and Clang profiles. [1]

CMake's documentation says its metadata-path variable remains available when a compiler cannot discover the relevant file itself. Removing it in this project does not establish that every toolchain can omit it. [3]

What the import means

Toolchain limits still apply

CMake 4.5 documents `import std` support with Ninja generators for Clang 18.1.2 or later using libc++ or libstdc++, and GCC 15 or later except on macOS, where GCC 16 or later is listed. Other supported combinations and limitations are in the CMake manual. This project change is not proof that all compiler, platform or generator combinations work. [2]

Beyond the headline

The conversation

Mastodon
“import std; now basically just works with latest GCC, Clang since CMake 4.5.”

Developer John McFarlane describes his project; CMake documents generator, version and platform limits.

Read on Wildroot
Read more on this topicExplore on Wildroot

Sources & documents

Follow the numbered references to the reporting and original records.

  1. continuous-cpp: Increase CMake dependency versioncodeberg.org
  2. CMake: C++ modules manualcmake.org
  3. CMake: standard-library modules metadatacmake.org
  4. ContextWire Ask passage — Include directiveen.wikipedia.org
  5. John McFarlane: CMake changemastodon.ie