Skip to content

Use til::hstring_format wherever possible#19733

Merged
DHowett merged 3 commits intomainfrom
dev/lhecker/til-hstring-format
Jan 16, 2026
Merged

Use til::hstring_format wherever possible#19733
DHowett merged 3 commits intomainfrom
dev/lhecker/til-hstring-format

Conversation

@lhecker
Copy link
Member

@lhecker lhecker commented Jan 12, 2026

A follow-up of #19721 which added til::hstring_format.

@lhecker lhecker added the Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. label Jan 12, 2026
@lhecker lhecker force-pushed the dev/lhecker/til-hstring-format branch from 64d3f16 to 7eb03c7 Compare January 13, 2026 15:17
@DHowett
Copy link
Member

DHowett commented Jan 13, 2026

well, the build ist broke

// NOTE: This will fail to compile if you pass a string literal as the first argument (the format argument).
// This is because std::forwarding literals turns them from constant expressions into regular ones.
// It can be fixed by giving the first argument an explicit type. I intentionally didn't do that
// because if you pass a string literal, you really ought to pass a FMT_COMPILE() instead.
Copy link
Member

Choose a reason for hiding this comment

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

well, then why don't the tests use FMT_COMPILE? Since you're already here ;P

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah true I could've done that. Not using hstring when not needed seemed like a nice improvement already. :D

@DHowett DHowett merged commit c455759 into main Jan 16, 2026
20 checks passed
@DHowett DHowett deleted the dev/lhecker/til-hstring-format branch January 16, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants