Skip to content

Give uncast() external linkage for C++20 modules compatibility - #106

Open
dan0907 wants to merge 1 commit into
boostorg:developfrom
dan0907:fix/uncast-internal-linkage-modules
Open

dan0907 wants to merge 1 commit into
boostorg:developfrom
dan0907:fix/uncast-internal-linkage-modules

Conversation

@dan0907

@dan0907 dan0907 commented Sep 3, 2026

Copy link
Copy Markdown

uncast() is declared static, giving it internal linkage, which makes it a TU-local entity per [basic.link]. A TU-local entity declared in a header can easily turn any declaration that names it ([basic.link]/14) into an exposure — which [basic.link]/17 makes ill-formed in a module interface unit or module partition, and deprecated in any other context.

`uncast()` is declared `static`, giving it internal linkage, which
makes it a TU-local entity per [basic.link]. A TU-local entity
declared in a header can easily turn any declaration that names it
([basic.link]/14) into an exposure — which [basic.link]/17 makes
ill-formed in a module interface unit or module partition, and
deprecated in any other context.
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