Skip to content

[cxx-interop] Add std::expected into the libstdc++ modulemap on Linux#88581

Open
egorzhdan wants to merge 2 commits intoswiftlang:mainfrom
egorzhdan:egorzhdan/std-expected-linux
Open

[cxx-interop] Add std::expected into the libstdc++ modulemap on Linux#88581
egorzhdan wants to merge 2 commits intoswiftlang:mainfrom
egorzhdan:egorzhdan/std-expected-linux

Conversation

@egorzhdan
Copy link
Copy Markdown
Contributor

  • Explanation:
    Projects on Linux had trouble importing C++ libraries that use the <expected> C++ header. This was due to a modularization error: the libstdc++ modulemap did not list <expected> as one of its headers.
  • Scope:
    Changes the libstdc++ modulemap that the Swift compiler injects into system include paths using LLVM VFS.
  • Issues:
    rdar://175155283
  • Risk:
    Low, this only affects Linux and is covered by tests.
  • Testing:
    Enabled existing std::expected test on Linux.

@egorzhdan egorzhdan requested a review from a team as a code owner April 21, 2026 15:38
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Apr 21, 2026
@egorzhdan
Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Copy Markdown
Contributor Author

@swift-ci please test Windows

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

Labels

c++ interop Feature: Interoperability with C++

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants