Skip to content

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

Merged
vitaut merged 1 commit into
fmtlib:mainfrom
mstorsjo:missing-include-modules
Jul 29, 2026
Merged

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

Conversation

@mstorsjo

Copy link
Copy Markdown
Contributor

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.

@mstorsjo
mstorsjo requested a review from vitaut as a code owner July 28, 2026 20:14
@vitaut

vitaut commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Please rebase to fix timezone issues.

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 force-pushed the missing-include-modules branch from 8fe59f0 to f60cb7b Compare July 29, 2026 18:37
@mstorsjo

Copy link
Copy Markdown
Contributor Author

Please rebase to fix timezone issues.

Ok, done.

@vitaut
vitaut merged commit 758d39e into fmtlib:main Jul 29, 2026
46 checks passed
@vitaut

vitaut commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Thank you

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.

2 participants