Accepting request 844381 from home:alois:branches:devel:libraries:c_c++
- Update to version 7.1.0 * Switched from Grisu3 to Dragonbox for the default floating-point formatting which gives the shortest decimal representation with round-trip guarantee and correct rounding. This makes {fmt} up to 20-30x faster than common implementations of std::ostringstream and sprintf on dtoa-benchmark and faster than double-conversion and Ryū. It is possible to get even better performance at the cost of larger binary size by compiling with the FMT_USE_FULL_CACHE_DRAGONBOX macro set to 1. * Added an experimental unsynchronized file output API which, together with format string compilation can give 5-9 times speed up compared to fprintf on common platforms. * Added a formatter for std::chrono::time_point<system_clock> * Added support for ranges with non-const begin/end to fmt::join * Added a memory_buffer::append overload that takes a range. * Improved handling of single code units in FMT_COMPILE. * Added dynamic width support to format string compilation. * Improved error reporting for unformattable types: now you'll get the type name directly in the error message instead of the note. * Added the make_args_checked function template that allows you to write formatting functions with compile-time format string checks and avoid binary code bloat. * Replaced snprintf fallback with a faster internal IEEE 754 float and double formatter for arbitrary precision. * Made format_to_n and formatted_size part of the core API. * Added fmt::format_to_n overload with format string compilation. * Added fmt::format_to overload that take text_style. * Made the # specifier emit trailing zeros in addition to the decimal point. * Changed the default floating point format to not include .0 for consistency with std::format and std::to_chars. It is possible to get the decimal point and trailing zero with the # specifier. * Fixed an issue with floating-point formatting that could result in addition of a non-significant trailing zero in rare cases e.g. 1.00e-34 instead of 1.0e-34. * Made fmt::to_string fallback on ostream insertion operator if the formatter specialization is not provided. * Added support for the append mode to the experimental file API and improved fcntl.h detection. * Fixed handling of types that have both an implicit conversion operator and an overloaded ostream insertion operator. * Fixed a slicing issue in an internal iterator type. * Fixed an issue in locale-specific integer formatting. * Fixed handling of exotic code unit types. * Improved FMT_ALWAYS_INLINE. * Improved documentation. * Added the FMT_REDUCE_INT_INSTANTIATIONS CMake option that reduces the binary code size at the cost of some integer formatting performance. This can be useful for extremely memory-constrained embedded systems. * Added the FMT_USE_INLINE_NAMESPACES macro to control usage of inline namespaces. * Improved build configuration. * Fixed various warnings and compilation issues. - Add fmt-7.1.0-LTO.patch OBS-URL: https://build.opensuse.org/request/show/844381 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=33
This commit is contained in:
parent
ea8dae1174
commit
bacbb87c86
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b4b51bc16288e2281cddc59c28f0b4f84fed58d016fb038273a09f05f8473297
|
|
||||||
size 740047
|
|
25
fmt-7.1.0-LTO.patch
Normal file
25
fmt-7.1.0-LTO.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From cb224ecaa375e22ace3b844358a63ba16b4df061 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Victor Zverovich <victor.zverovich@gmail.com>
|
||||||
|
Date: Tue, 27 Oct 2020 07:44:12 -0700
|
||||||
|
Subject: [PATCH] Instantiate to_decimal to make gcc lto happy (#1955)
|
||||||
|
|
||||||
|
---
|
||||||
|
src/format.cc | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/format.cc b/src/format.cc
|
||||||
|
index 727134166..88565e602 100644
|
||||||
|
--- a/src/format.cc
|
||||||
|
+++ b/src/format.cc
|
||||||
|
@@ -23,6 +23,11 @@ int format_float(char* buf, std::size_t size, const char* format, int precision,
|
||||||
|
return precision < 0 ? snprintf_ptr(buf, size, format, value)
|
||||||
|
: snprintf_ptr(buf, size, format, precision, value);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+template dragonbox::decimal_fp<float> dragonbox::to_decimal(float x)
|
||||||
|
+ FMT_NOEXCEPT;
|
||||||
|
+template dragonbox::decimal_fp<double> dragonbox::to_decimal(double x)
|
||||||
|
+ FMT_NOEXCEPT;
|
||||||
|
} // namespace detail
|
||||||
|
|
||||||
|
template struct FMT_INSTANTIATION_DEF_API detail::basic_data<void>;
|
3
fmt-7.1.0.tar.gz
Normal file
3
fmt-7.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a53bce7e3b7ee8c7374723262a43356afff176b1684b86061748409e6f8b56c5
|
||||||
|
size 768672
|
64
fmt.changes
64
fmt.changes
@ -1,3 +1,67 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 26 14:54:41 UTC 2020 - Luigi Baldoni <aloisio@gmx.com>
|
||||||
|
|
||||||
|
- Update to version 7.1.0
|
||||||
|
* Switched from Grisu3 to Dragonbox for the default
|
||||||
|
floating-point formatting which gives the shortest decimal
|
||||||
|
representation with round-trip guarantee and correct rounding.
|
||||||
|
This makes {fmt} up to 20-30x faster than common
|
||||||
|
implementations of std::ostringstream and sprintf on
|
||||||
|
dtoa-benchmark and faster than double-conversion and Ryū. It
|
||||||
|
is possible to get even better performance at the cost of
|
||||||
|
larger binary size by compiling with the
|
||||||
|
FMT_USE_FULL_CACHE_DRAGONBOX macro set to 1.
|
||||||
|
* Added an experimental unsynchronized file output API which,
|
||||||
|
together with format string compilation can give 5-9 times
|
||||||
|
speed up compared to fprintf on common platforms.
|
||||||
|
* Added a formatter for std::chrono::time_point<system_clock>
|
||||||
|
* Added support for ranges with non-const begin/end to fmt::join
|
||||||
|
* Added a memory_buffer::append overload that takes a range.
|
||||||
|
* Improved handling of single code units in FMT_COMPILE.
|
||||||
|
* Added dynamic width support to format string compilation.
|
||||||
|
* Improved error reporting for unformattable types: now you'll
|
||||||
|
get the type name directly in the error message instead of
|
||||||
|
the note.
|
||||||
|
* Added the make_args_checked function template that allows
|
||||||
|
you to write formatting functions with compile-time format
|
||||||
|
string checks and avoid binary code bloat.
|
||||||
|
* Replaced snprintf fallback with a faster internal IEEE 754
|
||||||
|
float and double formatter for arbitrary precision.
|
||||||
|
* Made format_to_n and formatted_size part of the core API.
|
||||||
|
* Added fmt::format_to_n overload with format string
|
||||||
|
compilation.
|
||||||
|
* Added fmt::format_to overload that take text_style.
|
||||||
|
* Made the # specifier emit trailing zeros in addition to the
|
||||||
|
decimal point.
|
||||||
|
* Changed the default floating point format to not include .0
|
||||||
|
for consistency with std::format and std::to_chars. It is
|
||||||
|
possible to get the decimal point and trailing zero with the
|
||||||
|
# specifier.
|
||||||
|
* Fixed an issue with floating-point formatting that could
|
||||||
|
result in addition of a non-significant trailing zero in
|
||||||
|
rare cases e.g. 1.00e-34 instead of 1.0e-34.
|
||||||
|
* Made fmt::to_string fallback on ostream insertion operator
|
||||||
|
if the formatter specialization is not provided.
|
||||||
|
* Added support for the append mode to the experimental file
|
||||||
|
API and improved fcntl.h detection.
|
||||||
|
* Fixed handling of types that have both an implicit
|
||||||
|
conversion operator and an overloaded ostream insertion
|
||||||
|
operator.
|
||||||
|
* Fixed a slicing issue in an internal iterator type.
|
||||||
|
* Fixed an issue in locale-specific integer formatting.
|
||||||
|
* Fixed handling of exotic code unit types.
|
||||||
|
* Improved FMT_ALWAYS_INLINE.
|
||||||
|
* Improved documentation.
|
||||||
|
* Added the FMT_REDUCE_INT_INSTANTIATIONS CMake option that
|
||||||
|
reduces the binary code size at the cost of some integer
|
||||||
|
formatting performance. This can be useful for extremely
|
||||||
|
memory-constrained embedded systems.
|
||||||
|
* Added the FMT_USE_INLINE_NAMESPACES macro to control usage
|
||||||
|
of inline namespaces.
|
||||||
|
* Improved build configuration.
|
||||||
|
* Fixed various warnings and compilation issues.
|
||||||
|
- Add fmt-7.1.0-LTO.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 7 19:56:36 UTC 2020 - aloisio@gmx.com
|
Fri Aug 7 19:56:36 UTC 2020 - aloisio@gmx.com
|
||||||
|
|
||||||
|
5
fmt.spec
5
fmt.spec
@ -18,13 +18,15 @@
|
|||||||
|
|
||||||
%define sover 7
|
%define sover 7
|
||||||
Name: fmt
|
Name: fmt
|
||||||
Version: 7.0.3
|
Version: 7.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A formatting library for C++
|
Summary: A formatting library for C++
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://fmtlib.net/
|
URL: http://fmtlib.net/
|
||||||
Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
|
# PATCH-FIX-UPSTREAM fmt-7.1.0-LTO.patch
|
||||||
|
Patch0: fmt-7.1.0-LTO.patch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -51,7 +53,6 @@ Development files for fmt, a formatting library for C++.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir}
|
%cmake -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir}
|
||||||
|
|
||||||
%make_jobs
|
%make_jobs
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
Loading…
Reference in New Issue
Block a user