Eliminate extra copy on floating-point formatting

This commit is contained in:
Victor Zverovich
2019-02-06 07:49:19 -08:00
parent 9989e7f4e3
commit 5a314a5288
5 changed files with 131 additions and 140 deletions

View File

@@ -102,7 +102,8 @@ TEST(FPTest, GetCachedPower) {
TEST(FPTest, Grisu2FormatCompilesWithNonIEEEDouble) {
fmt::memory_buffer buf;
grisu2_format(4.2f, buf, fmt::core_format_specs());
int exp = 0;
grisu2_format(4.2f, buf, fmt::core_format_specs(), exp);
}
template <typename T> struct ValueExtractor : fmt::internal::function<T> {