-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
There was a problem hiding this 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.
include/fmt/format.h
Outdated
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
Merged, thanks! |
No description provided.