Skip to content

make format_int constexpr - #4032

Merged
vitaut merged 4 commits into
fmtlib:masterfrom
dixlorenz:master
Jun 23, 2024
Merged

vitaut merged 4 commits into
fmtlib:masterfrom
dixlorenz:master

Conversation

@dixlorenz

Copy link
Copy Markdown
Contributor

No description provided.

@vitaut vitaut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR. Overall looks good but please apply clang-format.

Comment thread include/fmt/format.h Outdated

/// Returns the content of the output buffer as an `std::string`.
auto str() const -> std::string { return std::string(str_, size()); }
FMT_CONSTEXPR20 auto str() const -> std::string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's drop FMT_CONSTEXPR20 here since constexpr std::string is less widely available.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, one can always write a constexpr free function for it (I did anyway)

@vitaut
vitaut merged commit 7ae102b into fmtlib:master Jun 23, 2024
@vitaut

vitaut commented Jun 23, 2024

Copy link
Copy Markdown
Contributor

Merged, thanks!

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.

2 participants