diff --git a/ChangeLog.rst b/ChangeLog.rst index 6b1d8513..5f667c52 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,8 +1,6 @@ 10.0.0 - TBD ------------ -TODO: https://github.com/fmtlib/fmt/commits/master?after=9b7829e264af100fca98625579d2a766a5e80f57+244&branch=master&qualified_name=refs%2Fheads%2Fmaster - * Replaced Grisu with a new floating-point formatting algorithm for given precision (`#3262 `_, `#2750 `_, @@ -25,14 +23,16 @@ TODO: https://github.com/fmtlib/fmt/commits/master?after=9b7829e264af100fca98625 Thanks `@ShawnZhong (Shawn Zhong) `_. * Improved C++20 module support - (`#3386 `_, + (`#3134 `_, + `#3386 `_, `#3387 `_, `#3388 `_, `#3392 `_, `#3397 `_, `#3399 `_, `#3400 `_). - Thanks `@DanielaE (Daniela Engert) `_. + Thanks `@laitingsheng (Tinson Lai) `_ and + `@DanielaE (Daniela Engert) `_. Switched to the `modules CMake library `_ which allows building {fmt} as a C++20 module with clang:: @@ -60,13 +60,6 @@ TODO: https://github.com/fmtlib/fmt/commits/master?after=9b7829e264af100fca98625 types for compatibility with ``std::format`` and to prevent potential ODR violations. Use ``format_as`` instead. -* Reintroduced build speed optimization via extern templates to - ``fmt/format.h``. It was previously disabled because of incompatibility - between clang and gcc. - - viz@viz-mbp fmt % time c++ -c test.cc -I include -std=c++17 -O2 -c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 total - * Added support for fill, align and width to the time point formatter (`#3237 `_, `#3260 `_). @@ -87,6 +80,8 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 (`#2207 `_, `#3117 `_, `#3115 `_, + `#3143 `_, + `#3144 `_, `#3349 `_). For example (`godbolt `__): @@ -100,7 +95,8 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 } Thanks `@patrickroocks (Patrick Roocks) `_ - and `@BRevzin (Barry Revzin) `_. + `@phprus (Vladislav Shchapov) `_, + `@BRevzin (Barry Revzin) `_. * Added support for ``std::utc_time`` (`#3098 `_, @@ -123,6 +119,39 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 `#3232 `_). Thanks `@ShawnZhong (Shawn Zhong) `_. +* Added a formatter for ``std::exception`` + (`#2977 `_, + `#3012 `_, + `#3062 `_, + `#3076 `_, + `#3119 `_). + For example (`godbolt `__): + + .. code:: c++ + + #include + #include + + int main() { + try { + std::vector().at(0); + } catch(const std::exception& e) { + fmt::print("{}", e); + } + } + + prints:: + + vector::_M_range_check: __n (which is 0) >= this->size() (which is 0) + + on libstdc++. + Thanks `@zach2good (Zach Toogood) `_ and + `@phprus (Vladislav Shchapov) `_. + +* Moved ``std::error_code`` formatter from ``fmt/os.h`` to ``fmt/std.h``. + (`#3125 `_). + Thanks `@phprus (Vladislav Shchapov) `_. + * Added formatters for standard container adapters: ``std::priority_queue``, ``std::queue`` and ``std::stack`` (`#3215 `_, @@ -196,6 +225,23 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 (`#3416 `_). Thanks `@phprus (Vladislav Shchapov) `_. +* Added support for UTF-8 digit separators via an experimental locale facet + (`#1861 `_). + For example (`godbolt `__): + + .. code:: c++ + + auto loc = std::locale( + std::locale(), new fmt::format_facet("’")); + auto s = fmt::format(loc, "{:L}", 1000); + + where ``’`` is U+2019 used as a digit separator in the de_CH locale. + +* Added an overload of ``formatted_size`` that takes a locale + (`#3084 `_, + `#3087 `_). + Thanks `@gerboengels `_. + * Removed the deprecated ``FMT_DEPRECATED_OSTREAM``. * Fixed a UB when using a null ``std::string_view`` with ``fmt::to_string`` @@ -204,6 +250,14 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 `#3244 `_). Thanks `@phprus (Vladislav Shchapov) `_. +* Added ``starts_with`` to the fallback ``string_view`` implementation + (`#3080 `_). + Thanks `@phprus (Vladislav Shchapov) `_. + +* Added ``fmt::basic_format_string::get()`` for compatibility with + ``basic_format_string`` (`#3111 `_). + Thanks `@huangqinjin `_. + * Improved documentation (`#3108 `_, `#3169 `_, @@ -211,7 +265,9 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 Thanks `@Vertexwahn `_. * Improved build configuration and tests - (`#3189 `_, + (`#3118 `_, + `#3120 `_, + `#3189 `_, `#3299 `_, `#3302 `_, `#3317 `_, @@ -220,7 +276,8 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 `#3395 `_, `#3406 `_, `#3411 `_). - Thanks `@phprus (Vladislav Shchapov) `_, + Thanks `@dimztimz (Dimitrij Mijoski) `_, + `@phprus (Vladislav Shchapov) `_, `@joycebrum (Joyce) `_, `@kevinhwang (Kevin Hwang) `_, `@Vertexwahn `_. @@ -241,11 +298,21 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 * Fixed various warnings and compilation issues (`#3057 `_, `#3066 `_, + `#3072 `_, + `#3082 `_, + `#3091 `_, `#3092 `_, + `#3093 `_, + `#3095 `_, `#3096 `_, + `#3097 `_, `#3128 `_, + `#3129 `_, + `#3137 `_, `#3140 `_, + `#3142 `_, `#3149 `_, + `#3150 `_, `#3154 `_, `#3163 `_, `#3178 `_, @@ -280,7 +347,13 @@ c++ -c test.cc -I include -std=c++17 -O2 0.49s user 0.13s system 98% cpu 0.632 `#3415 `_). Thanks `@phprus (Vladislav Shchapov) `_, `@gsjaardema (Greg Sjaardema) `_, + `@NewbieOrange `_, + `@EngineLessCC (VivyaCC) `_, + `@asmaloney (Andy Maloney) `_, + `@HazardyKnusperkeks (Björn Schäpers) + `_, `@sergiud (Sergiu Deitsch) `_, + `@Youw (Ihor Dutchak) `_, `@czudziakm (Maksymilian Czudziak) `_, `@chronoxor (Ivan Shynkarenka) `_, `@ShawnZhong (Shawn Zhong) `_,