Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make format_int constexpr #4032

Merged
merged 4 commits into from
Jun 23, 2024
Merged

make format_int constexpr #4032

merged 4 commits into from
Jun 23, 2024

Conversation

dixlorenz
Copy link
Contributor

No description provided.

Copy link
Contributor

@vitaut vitaut left a comment

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.

buffer_[buffer_size - 1] = '\0';
return str_;
}

/// 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
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
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
43 checks passed
@vitaut
Copy link
Contributor

vitaut commented Jun 23, 2024

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