Skip to content

Name namespace-scope unscoped enums#4838

Open
avikivity wants to merge 1 commit into
fmtlib:mainfrom
avikivity:unscoped-enums-bad
Open

Name namespace-scope unscoped enums#4838
avikivity wants to merge 1 commit into
fmtlib:mainfrom
avikivity:unscoped-enums-bad

Conversation

@avikivity

@avikivity avikivity commented Jul 5, 2026

Copy link
Copy Markdown

Unnamed unscoped enums at namespace scope are problematic
(llvm/llvm-project#207581). Giving each such
enum a name (derived from the constant it declares) is enough to avoid
the issue, so do that for the header-level integral constants instead of
leaving them anonymous.

@avikivity avikivity requested a review from vitaut as a code owner July 5, 2026 13:16
Unnamed unscoped enums at namespace scope are problematic
(llvm/llvm-project#207581). Giving each such
enum a name (derived from the constant it declares) is enough to avoid
the issue, so do that for the header-level integral constants instead of
leaving them anonymous.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avikivity avikivity force-pushed the unscoped-enums-bad branch from dc8beff to 649ae19 Compare July 5, 2026 18:03
@avikivity

Copy link
Copy Markdown
Author

Update:

  • rebased
  • simplified: it's enough to name the unscoped enum to make it module-friendly

@avikivity avikivity changed the title Replace namespace-scope unscoped enums with FMT_INLINE_VAR Name namespace-scope unscoped enums Jul 5, 2026
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