Skip to content

fix: remove static from header-inline helpers for C++20 module compatibility - #460

Merged
cameron314 merged 1 commit into
cameron314:masterfrom
Ethan-y-free:fix/modules-static-inline
Oct 26, 2026
Merged

cameron314 merged 1 commit into
cameron314:masterfrom
Ethan-y-free:fix/modules-static-inline

Conversation

@Ethan-y-free

Copy link
Copy Markdown
Contributor

Problem
concurrentqueue.h marks several header-inline helpers as static, which
gives them internal linkage. When the header is used from a C++20 module's
global module fragment, template instantiation can fail.

Change
Remove static from the seven inline helpers in namespace details,
keeping inline so they retain external linkage and a single definition
across translation units.

Based on the patch proposed in #402.

Tests

  • Not run locally (edited via GitHub web UI); CI will verify.

Fixes #402.

@cameron314 cameron314 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@cameron314
cameron314 merged commit 36c5755 into cameron314:master Oct 26, 2026
2 checks passed
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.

Consider not making functions in headers static to improve compatibility with C++ modules

2 participants