Skip to content

Add a missing include for the C++ module build - #4868

Open
mstorsjo wants to merge 1 commit into
fmtlib:mainfrom
mstorsjo:missing-include-modules
Open

Add a missing include for the C++ module build#4868
mstorsjo wants to merge 1 commit into
fmtlib:mainfrom
mstorsjo:missing-include-modules

Conversation

@mstorsjo

Copy link
Copy Markdown

The std.h header uses types such as std::atomic and std::atomic_flag. For the normal build mode, this header does include all the headers it needs, such as .

However when building the C++ module of {fmt}, the std.h header omits such includes, and instead expects them to be included beforehand by fmt.cc - which lacked including .

This fixes building the C++ module with libc++ 23, which has removed a number of unnecessary transitive includes.

The std.h header uses types such as std::atomic and std::atomic_flag.
For the normal build mode, this header does include all the
headers it needs, such as <atomic>.

However when building the C++ module of {fmt}, the std.h header
omits such includes, and instead expects them to be included
beforehand by fmt.cc - which lacked including <atomic>.

This fixes building the C++ module with libc++ 23, which has removed
a number of unnecessary transitive includes.
@mstorsjo
mstorsjo requested a review from vitaut as a code owner July 28, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant