From 52e7b25f953f40425a8a8d3c96a4ae45866c8ed8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 07:07:39 -0700 Subject: [PATCH 01/41] Update changelog --- ChangeLog.md | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index b6ef8ac773269..9d130548d1f47 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,25 +1,31 @@ # 11.0.0 - TBD - Added `fmt/base.h` which provides a subset of the API with minimal include - dependencies and enough functionality to replace all uses of `*printf`. - This brings the compile time of code using {fmt} much closer to the - equivalent `printf` code as shown on the following benchmark that compiles - 100 source files: + dependencies and enough functionality to replace all uses of the `printf` + family of functions. This brings the compile time of code using {fmt} much + closer to the equivalent `printf` code as shown on the following benchmark + that compiles 100 source files: | Method | Compile Time (s) | |--------------|------------------| | printf | 1.6 | | IOStreams | 25.9 | - | fmt | 4.8 | + | fmt 10.x | 19.0 | + | fmt 11.0 | 4.8 | | tinyformat | 29.1 | | Boost Format | 55.0 | + This gives almost 4x improvement in bulid speed compared to version 10. Note that this is purely formatting code and includes. In real projects the - difference will be smaller partly because common standard headers will be - included in almost any translation unit anyway. + difference from `printf` will be smaller partly because common standard + headers will be included in almost any translation unit (TU) anyway. + In particular, in every case except `printf` above ~1s is spent in total on + including `` in all TUs. - Optimized includes in other headers such as `fmt/format.h` which is now - roughly equivalent to the old `fmt/core.h`. + roughly equivalent to the old `fmt/core.h` in terms of build speed. + +- Migrated the documentation at https://fmt.dev/ from Sphinx to MkDocs. - Improved C++20 module support (https://github.com/fmtlib/fmt/issues/3990, @@ -31,8 +37,10 @@ https://github.com/fmtlib/fmt/pull/4004, https://github.com/fmtlib/fmt/pull/4005, https://github.com/fmtlib/fmt/pull/4006, - https://github.com/fmtlib/fmt/pull/4013). In particular, native CMake support - for modules is now used if available. Thanks @yujincheng08. + https://github.com/fmtlib/fmt/pull/4013, + https://github.com/fmtlib/fmt/pull/4027, + https://github.com/fmtlib/fmt/pull/4029). In particular, native CMake support + for modules is now used if available. Thanks @yujincheng08 and @matt77hias. - Added an option to replace standard includes with `import std` enabled via the `FMT_IMPORT_STD` macro (https://github.com/fmtlib/fmt/issues/3921, @@ -255,7 +263,8 @@ https://github.com/fmtlib/fmt/pull/3980, https://github.com/fmtlib/fmt/pull/3988, https://github.com/fmtlib/fmt/pull/4010, - https://github.com/fmtlib/fmt/pull/4012). + https://github.com/fmtlib/fmt/pull/4012, + https://github.com/fmtlib/fmt/pull/4038). Thanks @vgorrX, @waywardmonkeys, @tchaikov and @phprus. - Fixed buffer overflow when using format string compilation with debug format @@ -310,7 +319,9 @@ https://github.com/fmtlib/fmt/pull/3968, https://github.com/fmtlib/fmt/pull/3972, https://github.com/fmtlib/fmt/pull/3983, + https://github.com/fmtlib/fmt/issues/3992, https://github.com/fmtlib/fmt/pull/3995, + https://github.com/fmtlib/fmt/pull/4009, https://github.com/fmtlib/fmt/pull/4023). Thanks @hmbj, @phprus, @res2k, @Baardi, @matt77hias, @waywardmonkeys, @hmbj, @yakra, @prlw1, @Arghnews, @mtillmann0, @ShifftC, @eepp, @jimmy-park and @@ -483,6 +494,10 @@ - Made `fmt::streamed` `constexpr`. (https://github.com/fmtlib/fmt/pull/3650). Thanks @muggenhor. +- Made `fmt::format_int` `constexpr` + (https://github.com/fmtlib/fmt/issues/4031, + https://github.com/fmtlib/fmt/pull/4032). Thanks @dixlorenz. + - Enabled `consteval` on older versions of MSVC (https://github.com/fmtlib/fmt/pull/3757). Thanks @phprus. From 4703ade76dc152841580333af14f04a049d80ff3 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 07:22:57 -0700 Subject: [PATCH 02/41] Update build script --- support/manage.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/support/manage.py b/support/manage.py index 41a39c47cf3c8..08a8af2427ad8 100755 --- a/support/manage.py +++ b/support/manage.py @@ -76,18 +76,8 @@ def create_build_env(): class Env: pass env = Env() - - # Import the documentation build module. env.fmt_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - sys.path.insert(0, os.path.join(env.fmt_dir, 'doc')) - import build - env.build_dir = 'build' - env.versions = build.versions - - # Virtualenv and repos are cached to speed up builds. - build.create_build_env(os.path.join(env.build_dir, 'virtualenv')) - env.fmt_repo = Git(os.path.join(env.build_dir, 'fmt')) return env From 2d9d32c62b1f5396db59516f0e83649966b4cf54 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 07:25:35 -0700 Subject: [PATCH 03/41] Update build script --- support/manage.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/support/manage.py b/support/manage.py index 08a8af2427ad8..71d960be5ee29 100755 --- a/support/manage.py +++ b/support/manage.py @@ -271,17 +271,8 @@ def release(args): line = prefix + version + ')\n' sys.stdout.write(line) - # Add the version to the build script. - script = os.path.join('doc', 'build.py') - script_path = os.path.join(fmt_repo.dir, script) - for line in fileinput.input(script_path, inplace=True): - m = re.match(r'( *versions \+= )\[(.+)\]', line) - if m: - line = '{}[{}, \'{}\']\n'.format(m.group(1), m.group(2), version) - sys.stdout.write(line) - fmt_repo.checkout('-B', 'release') - fmt_repo.add(changelog, cmakelists, script) + fmt_repo.add(changelog, cmakelists) fmt_repo.commit('-m', 'Update version') # Build the docs and package. From ec46c3de9723c87001eeeaacbf7a489ad6ac4126 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:05:52 -0700 Subject: [PATCH 04/41] Update build script --- support/manage.py | 132 +++++++++++----------------------------------- 1 file changed, 32 insertions(+), 100 deletions(-) diff --git a/support/manage.py b/support/manage.py index 71d960be5ee29..1c4d48a81fb4c 100755 --- a/support/manage.py +++ b/support/manage.py @@ -107,106 +107,38 @@ def update_site(env): doc_repo = Git(os.path.join(env.build_dir, 'fmtlib.github.io')) doc_repo.update('git@github.com:fmtlib/fmtlib.github.io') - for version in env.versions: - clean_checkout(env.fmt_repo, version) - target_doc_dir = os.path.join(env.fmt_repo.dir, 'doc') - # Remove the old theme. - for entry in os.listdir(target_doc_dir): - path = os.path.join(target_doc_dir, entry) - if os.path.isdir(path): - shutil.rmtree(path) - # Copy the new theme. - for entry in ['_static', '_templates', 'basic-bootstrap', 'bootstrap', - 'conf.py', 'fmt.less']: - src = os.path.join(env.fmt_dir, 'doc', entry) - dst = os.path.join(target_doc_dir, entry) - copy = shutil.copytree if os.path.isdir(src) else shutil.copyfile - copy(src, dst) - # Rename index to contents. - contents = os.path.join(target_doc_dir, 'contents.rst') - if not os.path.exists(contents): - os.rename(os.path.join(target_doc_dir, 'index.rst'), contents) - # Fix issues in reference.rst/api.rst. - for filename in ['reference.rst', 'api.rst', 'index.rst']: - pattern = re.compile('doxygenfunction.. (bin|oct|hexu|hex)$', re.M) - with rewrite(os.path.join(target_doc_dir, filename)) as b: - b.data = b.data.replace('std::ostream &', 'std::ostream&') - b.data = re.sub(pattern, r'doxygenfunction:: \1(int)', b.data) - b.data = b.data.replace('std::FILE*', 'std::FILE *') - b.data = b.data.replace('unsigned int', 'unsigned') - #b.data = b.data.replace('operator""_', 'operator"" _') - b.data = b.data.replace( - 'format_to_n(OutputIt, size_t, string_view, Args&&', - 'format_to_n(OutputIt, size_t, const S&, const Args&') - b.data = b.data.replace( - 'format_to_n(OutputIt, std::size_t, string_view, Args&&', - 'format_to_n(OutputIt, std::size_t, const S&, const Args&') - if version == ('3.0.2'): - b.data = b.data.replace( - 'fprintf(std::ostream&', 'fprintf(std::ostream &') - if version == ('5.3.0'): - b.data = b.data.replace( - 'format_to(OutputIt, const S&, const Args&...)', - 'format_to(OutputIt, const S &, const Args &...)') - if version.startswith('5.') or version.startswith('6.'): - b.data = b.data.replace(', size_t', ', std::size_t') - if version.startswith('7.'): - b.data = b.data.replace(', std::size_t', ', size_t') - b.data = b.data.replace('join(It, It', 'join(It, Sentinel') - if version.startswith('7.1.'): - b.data = b.data.replace(', std::size_t', ', size_t') - b.data = b.data.replace('join(It, It', 'join(It, Sentinel') - b.data = b.data.replace( - 'fmt::format_to(OutputIt, const S&, Args&&...)', - 'fmt::format_to(OutputIt, const S&, Args&&...) -> ' + - 'typename std::enable_if::type') - b.data = b.data.replace('aa long', 'a long') - b.data = b.data.replace('serveral', 'several') - if version.startswith('6.2.'): - b.data = b.data.replace( - 'vformat(const S&, basic_format_args<' + - 'buffer_context>)', - 'vformat(const S&, basic_format_args<' + - 'buffer_context>>)') - # Fix a broken link in index.rst. - index = os.path.join(target_doc_dir, 'index.rst') - with rewrite(index) as b: - b.data = b.data.replace( - 'doc/latest/index.html#format-string-syntax', 'syntax.html') - # Fix issues in syntax.rst. - index = os.path.join(target_doc_dir, 'syntax.rst') - with rewrite(index) as b: - b.data = b.data.replace( - '..productionlist:: sf\n', '.. productionlist:: sf\n ') - b.data = b.data.replace('Examples:\n', 'Examples::\n') - # Build the docs. - html_dir = os.path.join(env.build_dir, 'html') - if os.path.exists(html_dir): - shutil.rmtree(html_dir) - include_dir = env.fmt_repo.dir - if LooseVersion(version) >= LooseVersion('5.0.0'): - include_dir = os.path.join(include_dir, 'include', 'fmt') - elif LooseVersion(version) >= LooseVersion('3.0.0'): - include_dir = os.path.join(include_dir, 'fmt') - import build - build.build_docs(version, doc_dir=target_doc_dir, - include_dir=include_dir, work_dir=env.build_dir) - shutil.rmtree(os.path.join(html_dir, '.doctrees')) - # Create symlinks for older versions. - for link, target in {'index': 'contents', 'api': 'reference'}.items(): - link = os.path.join(html_dir, link) + '.html' - target += '.html' - if os.path.exists(os.path.join(html_dir, target)) and \ - not os.path.exists(link): - os.symlink(target, link) - # Copy docs to the website. - version_doc_dir = os.path.join(doc_repo.dir, version) - try: - shutil.rmtree(version_doc_dir) - except OSError as e: - if e.errno != errno.ENOENT: - raise - shutil.move(html_dir, version_doc_dir) + version = '11.0.0' + clean_checkout(env.fmt_repo, version) + target_doc_dir = os.path.join(env.fmt_repo.dir, 'doc') + + # Build the docs. + html_dir = os.path.join(env.build_dir, 'html') + if os.path.exists(html_dir): + shutil.rmtree(html_dir) + include_dir = env.fmt_repo.dir + if LooseVersion(version) >= LooseVersion('5.0.0'): + include_dir = os.path.join(include_dir, 'include', 'fmt') + elif LooseVersion(version) >= LooseVersion('3.0.0'): + include_dir = os.path.join(include_dir, 'fmt') + import build + build.build_docs(version, doc_dir=target_doc_dir, + include_dir=include_dir, work_dir=env.build_dir) + shutil.rmtree(os.path.join(html_dir, '.doctrees')) + # Create symlinks for older versions. + for link, target in {'index': 'contents', 'api': 'reference'}.items(): + link = os.path.join(html_dir, link) + '.html' + target += '.html' + if os.path.exists(os.path.join(html_dir, target)) and \ + not os.path.exists(link): + os.symlink(target, link) + # Copy docs to the website. + version_doc_dir = os.path.join(doc_repo.dir, version) + try: + shutil.rmtree(version_doc_dir) + except OSError as e: + if e.errno != errno.ENOENT: + raise + shutil.move(html_dir, version_doc_dir) def release(args): From 8b1fcf5cc107419ddf2a2058bf4cd0420c6d4003 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:18:24 -0700 Subject: [PATCH 05/41] Update doc dir --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 523c299bed904..bc625ac1d88fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,12 +464,12 @@ function(add_doc_target) ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR}/support/python ${MKDOCS} build -f ${CMAKE_CURRENT_SOURCE_DIR}/support/mkdocs.yml - --site-dir ${CMAKE_CURRENT_BINARY_DIR}/site + --site-dir ${CMAKE_CURRENT_BINARY_DIR}/doc/html --no-directory-urls SOURCES ${sources}) include(GNUInstallDirs) - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/support/site/ + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/fmt OPTIONAL) endfunction() From 0fae326c42e121bf888f12cfa4136ab02ebed3d0 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:32:24 -0700 Subject: [PATCH 06/41] Update site dir --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc625ac1d88fd..1fbcd6a1527b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,12 +464,13 @@ function(add_doc_target) ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR}/support/python ${MKDOCS} build -f ${CMAKE_CURRENT_SOURCE_DIR}/support/mkdocs.yml - --site-dir ${CMAKE_CURRENT_BINARY_DIR}/doc/html + # MkDocs requires the site dir to be outside of the doc dir. + --site-dir ${CMAKE_CURRENT_BINARY_DIR}/doc-html --no-directory-urls SOURCES ${sources}) include(GNUInstallDirs) - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc-html/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/fmt OPTIONAL) endfunction() From a34120329a31d6664b3fa506371f8ad6a5778aa2 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:38:16 -0700 Subject: [PATCH 07/41] Update doc script --- support/python/mkdocstrings_handlers/cxx/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/python/mkdocstrings_handlers/cxx/__init__.py b/support/python/mkdocstrings_handlers/cxx/__init__.py index b3d91bf8f5be4..32e0f75e1d290 100644 --- a/support/python/mkdocstrings_handlers/cxx/__init__.py +++ b/support/python/mkdocstrings_handlers/cxx/__init__.py @@ -158,8 +158,8 @@ def __init__(self, **kwargs: Any) -> None: # Run doxygen. cmd = ['doxygen', '-'] - doc_dir = Path(__file__).parents[3] - top_dir = os.path.dirname(doc_dir) + support_dir = Path(__file__).parents[3] + top_dir = os.path.dirname(support_dir) include_dir = os.path.join(top_dir, 'include', 'fmt') self._ns2doxyxml = {} self._doxyxml_dir = os.path.join(top_dir, 'build', 'doxyxml') From 1e94a463edc58648351e9c301950895895e7c7e1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:49:01 -0700 Subject: [PATCH 08/41] Create build dir --- support/python/mkdocstrings_handlers/cxx/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/support/python/mkdocstrings_handlers/cxx/__init__.py b/support/python/mkdocstrings_handlers/cxx/__init__.py index 32e0f75e1d290..03c0c05675ada 100644 --- a/support/python/mkdocstrings_handlers/cxx/__init__.py +++ b/support/python/mkdocstrings_handlers/cxx/__init__.py @@ -162,9 +162,11 @@ def __init__(self, **kwargs: Any) -> None: top_dir = os.path.dirname(support_dir) include_dir = os.path.join(top_dir, 'include', 'fmt') self._ns2doxyxml = {} - self._doxyxml_dir = os.path.join(top_dir, 'build', 'doxyxml') + build_dir = os.path.join(top_dir, 'build') + os.mkdirs(build_dir, exists_ok=True) + self._doxyxml_dir = os.path.join(build_dir, 'doxyxml') p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT) - out, _ = p.communicate(input=r''' + _, _ = p.communicate(input=r''' PROJECT_NAME = fmt GENERATE_XML = YES GENERATE_LATEX = NO @@ -188,7 +190,7 @@ def __init__(self, **kwargs: Any) -> None: ' '.join([os.path.join(include_dir, h) for h in headers]), self._doxyxml_dir).encode('utf-8')) if p.returncode != 0: - raise CalledProcessError(p.returncode, cmd) + raise CalledProcessError(p.returncode, cmd) # Merge all file-level XMLs into one to simplify search. self._file_doxyxml = None From 2952130cbcbb04edc16ea00fbdf1051bf24f67b7 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:50:16 -0700 Subject: [PATCH 09/41] Fix doc build --- support/python/mkdocstrings_handlers/cxx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/python/mkdocstrings_handlers/cxx/__init__.py b/support/python/mkdocstrings_handlers/cxx/__init__.py index 03c0c05675ada..4ade52ab223d8 100644 --- a/support/python/mkdocstrings_handlers/cxx/__init__.py +++ b/support/python/mkdocstrings_handlers/cxx/__init__.py @@ -163,7 +163,7 @@ def __init__(self, **kwargs: Any) -> None: include_dir = os.path.join(top_dir, 'include', 'fmt') self._ns2doxyxml = {} build_dir = os.path.join(top_dir, 'build') - os.mkdirs(build_dir, exists_ok=True) + os.makedirs(build_dir, exist_ok=True) self._doxyxml_dir = os.path.join(build_dir, 'doxyxml') p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT) _, _ = p.communicate(input=r''' From 602e3c3d11c0a7e6c0579709ccaed2a31347de3b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:54:03 -0700 Subject: [PATCH 10/41] Update build script --- support/manage.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/support/manage.py b/support/manage.py index 1c4d48a81fb4c..434446d274167 100755 --- a/support/manage.py +++ b/support/manage.py @@ -104,8 +104,8 @@ class Buffer: def update_site(env): env.fmt_repo.update(fmt_repo_url) - doc_repo = Git(os.path.join(env.build_dir, 'fmtlib.github.io')) - doc_repo.update('git@github.com:fmtlib/fmtlib.github.io') + doc_repo = Git(os.path.join(env.build_dir, 'fmt.dev')) + doc_repo.update('git@github.com:fmtlib/fmt.dev') version = '11.0.0' clean_checkout(env.fmt_repo, version) @@ -124,13 +124,6 @@ def update_site(env): build.build_docs(version, doc_dir=target_doc_dir, include_dir=include_dir, work_dir=env.build_dir) shutil.rmtree(os.path.join(html_dir, '.doctrees')) - # Create symlinks for older versions. - for link, target in {'index': 'contents', 'api': 'reference'}.items(): - link = os.path.join(html_dir, link) + '.html' - target += '.html' - if os.path.exists(os.path.join(html_dir, target)) and \ - not os.path.exists(link): - os.symlink(target, link) # Copy docs to the website. version_doc_dir = os.path.join(doc_repo.dir, version) try: @@ -195,14 +188,6 @@ def release(args): changes += line.rstrip() stripped = True - cmakelists = 'CMakeLists.txt' - for line in fileinput.input(os.path.join(fmt_repo.dir, cmakelists), - inplace=True): - prefix = 'set(FMT_VERSION ' - if line.startswith(prefix): - line = prefix + version + ')\n' - sys.stdout.write(line) - fmt_repo.checkout('-B', 'release') fmt_repo.add(changelog, cmakelists) fmt_repo.commit('-m', 'Update version') From 53186535d58f66d1a0f72061f2176678f2f60956 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:54:52 -0700 Subject: [PATCH 11/41] Bump version --- include/fmt/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 2ba23d5a51b59..0256f956704bf 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -24,7 +24,7 @@ #endif // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 100202 +#define FMT_VERSION 110000 // Detect compiler versions. #if defined(__clang__) && !defined(__ibmxl__) From 949d5d17955d621f81002601e4ea2782f0564900 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:59:54 -0700 Subject: [PATCH 12/41] Fix build script --- support/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/manage.py b/support/manage.py index 434446d274167..4bd4a15442ff8 100755 --- a/support/manage.py +++ b/support/manage.py @@ -189,7 +189,7 @@ def release(args): stripped = True fmt_repo.checkout('-B', 'release') - fmt_repo.add(changelog, cmakelists) + fmt_repo.add(changelog) fmt_repo.commit('-m', 'Update version') # Build the docs and package. From 26d07e49b2293725c6b254cb32b69cf2668f901d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 09:06:49 -0700 Subject: [PATCH 13/41] Fix formatting --- support/manage.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/support/manage.py b/support/manage.py index 4bd4a15442ff8..dbe89d50b8943 100755 --- a/support/manage.py +++ b/support/manage.py @@ -165,28 +165,7 @@ def release(args): if first_section[0] == '\n': first_section.pop(0) - changes = '' - code_block = False - stripped = False - for line in first_section: - if re.match(r'^\s*```', line): - code_block = not code_block - changes += line - stripped = False - continue - if code_block: - changes += line - continue - if line == '\n': - changes += line - if stripped: - changes += line - stripped = False - continue - if stripped: - line = ' ' + line.lstrip() - changes += line.rstrip() - stripped = True + changes = first_section fmt_repo.checkout('-B', 'release') fmt_repo.add(changelog) From 1930ed4bfac9ca766c579cdf04e6b9fa33308e5b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 09:09:55 -0700 Subject: [PATCH 14/41] Fix release script --- support/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/manage.py b/support/manage.py index dbe89d50b8943..51c4b11f27883 100755 --- a/support/manage.py +++ b/support/manage.py @@ -165,7 +165,7 @@ def release(args): if first_section[0] == '\n': first_section.pop(0) - changes = first_section + changes = ''.join(first_section) fmt_repo.checkout('-B', 'release') fmt_repo.add(changelog) From 3f251fc9c986dbef536f2d44c7ffa1c6a43832b6 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 09:23:02 -0700 Subject: [PATCH 15/41] Fix handling of tables --- support/manage.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/support/manage.py b/support/manage.py index 51c4b11f27883..10cd180f1e6a1 100755 --- a/support/manage.py +++ b/support/manage.py @@ -166,6 +166,27 @@ def release(args): first_section.pop(0) changes = ''.join(first_section) + code_block = False + stripped = False + for line in first_section: + if re.match(r'^\s*```', line): + code_block = not code_block + changes += line + stripped = False + continue + if code_block: + changes += line + continue + if line == '\n' or re.match(r'^\s*|', line): + changes += line + if stripped: + changes += line + stripped = False + continue + if stripped: + line = ' ' + line.lstrip() + changes += line.rstrip() + stripped = True fmt_repo.checkout('-B', 'release') fmt_repo.add(changelog) From 5d0adb6d74dfd55be0c8b6b746f151a3f1d56220 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 09:29:06 -0700 Subject: [PATCH 16/41] Fix handling of tables, take 2 --- support/manage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support/manage.py b/support/manage.py index 10cd180f1e6a1..e6ff290f1c307 100755 --- a/support/manage.py +++ b/support/manage.py @@ -165,6 +165,7 @@ def release(args): if first_section[0] == '\n': first_section.pop(0) + # Workaround GitHub-flavored markdown treating newlines as
. changes = ''.join(first_section) code_block = False stripped = False @@ -177,7 +178,7 @@ def release(args): if code_block: changes += line continue - if line == '\n' or re.match(r'^\s*|', line): + if line == '\n' or re.match(r'^\s*\|', line): changes += line if stripped: changes += line From dedc17c1c95ad1a23ecbb0003688b20832824eb9 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 09:31:32 -0700 Subject: [PATCH 17/41] Fix handling of tables, take 3 --- support/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/manage.py b/support/manage.py index e6ff290f1c307..587fde421d715 100755 --- a/support/manage.py +++ b/support/manage.py @@ -178,7 +178,7 @@ def release(args): if code_block: changes += line continue - if line == '\n' or re.match(r'^\s*\|', line): + if line == '\n' or re.match(r'^\s*\|.*', line): changes += line if stripped: changes += line From 84f61318259ad74d0ddcbebdeb1956d05b3c7ef1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 09:36:35 -0700 Subject: [PATCH 18/41] Fix formatting of release notes --- support/manage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/support/manage.py b/support/manage.py index 587fde421d715..7c80d6fba204d 100755 --- a/support/manage.py +++ b/support/manage.py @@ -166,7 +166,7 @@ def release(args): first_section.pop(0) # Workaround GitHub-flavored markdown treating newlines as
. - changes = ''.join(first_section) + changes = '' code_block = False stripped = False for line in first_section: @@ -179,10 +179,10 @@ def release(args): changes += line continue if line == '\n' or re.match(r'^\s*\|.*', line): - changes += line if stripped: - changes += line + changes += '\n' stripped = False + changes += line continue if stripped: line = ' ' + line.lstrip() From 165210890546bfcc843aa144e6fc27a6c3ea52cc Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 09:38:40 -0700 Subject: [PATCH 19/41] Fix typo --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 9d130548d1f47..2435c82b967e6 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -15,7 +15,7 @@ | tinyformat | 29.1 | | Boost Format | 55.0 | - This gives almost 4x improvement in bulid speed compared to version 10. + This gives almost 4x improvement in build speed compared to version 10. Note that this is purely formatting code and includes. In real projects the difference from `printf` will be smaller partly because common standard headers will be included in almost any translation unit (TU) anyway. From bd9af9a9f1477ed125b0b27192ce54278fc04b9d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 07:49:55 -0700 Subject: [PATCH 20/41] Update changelog --- ChangeLog.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 2435c82b967e6..c06198ccc8c49 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -16,9 +16,9 @@ | Boost Format | 55.0 | This gives almost 4x improvement in build speed compared to version 10. - Note that this is purely formatting code and includes. In real projects the - difference from `printf` will be smaller partly because common standard - headers will be included in almost any translation unit (TU) anyway. + Note that the benchmark is purely formatting code and includes. In real + projects the difference from `printf` will be smaller partly because common + standard headers will be included in almost any translation unit (TU) anyway. In particular, in every case except `printf` above ~1s is spent in total on including `` in all TUs. @@ -68,7 +68,7 @@ Benchmark Time CPU Iterations ------------------------------------------------------- printf 81.8 ns 81.5 ns 8496899 - fmt::print (10.*) 63.8 ns 61.9 ns 11524151 + fmt::print (10.x) 63.8 ns 61.9 ns 11524151 fmt::print (11.0) 51.3 ns 51.0 ns 13846580 ``` @@ -94,7 +94,7 @@ compiled with Unicode enabled. - Added a formatter for `std::expected` - (https://github.com/fmtlib/fmt/pull/3834. Thanks @dominicpoeschko. + (https://github.com/fmtlib/fmt/pull/3834). Thanks @dominicpoeschko. - Added a formatter for `std::complex` (https://github.com/fmtlib/fmt/issues/1467, From f5bf6f778120278f19995e64a102243e38c10ee0 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 07:55:57 -0700 Subject: [PATCH 21/41] Update build script --- support/manage.py | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/support/manage.py b/support/manage.py index 7c80d6fba204d..8cc8651ce95b6 100755 --- a/support/manage.py +++ b/support/manage.py @@ -14,7 +14,6 @@ import datetime, docopt, errno, fileinput, json, os import re, requests, shutil, sys from contextlib import contextmanager -from distutils.version import LooseVersion from subprocess import check_call @@ -82,22 +81,6 @@ class Env: return env -@contextmanager -def rewrite(filename): - class Buffer: - pass - buffer = Buffer() - if not os.path.exists(filename): - buffer.data = '' - yield buffer - return - with open(filename) as f: - buffer.data = f.read() - yield buffer - with open(filename, 'w') as f: - f.write(buffer.data) - - fmt_repo_url = 'git@github.com:fmtlib/fmt' @@ -116,10 +99,6 @@ def update_site(env): if os.path.exists(html_dir): shutil.rmtree(html_dir) include_dir = env.fmt_repo.dir - if LooseVersion(version) >= LooseVersion('5.0.0'): - include_dir = os.path.join(include_dir, 'include', 'fmt') - elif LooseVersion(version) >= LooseVersion('3.0.0'): - include_dir = os.path.join(include_dir, 'fmt') import build build.build_docs(version, doc_dir=target_doc_dir, include_dir=include_dir, work_dir=env.build_dir) @@ -165,7 +144,7 @@ def release(args): if first_section[0] == '\n': first_section.pop(0) - # Workaround GitHub-flavored markdown treating newlines as
. + # Workaround GitHub-flavored Markdown treating newlines as
. changes = '' code_block = False stripped = False @@ -197,6 +176,7 @@ def release(args): run = Runner(fmt_repo.dir) run('cmake', '.') run('make', 'doc', 'package_source') + shutil.rmtree('build') # Create a release on GitHub. fmt_repo.push('origin', 'release') From e89568e6cba4e456f587206fb1ecb20cdb478745 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 07:56:35 -0700 Subject: [PATCH 22/41] Update vagrant config --- support/Vagrantfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/support/Vagrantfile b/support/Vagrantfile index 9680a1a184abb..9d0ff6a531024 100644 --- a/support/Vagrantfile +++ b/support/Vagrantfile @@ -3,10 +3,9 @@ # A vagrant config for testing against gcc-4.8. Vagrant.configure("2") do |config| - config.vm.box = "ubuntu/xenial64" - config.disksize.size = '15GB' + config.vm.box = "bento/ubuntu-22.04-arm64" - config.vm.provider "virtualbox" do |vb| + config.vm.provider "vmware_desktop" do |vb| vb.memory = "4096" end From 43c5b34749d338be15dac11d3039c0266097a28a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 08:23:25 -0700 Subject: [PATCH 23/41] Fix package build --- CMakeLists.txt | 3 +-- support/manage.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fbcd6a1527b9..4b50f8219834c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,8 +505,7 @@ if (FMT_MASTER_PROJECT AND EXISTS ${gitignore}) string(REPLACE "*" ".*" line "${line}") set(ignored_files ${ignored_files} "${line}$" "${line}/") endforeach () - set(ignored_files ${ignored_files} - /.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees) + set(ignored_files ${ignored_files} /.git /build) set(CPACK_SOURCE_GENERATOR ZIP) set(CPACK_SOURCE_IGNORE_FILES ${ignored_files}) diff --git a/support/manage.py b/support/manage.py index 8cc8651ce95b6..ae5252fc54c49 100755 --- a/support/manage.py +++ b/support/manage.py @@ -176,7 +176,6 @@ def release(args): run = Runner(fmt_repo.dir) run('cmake', '.') run('make', 'doc', 'package_source') - shutil.rmtree('build') # Create a release on GitHub. fmt_repo.push('origin', 'release') From d059fe42a87a45a5ca337fecbbcbe10b0bcf5ca5 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 08:33:37 -0700 Subject: [PATCH 24/41] Ignore vagrant files --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b50f8219834c..872bfb7daa539 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,7 +505,7 @@ if (FMT_MASTER_PROJECT AND EXISTS ${gitignore}) string(REPLACE "*" ".*" line "${line}") set(ignored_files ${ignored_files} "${line}$" "${line}/") endforeach () - set(ignored_files ${ignored_files} /.git /build) + set(ignored_files ${ignored_files} /.git /build .vagrant) set(CPACK_SOURCE_GENERATOR ZIP) set(CPACK_SOURCE_IGNORE_FILES ${ignored_files}) From 6f68c62cb5d1bbf661fbde28224f1067b6b27e41 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 08:42:34 -0700 Subject: [PATCH 25/41] Ignore doxygen files --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 872bfb7daa539..8a1f86bcabe9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,7 +505,7 @@ if (FMT_MASTER_PROJECT AND EXISTS ${gitignore}) string(REPLACE "*" ".*" line "${line}") set(ignored_files ${ignored_files} "${line}$" "${line}/") endforeach () - set(ignored_files ${ignored_files} /.git /build .vagrant) + set(ignored_files ${ignored_files} /.git /build/doxyxml .vagrant) set(CPACK_SOURCE_GENERATOR ZIP) set(CPACK_SOURCE_IGNORE_FILES ${ignored_files}) From 707bb5b369b998728980b9e781016a8427681c99 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 08:54:56 -0700 Subject: [PATCH 26/41] Fix grammar --- ChangeLog.md | 426 +++++++++++++++++++++++++-------------------------- 1 file changed, 213 insertions(+), 213 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index c06198ccc8c49..acf18456b9d52 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -40,17 +40,17 @@ https://github.com/fmtlib/fmt/pull/4013, https://github.com/fmtlib/fmt/pull/4027, https://github.com/fmtlib/fmt/pull/4029). In particular, native CMake support - for modules is now used if available. Thanks @yujincheng08 and @matt77hias. + for modules is now used if available. Thanks to @yujincheng08 and @matt77hias. - Added an option to replace standard includes with `import std` enabled via the `FMT_IMPORT_STD` macro (https://github.com/fmtlib/fmt/issues/3921, - https://github.com/fmtlib/fmt/pull/3928). Thanks @matt77hias. + https://github.com/fmtlib/fmt/pull/3928). Thanks to @matt77hias. - Exported `fmt::range_format`, `fmt::range_format_kind` and `fmt::compiled_string` from the `fmt` module (https://github.com/fmtlib/fmt/pull/3970, https://github.com/fmtlib/fmt/pull/3999). - Thanks @matt77hias and @yujincheng08. + Thanks to @matt77hias and @yujincheng08. - Improved integration with stdio in `fmt::print`, enabling direct writes into a C stream buffer in common cases. This may give significant @@ -72,7 +72,7 @@ fmt::print (11.0) 51.3 ns 51.0 ns 13846580 ``` -- Improved safety of `fmt::format_to` when writting to an array +- Improved safety of `fmt::format_to` when writing to an array (https://github.com/fmtlib/fmt/pull/3805). For example ([godbolt](https://www.godbolt.org/z/cYrn8dWY8)): @@ -81,9 +81,9 @@ auto result = fmt::format_to(volkswagen, "elephant"); ``` - no longer results in a buffer oveflow. Instead the output will be truncated + no longer results in a buffer overflow. Instead the output will be truncated and you can get the end iterator and whether truncation occurred from the - `result` object. Thanks @ThePhD. + `result` object. Thanks to @ThePhD. - Enabled Unicode support by default in MSVC, bringing it on par with other compilers and making it unnecessary for users to enable it explicitly. @@ -94,20 +94,20 @@ compiled with Unicode enabled. - Added a formatter for `std::expected` - (https://github.com/fmtlib/fmt/pull/3834). Thanks @dominicpoeschko. + (https://github.com/fmtlib/fmt/pull/3834). Thanks to @dominicpoeschko. - Added a formatter for `std::complex` (https://github.com/fmtlib/fmt/issues/1467, https://github.com/fmtlib/fmt/issues/3886, https://github.com/fmtlib/fmt/pull/3892, - https://github.com/fmtlib/fmt/pull/3900). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3900). Thanks to @phprus. - Added a formatter for `std::type_info` - (https://github.com/fmtlib/fmt/pull/3978). Thanks @matt77hias. + (https://github.com/fmtlib/fmt/pull/3978). Thanks to @matt77hias. - Specialized `formatter` for `std::basic_string` types with custom traits and allocators (https://github.com/fmtlib/fmt/issues/3938, - https://github.com/fmtlib/fmt/pull/3943). Thanks @dieram3. + https://github.com/fmtlib/fmt/pull/3943). Thanks to @dieram3. - Added formatters for `std::chrono::day`, `std::chrono::month`, `std::chrono::year` and `std::chrono::year_month_day` @@ -129,55 +129,55 @@ image - Thanks @zivshek. + Thanks to @zivshek. - Fixed handling of precision in `%S` (https://github.com/fmtlib/fmt/issues/3794, - https://github.com/fmtlib/fmt/pull/3814). Thanks @js324. + https://github.com/fmtlib/fmt/pull/3814). Thanks to @js324. - Added support for the `-` specifier (glibc `strftime` extension) to day of the month (`%d`) and week of the year (`%W`, `%U`, `%V`) specifiers - (https://github.com/fmtlib/fmt/pull/3976). Thanks @ZaheenJ. + (https://github.com/fmtlib/fmt/pull/3976). Thanks to @ZaheenJ. - Fixed the scope of the `-` extension in chrono formatting so that it doesn't apply to subsequent specifiers (https://github.com/fmtlib/fmt/issues/3811, - https://github.com/fmtlib/fmt/pull/3812). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3812). Thanks to @phprus. - Improved handling of `time_point::min()` (https://github.com/fmtlib/fmt/issues/3282). - Added support for character range formatting (https://github.com/fmtlib/fmt/issues/3857, - https://github.com/fmtlib/fmt/pull/3863). Thanks @js324. + https://github.com/fmtlib/fmt/pull/3863). Thanks to @js324. - Added `string` and `debug_string` range formatters (https://github.com/fmtlib/fmt/pull/3973, - https://github.com/fmtlib/fmt/pull/4024). Thanks @matt77hias. + https://github.com/fmtlib/fmt/pull/4024). Thanks to @matt77hias. - Enabled ADL for `begin` and `end` in `fmt::join` (https://github.com/fmtlib/fmt/issues/3813, - https://github.com/fmtlib/fmt/pull/3824). Thanks @bbolli. + https://github.com/fmtlib/fmt/pull/3824). Thanks to @bbolli. - Made contiguous iterator optimizations apply to `std::basic_string` iterators - (https://github.com/fmtlib/fmt/pull/3798). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/3798). Thanks to @phprus. - Added support for ranges with mutable `begin` and `end` (https://github.com/fmtlib/fmt/issues/3752, https://github.com/fmtlib/fmt/pull/3800, - https://github.com/fmtlib/fmt/pull/3955). Thanks @tcbrindle and @Arghnews. + https://github.com/fmtlib/fmt/pull/3955). Thanks to @tcbrindle and @Arghnews. - Added support for move-only iterators to `fmt::join` (https://github.com/fmtlib/fmt/issues/3802, - https://github.com/fmtlib/fmt/pull/3946). Thanks @Arghnews. + https://github.com/fmtlib/fmt/pull/3946). Thanks to @Arghnews. - Moved range and iterator overloads of `fmt::join` to `fmt/ranges.h`, next to other overloads. -- Fixed hanling of types with `begin` returning `void` such as Eigen matrices +- Fixed handling of types with `begin` returning `void` such as Eigen matrices (https://github.com/fmtlib/fmt/issues/3839, - https://github.com/fmtlib/fmt/pull/3964). Thanks @Arghnews. + https://github.com/fmtlib/fmt/pull/3964). Thanks to @Arghnews. - Added an `fmt::formattable` concept (https://github.com/fmtlib/fmt/pull/3974). - Thanks @matt77hias. + Thanks to @matt77hias. - Added support for `__float128` (https://github.com/fmtlib/fmt/issues/3494). @@ -186,10 +186,10 @@ - Made `fmt::isnan` not trigger floating-point exception for NaN values (https://github.com/fmtlib/fmt/issues/3948, - https://github.com/fmtlib/fmt/pull/3951). Thanks @alexdewar. + https://github.com/fmtlib/fmt/pull/3951). Thanks to @alexdewar. - Removed dependency on `` for `std::allocator_traits` when possible - (https://github.com/fmtlib/fmt/pull/3804). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/3804). Thanks to @phprus. - Enabled compile-time checks in formatting functions that take text colors and styles. @@ -199,10 +199,10 @@ - Made format string compilation work with clang 12 and later despite only partial non-type template parameter support (https://github.com/fmtlib/fmt/issues/4000, - https://github.com/fmtlib/fmt/pull/4001). Thanks @yujincheng08. + https://github.com/fmtlib/fmt/pull/4001). Thanks to @yujincheng08. - Made `fmt::iterator_buffer`'s move constructor `noexcept` - (https://github.com/fmtlib/fmt/pull/3808). Thanks @waywardmonkeys. + (https://github.com/fmtlib/fmt/pull/3808). Thanks to @waywardmonkeys. - Started enforcing that `formatter::format` is const for compatibility with `std::format` (https://github.com/fmtlib/fmt/issues/3447). @@ -211,28 +211,28 @@ - Made `fmt::basic_string_view` not constructible from `nullptr` for consistency with `std::string_view` in C++23 - (https://github.com/fmtlib/fmt/pull/3846). Thanks @dalle. + (https://github.com/fmtlib/fmt/pull/3846). Thanks to @dalle. - Fixed `fmt::group_digits` for negative integers (https://github.com/fmtlib/fmt/issues/3891, - https://github.com/fmtlib/fmt/pull/3901). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3901). Thanks to @phprus. - Fixed handling of negative ids in `fmt::basic_format_args::get` - (https://github.com/fmtlib/fmt/pull/3945). Thanks @marlenecota. + (https://github.com/fmtlib/fmt/pull/3945). Thanks to @marlenecota. - Improved named argument validation (https://github.com/fmtlib/fmt/issues/3817). -- Disabled copy contruction/assignment for `fmt::format_arg_store` and +- Disabled copy construction/assignment for `fmt::format_arg_store` and fixed moved construction (https://github.com/fmtlib/fmt/pull/3833). - Thanks @ivafanas. + Thanks to @ivafanas. - Worked around a locale issue in RHEL/devtoolset (https://github.com/fmtlib/fmt/issues/3858, - https://github.com/fmtlib/fmt/pull/3859). Thanks @g199209. + https://github.com/fmtlib/fmt/pull/3859). Thanks to @g199209. - Added RTTI detection for MSVC (https://github.com/fmtlib/fmt/pull/3821, - https://github.com/fmtlib/fmt/pull/3963). Thanks @edo9300. + https://github.com/fmtlib/fmt/pull/3963). Thanks to @edo9300. - Migrated the documentation from Sphinx to MkDocs. @@ -252,7 +252,7 @@ https://github.com/fmtlib/fmt/pull/3905, https://github.com/fmtlib/fmt/issues/3942, https://github.com/fmtlib/fmt/pull/4008). - Thanks @zencatalyst, WolleTD, @tupaschoal, @Dobiasd, @frank-weinberg, @bbolli, + Thanks to @zencatalyst, WolleTD, @tupaschoal, @Dobiasd, @frank-weinberg, @bbolli, @phprus, @waywardmonkeys, @js324 and @tchaikov. - Improved CI and tests @@ -265,23 +265,23 @@ https://github.com/fmtlib/fmt/pull/4010, https://github.com/fmtlib/fmt/pull/4012, https://github.com/fmtlib/fmt/pull/4038). - Thanks @vgorrX, @waywardmonkeys, @tchaikov and @phprus. + Thanks to @vgorrX, @waywardmonkeys, @tchaikov and @phprus. - Fixed buffer overflow when using format string compilation with debug format and `std::back_insert_iterator` (https://github.com/fmtlib/fmt/issues/3795, - https://github.com/fmtlib/fmt/pull/3797). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3797). Thanks to @phprus. - Improved Bazel support (https://github.com/fmtlib/fmt/pull/3792, https://github.com/fmtlib/fmt/pull/3801, https://github.com/fmtlib/fmt/pull/3962, - https://github.com/fmtlib/fmt/pull/3965). Thanks @Vertexwahn. + https://github.com/fmtlib/fmt/pull/3965). Thanks to @Vertexwahn. - Improved/fixed the CMake config (https://github.com/fmtlib/fmt/issues/3777, https://github.com/fmtlib/fmt/pull/3783, https://github.com/fmtlib/fmt/issues/3847, - https://github.com/fmtlib/fmt/pull/3907). Thanks @phprus and @xTachyon. + https://github.com/fmtlib/fmt/pull/3907). Thanks to @phprus and @xTachyon. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/3685, @@ -323,7 +323,7 @@ https://github.com/fmtlib/fmt/pull/3995, https://github.com/fmtlib/fmt/pull/4009, https://github.com/fmtlib/fmt/pull/4023). - Thanks @hmbj, @phprus, @res2k, @Baardi, @matt77hias, @waywardmonkeys, @hmbj, + Thanks to @hmbj, @phprus, @res2k, @Baardi, @matt77hias, @waywardmonkeys, @hmbj, @yakra, @prlw1, @Arghnews, @mtillmann0, @ShifftC, @eepp, @jimmy-park and @ChristianGebhardt. @@ -331,13 +331,13 @@ - Fixed ABI compatibility with earlier 10.x versions (https://github.com/fmtlib/fmt/issues/3785, - https://github.com/fmtlib/fmt/pull/3786). Thanks @saraedum. + https://github.com/fmtlib/fmt/pull/3786). Thanks to @saraedum. # 10.2.0 - 2024-01-01 - Added support for the `%j` specifier (the number of days) for `std::chrono::duration` (https://github.com/fmtlib/fmt/issues/3643, - https://github.com/fmtlib/fmt/pull/3732). Thanks @intelfx. + https://github.com/fmtlib/fmt/pull/3732). Thanks to @intelfx. - Added support for the chrono suffix for days and changed the suffix for minutes from "m" to the correct "min" @@ -353,11 +353,11 @@ } ``` - Thanks @Richardk2n. + Thanks to @Richardk2n. - Fixed an overflow in `std::chrono::time_point` formatting with large dates (https://github.com/fmtlib/fmt/issues/3725, - https://github.com/fmtlib/fmt/pull/3727). Thanks @cschreib. + https://github.com/fmtlib/fmt/pull/3727). Thanks to @cschreib. - Added a formatter for `std::source_location` (https://github.com/fmtlib/fmt/pull/3730). @@ -378,7 +378,7 @@ /app/example.cpp:5:51: int main() ``` - Thanks @felix642. + Thanks to @felix642. - Added a formatter for `std::bitset` (https://github.com/fmtlib/fmt/pull/3660). @@ -393,7 +393,7 @@ } ``` - Thanks @muggenhor. + Thanks to @muggenhor. - Added an experimental `nested_formatter` that provides an easy way of applying a formatter to one or more subobjects while automatically handling @@ -441,10 +441,10 @@ prints `"C:/foo"` on Windows. - Thanks @js324. + Thanks to @js324. - Made `format_as` work with references - (https://github.com/fmtlib/fmt/pull/3739). Thanks @tchaikov. + (https://github.com/fmtlib/fmt/pull/3739). Thanks to @tchaikov. - Fixed formatting of invalid UTF-8 with precision (https://github.com/fmtlib/fmt/issues/3284). @@ -467,7 +467,7 @@ - Disallowed the `c` specifier for `bool` (https://github.com/fmtlib/fmt/issues/3726, - https://github.com/fmtlib/fmt/pull/3734). Thanks @js324. + https://github.com/fmtlib/fmt/pull/3734). Thanks to @js324. - Made the default formatting unlocalized in `fmt::ostream_formatter` for consistency with the rest of the library @@ -475,7 +475,7 @@ - Fixed localized formatting in bases other than decimal (https://github.com/fmtlib/fmt/issues/3693, - https://github.com/fmtlib/fmt/pull/3750). Thanks @js324. + https://github.com/fmtlib/fmt/pull/3750). Thanks to @js324. - Fixed a performance regression in experimental `fmt::ostream::print` (https://github.com/fmtlib/fmt/issues/3674). @@ -485,32 +485,32 @@ (https://github.com/fmtlib/fmt/pull/3668, https://github.com/fmtlib/fmt/issues/3688, https://github.com/fmtlib/fmt/pull/3689). - Thanks @Roman-Koshelev and @dimztimz. + Thanks to @Roman-Koshelev and @dimztimz. - Changed to only export `format_error` when {fmt} is built as a shared library (https://github.com/fmtlib/fmt/issues/3626, - https://github.com/fmtlib/fmt/pull/3627). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3627). Thanks to @phprus. - Made `fmt::streamed` `constexpr`. - (https://github.com/fmtlib/fmt/pull/3650). Thanks @muggenhor. + (https://github.com/fmtlib/fmt/pull/3650). Thanks to @muggenhor. - Made `fmt::format_int` `constexpr` (https://github.com/fmtlib/fmt/issues/4031, - https://github.com/fmtlib/fmt/pull/4032). Thanks @dixlorenz. + https://github.com/fmtlib/fmt/pull/4032). Thanks to @dixlorenz. - Enabled `consteval` on older versions of MSVC - (https://github.com/fmtlib/fmt/pull/3757). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/3757). Thanks to @phprus. - Added an option to build without `wchar_t` support on Windows (https://github.com/fmtlib/fmt/issues/3631, - https://github.com/fmtlib/fmt/pull/3636). Thanks @glebm. + https://github.com/fmtlib/fmt/pull/3636). Thanks to @glebm. - Improved build and CI configuration (https://github.com/fmtlib/fmt/pull/3679, https://github.com/fmtlib/fmt/issues/3701, https://github.com/fmtlib/fmt/pull/3702, https://github.com/fmtlib/fmt/pull/3749). - Thanks @jcar87, @pklima and @tchaikov. + Thanks to @jcar87, @pklima and @tchaikov. - Fixed various warnings, compilation and test issues (https://github.com/fmtlib/fmt/issues/3607, @@ -553,7 +553,7 @@ https://github.com/fmtlib/fmt/pull/3764, https://github.com/fmtlib/fmt/issues/3774, https://github.com/fmtlib/fmt/pull/3779). - Thanks @danakj, @vinayyadav3016, @cyyever, @phprus, @qimiko, @saschasc, + Thanks to @danakj, @vinayyadav3016, @cyyever, @phprus, @qimiko, @saschasc, @gsjaardema, @lazka, @Zhaojun-Liu, @carlsmedstad, @hotwatermorning, @cptFracassa, @kuguma, @PeterJohnson, @H1X4Dev, @asantoni, @eltociear, @msimberg, @tchaikov, @waywardmonkeys. @@ -570,7 +570,7 @@ https://github.com/fmtlib/fmt/pull/3737, https://github.com/fmtlib/fmt/issues/3742, https://github.com/fmtlib/fmt/pull/3744). - Thanks @idzm, @perlun, @joycebrum, @fennewald, @reinhardt1053, @GeorgeLS. + Thanks to @idzm, @perlun, @joycebrum, @fennewald, @reinhardt1053, @GeorgeLS. - Updated CI dependencies (https://github.com/fmtlib/fmt/pull/3615, @@ -587,7 +587,7 @@ - Added formatters for `std::atomic` and `atomic_flag` (https://github.com/fmtlib/fmt/pull/3574, https://github.com/fmtlib/fmt/pull/3594). - Thanks @wangzw and @AlexGuteniev. + Thanks to @wangzw and @AlexGuteniev. - Fixed an error about partial specialization of `formatter` after instantiation when compiled with gcc and C++20 (https://github.com/fmtlib/fmt/issues/3584). @@ -595,20 +595,20 @@ (https://github.com/fmtlib/fmt/issues/3587, https://github.com/fmtlib/fmt/pull/3597, https://github.com/fmtlib/fmt/pull/3605). - Thanks @MathewBensonCode. + Thanks to @MathewBensonCode. - Made `fmt::to_string` work with types that have `format_as` - overloads (https://github.com/fmtlib/fmt/pull/3575). Thanks @phprus. + overloads (https://github.com/fmtlib/fmt/pull/3575). Thanks to @phprus. - Made `formatted_size` work with integral format specifiers at compile time (https://github.com/fmtlib/fmt/pull/3591). - Thanks @elbeno. + Thanks to @elbeno. - Fixed a warning about the `no_unique_address` attribute on clang-cl - (https://github.com/fmtlib/fmt/pull/3599). Thanks @lukester1975. + (https://github.com/fmtlib/fmt/pull/3599). Thanks to @lukester1975. - Improved compatibility with the legacy GBK encoding (https://github.com/fmtlib/fmt/issues/3598, - https://github.com/fmtlib/fmt/pull/3599). Thanks @YuHuanTin. + https://github.com/fmtlib/fmt/pull/3599). Thanks to @YuHuanTin. - Added OpenSSF Scorecard analysis (https://github.com/fmtlib/fmt/issues/3530, - https://github.com/fmtlib/fmt/pull/3571). Thanks @joycebrum. + https://github.com/fmtlib/fmt/pull/3571). Thanks to @joycebrum. - Updated CI dependencies (https://github.com/fmtlib/fmt/pull/3591, https://github.com/fmtlib/fmt/pull/3592, @@ -640,7 +640,7 @@ BM_format_to_n 133 ns 133 ns 5257795 - Optimized storage of an empty allocator in `basic_memory_buffer` - (https://github.com/fmtlib/fmt/pull/3485). Thanks @Minty-Meeo. + (https://github.com/fmtlib/fmt/pull/3485). Thanks to @Minty-Meeo. - Added formatters for proxy references to elements of `std::vector` and `std::bitset` @@ -658,19 +658,19 @@ } ``` - Thanks @phprus and @felix642. + Thanks to @phprus and @felix642. - Fixed an ambiguous formatter specialization for containers that look like container adaptors such as `boost::flat_set` (https://github.com/fmtlib/fmt/issues/3556, - https://github.com/fmtlib/fmt/pull/3561). Thanks @5chmidti. + https://github.com/fmtlib/fmt/pull/3561). Thanks to @5chmidti. - Fixed compilation when formatting durations not convertible from `std::chrono::seconds` - (https://github.com/fmtlib/fmt/pull/3430). Thanks @patlkli. + (https://github.com/fmtlib/fmt/pull/3430). Thanks to @patlkli. - Made the `formatter` specialization for `char*` const-correct - (https://github.com/fmtlib/fmt/pull/3432). Thanks @timsong-cpp. + (https://github.com/fmtlib/fmt/pull/3432). Thanks to @timsong-cpp. - Made `{}` and `{:}` handled consistently during compile-time checks (https://github.com/fmtlib/fmt/issues/3526). @@ -679,12 +679,12 @@ safety by preventing dangling references. - Improved the compile-time error for unformattable types - (https://github.com/fmtlib/fmt/pull/3478). Thanks @BRevzin. + (https://github.com/fmtlib/fmt/pull/3478). Thanks to @BRevzin. - Improved the floating-point formatter (https://github.com/fmtlib/fmt/pull/3448, https://github.com/fmtlib/fmt/pull/3450). - Thanks @florimond-collette. + Thanks to @florimond-collette. - Fixed handling of precision for `long double` larger than 64 bits. (https://github.com/fmtlib/fmt/issues/3539, @@ -693,23 +693,23 @@ - Made floating-point and chrono tests less platform-dependent (https://github.com/fmtlib/fmt/issues/3337, https://github.com/fmtlib/fmt/issues/3433, - https://github.com/fmtlib/fmt/pull/3434). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3434). Thanks to @phprus. - Removed the remnants of the Grisu floating-point formatter that has been replaced by Dragonbox in earlier versions. - Added `throw_format_error` to the public API - (https://github.com/fmtlib/fmt/pull/3551). Thanks @mjerabek. + (https://github.com/fmtlib/fmt/pull/3551). Thanks to @mjerabek. - Made `FMT_THROW` assert even if assertions are disabled when compiling with exceptions disabled (https://github.com/fmtlib/fmt/issues/3418, - https://github.com/fmtlib/fmt/pull/3439). Thanks @BRevzin. + https://github.com/fmtlib/fmt/pull/3439). Thanks to @BRevzin. - Made `format_as` and `std::filesystem::path` formatter work with exotic code unit types. (https://github.com/fmtlib/fmt/pull/3457, - https://github.com/fmtlib/fmt/pull/3476). Thanks @gix and @hmbj. + https://github.com/fmtlib/fmt/pull/3476). Thanks to @gix and @hmbj. - Added support for the `?` format specifier to `std::filesystem::path` and made the default unescaped for @@ -720,10 +720,10 @@ - Removed unused `basic_printf_parse_context`. - Improved RTTI detection used when formatting exceptions - (https://github.com/fmtlib/fmt/pull/3468). Thanks @danakj. + (https://github.com/fmtlib/fmt/pull/3468). Thanks to @danakj. - Improved compatibility with VxWorks7 - (https://github.com/fmtlib/fmt/pull/3467). Thanks @wenshan1. + (https://github.com/fmtlib/fmt/pull/3467). Thanks to @wenshan1. - Improved documentation (https://github.com/fmtlib/fmt/issues/3174, @@ -733,7 +733,7 @@ https://github.com/fmtlib/fmt/pull/3461, https://github.com/fmtlib/fmt/issues/3487, https://github.com/fmtlib/fmt/pull/3515). - Thanks @zencatalyst, @rlalik and @mikecrowe. + Thanks to @zencatalyst, @rlalik and @mikecrowe. - Improved build and CI configurations (https://github.com/fmtlib/fmt/issues/3449, @@ -748,7 +748,7 @@ https://github.com/fmtlib/fmt/issues/3517, https://github.com/fmtlib/fmt/pull/3523, https://github.com/fmtlib/fmt/pull/3563). - Thanks @joycebrum, @glebm, @phprus, @petrmanek, @setoye and @abouvier. + Thanks to @joycebrum, @glebm, @phprus, @petrmanek, @setoye and @abouvier. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/3408, @@ -770,7 +770,7 @@ https://github.com/fmtlib/fmt/pull/3549, https://github.com/fmtlib/fmt/pull/3550, https://github.com/fmtlib/fmt/pull/3552). - Thanks @adesitter, @hmbj, @Minty-Meeo, @phprus, @TobiSchluter, + Thanks to @adesitter, @hmbj, @Minty-Meeo, @phprus, @TobiSchluter, @kieranclancy, @alexeedm, @jurihock, @Ozomahtli and @razaqq. # 10.0.0 - 2023-05-09 @@ -790,16 +790,16 @@ to 1 - Blue: old algorithm - Thanks @jk-jeon. + Thanks to @jk-jeon. - Replaced `snprintf`-based hex float formatter with an internal implementation (https://github.com/fmtlib/fmt/pull/3179, https://github.com/fmtlib/fmt/pull/3203). This removes the - last usage of `s(n)printf` in {fmt}. Thanks @phprus. + last usage of `s(n)printf` in {fmt}. Thanks to @phprus. - Fixed alignment of floating-point numbers with localization (https://github.com/fmtlib/fmt/issues/3263, - https://github.com/fmtlib/fmt/pull/3272). Thanks @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3272). Thanks to @ShawnZhong. - Made handling of `#` consistent with `std::format`. @@ -813,7 +813,7 @@ https://github.com/fmtlib/fmt/pull/3397, https://github.com/fmtlib/fmt/pull/3399, https://github.com/fmtlib/fmt/pull/3400). - Thanks @laitingsheng, @Orvid and @DanielaE. + Thanks to @laitingsheng, @Orvid and @DanielaE. - Switched to the [modules CMake library](https://github.com/vitaut/modules) which allows building {fmt} as a C++20 module with clang: @@ -857,7 +857,7 @@ } ``` - Thanks @ShawnZhong. + Thanks to @ShawnZhong. - Implemented formatting of subseconds (https://github.com/fmtlib/fmt/issues/2207, @@ -877,27 +877,27 @@ } ``` - Thanks @patrickroocks @phprus and @BRevzin. + Thanks to @patrickroocks @phprus and @BRevzin. - Added precision support to `%S` - (https://github.com/fmtlib/fmt/pull/3148). Thanks @SappyJoy + (https://github.com/fmtlib/fmt/pull/3148). Thanks to @SappyJoy - Added support for `std::utc_time` (https://github.com/fmtlib/fmt/issues/3098, - https://github.com/fmtlib/fmt/pull/3110). Thanks @patrickroocks. + https://github.com/fmtlib/fmt/pull/3110). Thanks to @patrickroocks. - Switched formatting of `std::chrono::system_clock` from local time to UTC for compatibility with the standard (https://github.com/fmtlib/fmt/issues/3199, - https://github.com/fmtlib/fmt/pull/3230). Thanks @ned14. + https://github.com/fmtlib/fmt/pull/3230). Thanks to @ned14. - Added support for `%Ez` and `%Oz` to chrono formatters. (https://github.com/fmtlib/fmt/issues/3220, - https://github.com/fmtlib/fmt/pull/3222). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3222). Thanks to @phprus. - Improved validation of format specifiers for `std::chrono::duration` (https://github.com/fmtlib/fmt/issues/3219, - https://github.com/fmtlib/fmt/pull/3232). Thanks @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3232). Thanks to @ShawnZhong. - Fixed formatting of time points before the epoch (https://github.com/fmtlib/fmt/issues/3117, @@ -914,12 +914,12 @@ } ``` - Thanks @ShawnZhong. + Thanks to @ShawnZhong. - Experimental: implemented glibc extension for padding seconds, minutes and hours (https://github.com/fmtlib/fmt/issues/2959, - https://github.com/fmtlib/fmt/pull/3271). Thanks @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3271). Thanks to @ShawnZhong. - Added a formatter for `std::exception` (https://github.com/fmtlib/fmt/issues/2977, @@ -946,10 +946,10 @@ vector::_M_range_check: __n (which is 0) >= this->size() (which is 0) - on libstdc++. Thanks @zach2good and @phprus. + on libstdc++. Thanks to @zach2good and @phprus. - Moved `std::error_code` formatter from `fmt/os.h` to `fmt/std.h`. - (https://github.com/fmtlib/fmt/pull/3125). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/3125). Thanks to @phprus. - Added formatters for standard container adapters: `std::priority_queue`, `std::queue` and `std::stack` @@ -969,48 +969,48 @@ } ``` - Thanks @ShawnZhong. + Thanks to @ShawnZhong. - Added a formatter for `std::optional` to `fmt/std.h` (https://github.com/fmtlib/fmt/issues/1367, https://github.com/fmtlib/fmt/pull/3303). - Thanks @tom-huntington. + Thanks to @tom-huntington. - Fixed formatting of valueless by exception variants - (https://github.com/fmtlib/fmt/pull/3347). Thanks @TheOmegaCarrot. + (https://github.com/fmtlib/fmt/pull/3347). Thanks to @TheOmegaCarrot. - Made `fmt::ptr` accept `unique_ptr` with a custom deleter - (https://github.com/fmtlib/fmt/pull/3177). Thanks @hmbj. + (https://github.com/fmtlib/fmt/pull/3177). Thanks to @hmbj. - Fixed formatting of noncopyable ranges and nested ranges of chars (https://github.com/fmtlib/fmt/pull/3158 https://github.com/fmtlib/fmt/issues/3286, - https://github.com/fmtlib/fmt/pull/3290). Thanks @BRevzin. + https://github.com/fmtlib/fmt/pull/3290). Thanks to @BRevzin. - Fixed issues with formatting of paths and ranges of paths (https://github.com/fmtlib/fmt/issues/3319, https://github.com/fmtlib/fmt/pull/3321 - https://github.com/fmtlib/fmt/issues/3322). Thanks @phprus. + https://github.com/fmtlib/fmt/issues/3322). Thanks to @phprus. - Improved handling of invalid Unicode in paths. - Enabled compile-time checks on Apple clang 14 and later - (https://github.com/fmtlib/fmt/pull/3331). Thanks @cloyce. + (https://github.com/fmtlib/fmt/pull/3331). Thanks to @cloyce. - Improved compile-time checks of named arguments (https://github.com/fmtlib/fmt/issues/3105, - https://github.com/fmtlib/fmt/pull/3214). Thanks @rbrich. + https://github.com/fmtlib/fmt/pull/3214). Thanks to @rbrich. - Fixed formatting when both alignment and `0` are given (https://github.com/fmtlib/fmt/issues/3236, - https://github.com/fmtlib/fmt/pull/3248). Thanks @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3248). Thanks to @ShawnZhong. - Improved Unicode support in the experimental file API on Windows (https://github.com/fmtlib/fmt/issues/3234, - https://github.com/fmtlib/fmt/pull/3293). Thanks @Fros1er. + https://github.com/fmtlib/fmt/pull/3293). Thanks to @Fros1er. - Unified UTF transcoding - (https://github.com/fmtlib/fmt/pull/3416). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/3416). Thanks to @phprus. - Added support for UTF-8 digit separators via an experimental locale facet (https://github.com/fmtlib/fmt/issues/1861). For @@ -1026,24 +1026,24 @@ - Added an overload of `formatted_size` that takes a locale (https://github.com/fmtlib/fmt/issues/3084, - https://github.com/fmtlib/fmt/pull/3087). Thanks @gerboengels. + https://github.com/fmtlib/fmt/pull/3087). Thanks to @gerboengels. - Removed the deprecated `FMT_DEPRECATED_OSTREAM`. - Fixed a UB when using a null `std::string_view` with `fmt::to_string` or format string compilation (https://github.com/fmtlib/fmt/issues/3241, - https://github.com/fmtlib/fmt/pull/3244). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3244). Thanks to @phprus. - Added `starts_with` to the fallback `string_view` implementation - (https://github.com/fmtlib/fmt/pull/3080). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/3080). Thanks to @phprus. - Added `fmt::basic_format_string::get()` for compatibility with `basic_format_string` - (https://github.com/fmtlib/fmt/pull/3111). Thanks @huangqinjin. + (https://github.com/fmtlib/fmt/pull/3111). Thanks to @huangqinjin. - Added `println` for compatibility with C++23 - (https://github.com/fmtlib/fmt/pull/3267). Thanks @ShawnZhong. + (https://github.com/fmtlib/fmt/pull/3267). Thanks to @ShawnZhong. - Renamed the `FMT_EXPORT` macro for shared library usage to `FMT_LIB_EXPORT`. @@ -1054,7 +1054,7 @@ https://github.com/fmtlib/fmt/pull/3243). https://github.com/fmtlib/fmt/pull/3404, https://github.com/fmtlib/fmt/pull/4002). - Thanks @Cleroth, @Vertexwahn and @yujincheng08. + Thanks to @Cleroth, @Vertexwahn and @yujincheng08. - Improved build configuration and tests (https://github.com/fmtlib/fmt/pull/3118, @@ -1079,17 +1079,17 @@ https://github.com/fmtlib/fmt/pull/3395, https://github.com/fmtlib/fmt/pull/3406, https://github.com/fmtlib/fmt/pull/3411). - Thanks @dimztimz, @phprus, @DavidKorczynski, @ChrisThrasher, + Thanks to @dimztimz, @phprus, @DavidKorczynski, @ChrisThrasher, @FrancoisCarouge, @kennyweiss, @luzpaz, @codeinred, @Mixaill, @joycebrum, @kevinhwang and @Vertexwahn. - Fixed a regression in handling empty format specifiers after a colon - (`{:}`) (https://github.com/fmtlib/fmt/pull/3086). Thanks @oxidase. + (`{:}`) (https://github.com/fmtlib/fmt/pull/3086). Thanks to @oxidase. - Worked around a broken implementation of `std::is_constant_evaluated` in some versions of libstdc++ on clang (https://github.com/fmtlib/fmt/issues/3247, - https://github.com/fmtlib/fmt/pull/3281). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/3281). Thanks to @phprus. - Fixed formatting of volatile variables (https://github.com/fmtlib/fmt/pull/3068). @@ -1152,7 +1152,7 @@ https://github.com/fmtlib/fmt/pull/3398, https://github.com/fmtlib/fmt/pull/3413, https://github.com/fmtlib/fmt/issues/3415). - Thanks @phprus, @gsjaardema, @NewbieOrange, @EngineLessCC, @asmaloney, + Thanks to @phprus, @gsjaardema, @NewbieOrange, @EngineLessCC, @asmaloney, @HazardyKnusperkeks, @sergiud, @Youw, @thesmurph, @czudziakm, @Roman-Koshelev, @chronoxor, @ShawnZhong, @russelltg, @glebm, @tmartin-gh, @Zhaojun-Liu, @louiswins and @mogemimi. @@ -1173,25 +1173,25 @@ } ``` - Thanks @marksantaniello. + Thanks to @marksantaniello. - Fixed handling of invalid UTF-8 (https://github.com/fmtlib/fmt/pull/3038, https://github.com/fmtlib/fmt/pull/3044, https://github.com/fmtlib/fmt/pull/3056). - Thanks @phprus and @skeeto. + Thanks to @phprus and @skeeto. - Improved Unicode support in `ostream` overloads of `print` (https://github.com/fmtlib/fmt/pull/2994, https://github.com/fmtlib/fmt/pull/3001, - https://github.com/fmtlib/fmt/pull/3025). Thanks @dimztimz. + https://github.com/fmtlib/fmt/pull/3025). Thanks to @dimztimz. - Fixed handling of the sign specifier in localized formatting on systems with 32-bit `wchar_t` (https://github.com/fmtlib/fmt/issues/3041). - Added support for wide streams to `fmt::streamed` - (https://github.com/fmtlib/fmt/pull/2994). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/2994). Thanks to @phprus. - Added the `n` specifier that disables the output of delimiters when formatting ranges (https://github.com/fmtlib/fmt/pull/2981, @@ -1208,15 +1208,15 @@ } ``` - Thanks @BRevzin. + Thanks to @BRevzin. - Worked around problematic `std::string_view` constructors introduced in C++23 (https://github.com/fmtlib/fmt/issues/3030, - https://github.com/fmtlib/fmt/issues/3050). Thanks @strega-nil-ms. + https://github.com/fmtlib/fmt/issues/3050). Thanks to @strega-nil-ms. - Improve handling (exclusion) of recursive ranges (https://github.com/fmtlib/fmt/issues/2968, - https://github.com/fmtlib/fmt/pull/2974). Thanks @Dani-Hub. + https://github.com/fmtlib/fmt/pull/2974). Thanks to @Dani-Hub. - Improved error reporting in format string compilation (https://github.com/fmtlib/fmt/issues/3055). @@ -1224,19 +1224,19 @@ - Improved the implementation of [Dragonbox](https://github.com/jk-jeon/dragonbox), the algorithm used for the default floating-point formatting - (https://github.com/fmtlib/fmt/pull/2984). Thanks @jk-jeon. + (https://github.com/fmtlib/fmt/pull/2984). Thanks to @jk-jeon. - Fixed issues with floating-point formatting on exotic platforms. - Improved the implementation of chrono formatting - (https://github.com/fmtlib/fmt/pull/3010). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/3010). Thanks to @phprus. - Improved documentation (https://github.com/fmtlib/fmt/pull/2966, https://github.com/fmtlib/fmt/pull/3009, https://github.com/fmtlib/fmt/issues/3020, https://github.com/fmtlib/fmt/pull/3037). - Thanks @mwinterb, @jcelerier and @remiburtin. + Thanks to @mwinterb, @jcelerier and @remiburtin. - Improved build configuration (https://github.com/fmtlib/fmt/pull/2991, @@ -1244,7 +1244,7 @@ https://github.com/fmtlib/fmt/issues/3004, https://github.com/fmtlib/fmt/pull/3007, https://github.com/fmtlib/fmt/pull/3040). - Thanks @dimztimz and @hwhsu1231. + Thanks to @dimztimz and @hwhsu1231. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/2969, @@ -1266,7 +1266,7 @@ https://github.com/fmtlib/fmt/issues/3052, https://github.com/fmtlib/fmt/pull/3053, https://github.com/fmtlib/fmt/pull/3054). - Thanks @h-friederich, @dimztimz, @olupton, @bernhardmgruber and @phprus. + Thanks to @h-friederich, @dimztimz, @olupton, @bernhardmgruber and @phprus. # 9.0.0 - 2022-07-04 @@ -1298,7 +1298,7 @@ [Dragonbox](https://github.com/jk-jeon/dragonbox), the algorithm used for the default floating-point formatting (https://github.com/fmtlib/fmt/pull/2713, - https://github.com/fmtlib/fmt/pull/2750). Thanks @jk-jeon. + https://github.com/fmtlib/fmt/pull/2750). Thanks to @jk-jeon. - Made `fmt::to_string` work with `__float128`. This uses the internal FP formatter and works even on system without `__float128` support @@ -1374,7 +1374,7 @@ variant(42) - Thanks @jehelset. + Thanks to @jehelset. - Added experimental `std::filesystem::path` formatting support (https://github.com/fmtlib/fmt/issues/2865, @@ -1396,7 +1396,7 @@ There is no place like "/home". - Thanks @phprus. + Thanks to @phprus. - Added a `std::thread::id` formatter to `fmt/std.h`. For example ([godbolt](https://godbolt.org/z/j1azbYf3E)): @@ -1432,11 +1432,11 @@ ![](https://user-images.githubusercontent.com/576385/175071215-12809244-dab0-4005-96d8-7cd911c964d5.png) - Thanks @rbrugo. + Thanks to @rbrugo. - Made `fmt::print` overload for text styles correctly handle UTF-8 (https://github.com/fmtlib/fmt/issues/2681, - https://github.com/fmtlib/fmt/pull/2701). Thanks @AlexGuteniev. + https://github.com/fmtlib/fmt/pull/2701). Thanks to @AlexGuteniev. - Fixed Unicode handling when writing to an ostream. @@ -1455,38 +1455,38 @@ prints `[0xa, 0x14, 0x1e]`. - Thanks @BRevzin. + Thanks to @BRevzin. - Implemented escaping of wide strings in ranges - (https://github.com/fmtlib/fmt/pull/2904). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/2904). Thanks to @phprus. - Added support for ranges with `begin` / `end` found via the argument-dependent lookup - (https://github.com/fmtlib/fmt/pull/2807). Thanks @rbrugo. + (https://github.com/fmtlib/fmt/pull/2807). Thanks to @rbrugo. - Fixed formatting of certain kinds of ranges of ranges - (https://github.com/fmtlib/fmt/pull/2787). Thanks @BRevzin. + (https://github.com/fmtlib/fmt/pull/2787). Thanks to @BRevzin. - Fixed handling of maps with element types other than `std::pair` - (https://github.com/fmtlib/fmt/pull/2944). Thanks @BrukerJWD. + (https://github.com/fmtlib/fmt/pull/2944). Thanks to @BrukerJWD. - Made tuple formatter enabled only if elements are formattable (https://github.com/fmtlib/fmt/issues/2939, - https://github.com/fmtlib/fmt/pull/2940). Thanks @jehelset. + https://github.com/fmtlib/fmt/pull/2940). Thanks to @jehelset. - Made `fmt::join` compatible with format string compilation (https://github.com/fmtlib/fmt/issues/2719, - https://github.com/fmtlib/fmt/pull/2720). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/2720). Thanks to @phprus. - Made compile-time checks work with named arguments of custom types and `std::ostream` `print` overloads (https://github.com/fmtlib/fmt/issues/2816, https://github.com/fmtlib/fmt/issues/2817, - https://github.com/fmtlib/fmt/pull/2819). Thanks @timsong-cpp. + https://github.com/fmtlib/fmt/pull/2819). Thanks to @timsong-cpp. - Removed `make_args_checked` because it is no longer needed for compile-time checks - (https://github.com/fmtlib/fmt/pull/2760). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/2760). Thanks to @phprus. - Removed the following deprecated APIs: `_format`, `arg_join`, the `format_to` overload that takes a memory buffer, `[v]fprintf` that @@ -1505,11 +1505,11 @@ - Made access mode of a created file consistent with `fopen` by setting `S_IWGRP` and `S_IWOTH` - (https://github.com/fmtlib/fmt/pull/2733). Thanks @arogge. + (https://github.com/fmtlib/fmt/pull/2733). Thanks to @arogge. - Removed a redundant buffer resize when formatting to `std::ostream` (https://github.com/fmtlib/fmt/issues/2842, - https://github.com/fmtlib/fmt/pull/2843). Thanks @jcelerier. + https://github.com/fmtlib/fmt/pull/2843). Thanks to @jcelerier. - Made precision computation for strings consistent with width (https://github.com/fmtlib/fmt/issues/2888). @@ -1522,7 +1522,7 @@ - Improved support for systems such as CHERI with extra data stored in pointers (https://github.com/fmtlib/fmt/pull/2932). - Thanks @davidchisnall. + Thanks to @davidchisnall. - Improved documentation (https://github.com/fmtlib/fmt/pull/2706, @@ -1532,7 +1532,7 @@ https://github.com/fmtlib/fmt/pull/2805, https://github.com/fmtlib/fmt/pull/2815, https://github.com/fmtlib/fmt/pull/2924). - Thanks @BRevzin, @Pokechu22, @setoye, @rtobar, @rbrugo, @anoonD and + Thanks to @BRevzin, @Pokechu22, @setoye, @rtobar, @rbrugo, @anoonD and @leha-bot. - Improved build configuration @@ -1543,7 +1543,7 @@ https://github.com/fmtlib/fmt/pull/2907, https://github.com/fmtlib/fmt/pull/2913, https://github.com/fmtlib/fmt/pull/2914). - Thanks @kambala-decapitator, @mattiasljungstrom, @kieselnb, @nathannaveen + Thanks to @kambala-decapitator, @mattiasljungstrom, @kieselnb, @nathannaveen and @Vertexwahn. - Fixed various warnings and compilation issues @@ -1613,7 +1613,7 @@ https://github.com/fmtlib/fmt/pull/2957, https://github.com/fmtlib/fmt/issues/2958, https://github.com/fmtlib/fmt/pull/2960). - Thanks @matrackif @Tobi823, @ivan-volnov, @VasiliPupkin256, + Thanks to @matrackif @Tobi823, @ivan-volnov, @VasiliPupkin256, @federico-busato, @barcharcraz, @jk-jeon, @HazardyKnusperkeks, @dalboris, @seanm, @gsjaardema, @timsong-cpp, @seanm, @frithrah, @chronoxor, @Agga, @madmaxoft, @JurajX, @phprus and @Dani-Hub. @@ -1622,14 +1622,14 @@ - Restored ABI compatibility with version 8.0.x (https://github.com/fmtlib/fmt/issues/2695, - https://github.com/fmtlib/fmt/pull/2696). Thanks @saraedum. + https://github.com/fmtlib/fmt/pull/2696). Thanks to @saraedum. - Fixed chrono formatting on big endian systems (https://github.com/fmtlib/fmt/issues/2698, https://github.com/fmtlib/fmt/pull/2699). - Thanks @phprus and @xvitaly. + Thanks to @phprus and @xvitaly. - Fixed a linkage error with mingw (https://github.com/fmtlib/fmt/issues/2691, - https://github.com/fmtlib/fmt/pull/2692). Thanks @rbberger. + https://github.com/fmtlib/fmt/pull/2692). Thanks to @rbberger. # 8.1.0 - 2022-01-02 @@ -1664,7 +1664,7 @@ FMTFormatterCompile_Y 244 ns 10.5 ns ---------------------------------------------------------------------------- - Thanks @phprus and @toughengineer. + Thanks to @phprus and @toughengineer. - Implemented subsecond formatting for chrono durations (https://github.com/fmtlib/fmt/pull/2623). For example @@ -1680,14 +1680,14 @@ prints \"01.234\". - Thanks @matrackif. + Thanks to @matrackif. - Fixed handling of precision 0 when formatting chrono durations (https://github.com/fmtlib/fmt/issues/2587, - https://github.com/fmtlib/fmt/pull/2588). Thanks @lukester1975. + https://github.com/fmtlib/fmt/pull/2588). Thanks to @lukester1975. - Fixed an overflow on invalid inputs in the `tm` formatter - (https://github.com/fmtlib/fmt/pull/2564). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/2564). Thanks to @phprus. - Added `fmt::group_digits` that formats integers with a non-localized digit separator (comma) for groups of three digits. For example @@ -1708,12 +1708,12 @@ - Thanks @benit8 and @data-man. + Thanks to @benit8 and @data-man. - Added experimental support for compile-time floating point formatting (https://github.com/fmtlib/fmt/pull/2426, https://github.com/fmtlib/fmt/pull/2470). It is currently - limited to the header-only mode. Thanks @alexezeder. + limited to the header-only mode. Thanks to @alexezeder. - Added UDL-based named argument support to compile-time format string checks (https://github.com/fmtlib/fmt/issues/2640, @@ -1733,7 +1733,7 @@ non-type template parameter support (gcc 10+) because `s` is not a valid format specifier for an integer. - Thanks @alexezeder. + Thanks to @alexezeder. - Implemented escaping of string range elements. For example ([godbolt](https://godbolt.org/z/rKvM1vKf3)): @@ -1757,7 +1757,7 @@ aan"] - Added an experimental `?` specifier for escaping strings. - (https://github.com/fmtlib/fmt/pull/2674). Thanks @BRevzin. + (https://github.com/fmtlib/fmt/pull/2674). Thanks to @BRevzin. - Switched to JSON-like representation of maps and sets for consistency with Python\'s `str.format`. For example @@ -1777,7 +1777,7 @@ {"answer": 42} - Extended `fmt::join` to support C++20-only ranges - (https://github.com/fmtlib/fmt/pull/2549). Thanks @BRevzin. + (https://github.com/fmtlib/fmt/pull/2549). Thanks to @BRevzin. - Optimized handling of non-const-iterable ranges and implemented initial support for non-const-formattable types. @@ -1790,7 +1790,7 @@ `[const] unsigned char*` to C strings. - Deprecated `_format`, a legacy UDL-based format API - (https://github.com/fmtlib/fmt/pull/2646). Thanks @alexezeder. + (https://github.com/fmtlib/fmt/pull/2646). Thanks to @alexezeder. - Marked `format`, `formatted_size` and `to_string` as `[[nodiscard]]` (https://github.com/fmtlib/fmt/pull/2612). @0x8000-0000. @@ -1800,37 +1800,37 @@ explicitly disallowed (https://github.com/fmtlib/fmt/issues/2598, https://github.com/fmtlib/fmt/pull/2609, - https://github.com/fmtlib/fmt/pull/2610). Thanks @AlexGuteniev. + https://github.com/fmtlib/fmt/pull/2610). Thanks to @AlexGuteniev. - Optimized writing to a contiguous buffer with `format_to_n` - (https://github.com/fmtlib/fmt/pull/2489). Thanks @Roman-Koshelev. + (https://github.com/fmtlib/fmt/pull/2489). Thanks to @Roman-Koshelev. - Optimized writing to non-`char` buffers - (https://github.com/fmtlib/fmt/pull/2477). Thanks @Roman-Koshelev. + (https://github.com/fmtlib/fmt/pull/2477). Thanks to @Roman-Koshelev. - Decimal point is now localized when using the `L` specifier. - Improved floating point formatter implementation (https://github.com/fmtlib/fmt/pull/2498, - https://github.com/fmtlib/fmt/pull/2499). Thanks @Roman-Koshelev. + https://github.com/fmtlib/fmt/pull/2499). Thanks to @Roman-Koshelev. - Fixed handling of very large precision in fixed format (https://github.com/fmtlib/fmt/pull/2616). - Made a table of cached powers used in FP formatting static - (https://github.com/fmtlib/fmt/pull/2509). Thanks @jk-jeon. + (https://github.com/fmtlib/fmt/pull/2509). Thanks to @jk-jeon. - Resolved a lookup ambiguity with C++20 format-related functions due to ADL (https://github.com/fmtlib/fmt/issues/2639, - https://github.com/fmtlib/fmt/pull/2641). Thanks @mkurdej. + https://github.com/fmtlib/fmt/pull/2641). Thanks to @mkurdej. - Removed unnecessary inline namespace qualification (https://github.com/fmtlib/fmt/issues/2642, - https://github.com/fmtlib/fmt/pull/2643). Thanks @mkurdej. + https://github.com/fmtlib/fmt/pull/2643). Thanks to @mkurdej. - Implemented argument forwarding in `format_to_n` (https://github.com/fmtlib/fmt/issues/2462, - https://github.com/fmtlib/fmt/pull/2463). Thanks @owent. + https://github.com/fmtlib/fmt/pull/2463). Thanks to @owent. - Fixed handling of implicit conversions in `fmt::to_string` and format string compilation @@ -1844,10 +1844,10 @@ (https://github.com/fmtlib/fmt/issues/2435). - Improved C++14/17 attribute detection - (https://github.com/fmtlib/fmt/pull/2615). Thanks @AlexGuteniev. + (https://github.com/fmtlib/fmt/pull/2615). Thanks to @AlexGuteniev. - Improved `consteval` detection for MSVC - (https://github.com/fmtlib/fmt/pull/2559). Thanks @DanielaE. + (https://github.com/fmtlib/fmt/pull/2559). Thanks to @DanielaE. - Improved documentation (https://github.com/fmtlib/fmt/issues/2406, @@ -1861,7 +1861,7 @@ https://github.com/fmtlib/fmt/pull/2606, https://github.com/fmtlib/fmt/pull/2620, https://github.com/fmtlib/fmt/issues/2676). - Thanks @sobolevn, @UnePierre, @zhsj, @phprus, @ericcurtin and @Lounarok. + Thanks to @sobolevn, @UnePierre, @zhsj, @phprus, @ericcurtin and @Lounarok. - Improved fuzzers and added a fuzzer for chrono timepoint formatting (https://github.com/fmtlib/fmt/pull/2461, @@ -1870,11 +1870,11 @@ - Added the `FMT_SYSTEM_HEADERS` CMake option setting which marks {fmt}\'s headers as system. It can be used to suppress warnings (https://github.com/fmtlib/fmt/issues/2644, - https://github.com/fmtlib/fmt/pull/2651). Thanks @alexezeder. + https://github.com/fmtlib/fmt/pull/2651). Thanks to @alexezeder. - Added the Bazel build system support (https://github.com/fmtlib/fmt/pull/2505, - https://github.com/fmtlib/fmt/pull/2516). Thanks @Vertexwahn. + https://github.com/fmtlib/fmt/pull/2516). Thanks to @Vertexwahn. - Improved build configuration and tests (https://github.com/fmtlib/fmt/issues/2437, @@ -1883,7 +1883,7 @@ https://github.com/fmtlib/fmt/pull/2650, https://github.com/fmtlib/fmt/pull/2663, https://github.com/fmtlib/fmt/pull/2677). - Thanks @DanielaE, @alexezeder and @phprus. + Thanks to @DanielaE, @alexezeder and @phprus. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/pull/2353, @@ -1934,7 +1934,7 @@ https://github.com/fmtlib/fmt/issues/2661, https://github.com/fmtlib/fmt/pull/2664, https://github.com/fmtlib/fmt/pull/2684). - Thanks @DanielaE, @mwinterb, @cdacamar, @TrebledJ, @bodomartin, @cquammen, + Thanks to @DanielaE, @mwinterb, @cdacamar, @TrebledJ, @bodomartin, @cquammen, @white238, @mmarkeloff, @palacaze, @jcelerier, @mborn-adi, @BrukerJWD, @spyridon97, @phprus, @oliverlee, @joshessman-llnl, @akohlmey, @timkalu, @olupton, @Acretock, @alexezeder, @andrewcorrigan, @lucpelletier and @@ -1951,9 +1951,9 @@ - Fixed documentation issues (https://github.com/fmtlib/fmt/pull/2396, https://github.com/fmtlib/fmt/issues/2403, - https://github.com/fmtlib/fmt/issues/2406). Thanks @mkurdej. + https://github.com/fmtlib/fmt/issues/2406). Thanks to @mkurdej. - Removed dead code in FP formatter ( - https://github.com/fmtlib/fmt/pull/2398). Thanks @javierhonduco. + https://github.com/fmtlib/fmt/pull/2398). Thanks to @javierhonduco. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/2351, https://github.com/fmtlib/fmt/issues/2359, @@ -1970,7 +1970,7 @@ https://github.com/fmtlib/fmt/issues/2400, https://github.com/fmtlib/fmt/issues/2401, https://github.com/fmtlib/fmt/pull/2407). - Thanks @zx2c4, @AidanSun05, @mattiasljungstrom, @joemmett, @erengy, + Thanks to @zx2c4, @AidanSun05, @mattiasljungstrom, @joemmett, @erengy, @patlkli, @gsjaardema and @phprus. # 8.0.0 - 2021-06-21 @@ -2021,7 +2021,7 @@ Most of the formatting functionality is available at compile time with a notable exception of floating-point numbers and pointers. - Thanks @alexezeder. + Thanks to @alexezeder. - Optimized handling of format specifiers during format string compilation. For example, hexadecimal formatting (`"{:x}"`) is now @@ -2082,7 +2082,7 @@ It requires compiler support for class types in non-type template parameters (a C++20 feature) which is available in GCC 9.3+. - Thanks @alexezeder. + Thanks to @alexezeder. - Format string compilation now requires `format` functions of `formatter` specializations for user-defined types to be `const`: @@ -2108,11 +2108,11 @@ ``` Here the argument named \"answer\" is resolved at compile time with - no runtime overhead. Thanks @alexezeder. + no runtime overhead. Thanks to @alexezeder. - Added format string compilation support to `fmt::print` (https://github.com/fmtlib/fmt/issues/2280, - https://github.com/fmtlib/fmt/pull/2304). Thanks @alexezeder. + https://github.com/fmtlib/fmt/pull/2304). Thanks to @alexezeder. - Added initial support for compiling {fmt} as a C++20 module (https://github.com/fmtlib/fmt/pull/2235, @@ -2128,18 +2128,18 @@ https://github.com/fmtlib/fmt/pull/2318, https://github.com/fmtlib/fmt/pull/2324, https://github.com/fmtlib/fmt/pull/2332, - https://github.com/fmtlib/fmt/pull/2340). Thanks @DanielaE. + https://github.com/fmtlib/fmt/pull/2340). Thanks to @DanielaE. - Made symbols private by default reducing shared library size (https://github.com/fmtlib/fmt/pull/2301). For example - there was a \~15% reported reduction on one platform. Thanks @sergiud. + there was a \~15% reported reduction on one platform. Thanks to @sergiud. - Optimized includes making the result of preprocessing `fmt/format.h` \~20% smaller with libstdc++/C++20 and slightly improving build times (https://github.com/fmtlib/fmt/issues/1998). - Added support of ranges with non-const `begin` / `end` - (https://github.com/fmtlib/fmt/pull/1953). Thanks @kitegi. + (https://github.com/fmtlib/fmt/pull/1953). Thanks to @kitegi. - Added support of `std::byte` and other formattable types to `fmt::join` (https://github.com/fmtlib/fmt/issues/1981, @@ -2160,7 +2160,7 @@ prints \"42\". - Thanks @kamibo. + Thanks to @kamibo. - Implemented the default format for `std::chrono::system_clock` (https://github.com/fmtlib/fmt/issues/2319, @@ -2175,7 +2175,7 @@ ``` prints \"2021-06-18 15:22:00\" (the output depends on the current - date and time). Thanks @sunmy2019. + date and time). Thanks to @sunmy2019. - Made more chrono specifiers locale independent by default. Use the `'L'` specifier to get localized formatting. For example: @@ -2194,7 +2194,7 @@ - Improved locale handling in chrono formatting (https://github.com/fmtlib/fmt/issues/2337, https://github.com/fmtlib/fmt/pull/2349, - https://github.com/fmtlib/fmt/pull/2350). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/2350). Thanks to @phprus. - Deprecated `fmt/locale.h` moving the formatting functions that take a locale to `fmt/format.h` (`char`) and `fmt/xchar` (other @@ -2257,11 +2257,11 @@ - Made the `0` specifier ignored for infinity and NaN (https://github.com/fmtlib/fmt/issues/2305, - https://github.com/fmtlib/fmt/pull/2310). Thanks @Liedtke. + https://github.com/fmtlib/fmt/pull/2310). Thanks to @Liedtke. - Made the hexfloat formatting use the right alignment by default (https://github.com/fmtlib/fmt/issues/2308, - https://github.com/fmtlib/fmt/pull/2317). Thanks @Liedtke. + https://github.com/fmtlib/fmt/pull/2317). Thanks to @Liedtke. - Removed the deprecated numeric alignment (`'='`). Use the `'0'` specifier instead. @@ -2295,7 +2295,7 @@ } ``` - prints \"true\". Thanks @powercoderlol. + prints \"true\". Thanks to @powercoderlol. - Made `fmt::ptr` work with function pointers (https://github.com/fmtlib/fmt/pull/2131). For example: @@ -2308,14 +2308,14 @@ } ``` - Thanks @mikecrowe. + Thanks to @mikecrowe. - The undocumented support for specializing `formatter` for pointer types has been removed. - Fixed `fmt::formatted_size` with format string compilation (https://github.com/fmtlib/fmt/pull/2141, - https://github.com/fmtlib/fmt/pull/2161). Thanks @alexezeder. + https://github.com/fmtlib/fmt/pull/2161). Thanks to @alexezeder. - Fixed handling of empty format strings during format string compilation (https://github.com/fmtlib/fmt/issues/2042): @@ -2324,7 +2324,7 @@ auto s = fmt::format(FMT_COMPILE("")); ``` - Thanks @alexezeder. + Thanks to @alexezeder. - Fixed handling of enums in `fmt::to_string` (https://github.com/fmtlib/fmt/issues/2036). @@ -2370,7 +2370,7 @@ - Fixed moving of `fmt::ostream` that holds buffered data (https://github.com/fmtlib/fmt/issues/2197, - https://github.com/fmtlib/fmt/pull/2198). Thanks @vtta. + https://github.com/fmtlib/fmt/pull/2198). Thanks to @vtta. - Replaced the `fmt::system_error` exception with a function of the same name that constructs `std::system_error` @@ -2382,43 +2382,43 @@ (https://github.com/fmtlib/fmt/issues/2274, https://github.com/fmtlib/fmt/pull/2275). The latter is similar to `std::system_category` but correctly handles UTF-8. - Thanks @phprus. + Thanks to @phprus. - Replaced `fmt::error_code` with `std::error_code` and made it formattable (https://github.com/fmtlib/fmt/issues/2269, https://github.com/fmtlib/fmt/pull/2270, - https://github.com/fmtlib/fmt/pull/2273). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/2273). Thanks to @phprus. - Added speech synthesis support (https://github.com/fmtlib/fmt/pull/2206). - Made `format_to` work with a memory buffer that has a custom allocator (https://github.com/fmtlib/fmt/pull/2300). - Thanks @voxmea. + Thanks to @voxmea. - Added `Allocator::max_size` support to `basic_memory_buffer`. - (https://github.com/fmtlib/fmt/pull/1960). Thanks @phprus. + (https://github.com/fmtlib/fmt/pull/1960). Thanks to @phprus. - Added wide string support to `fmt::join` - (https://github.com/fmtlib/fmt/pull/2236). Thanks @crbrz. + (https://github.com/fmtlib/fmt/pull/2236). Thanks to @crbrz. - Made iterators passed to `formatter` specializations via a format context satisfy C++20 `std::output_iterator` requirements (https://github.com/fmtlib/fmt/issues/2156, https://github.com/fmtlib/fmt/pull/2158, https://github.com/fmtlib/fmt/issues/2195, - https://github.com/fmtlib/fmt/pull/2204). Thanks @randomnetcat. + https://github.com/fmtlib/fmt/pull/2204). Thanks to @randomnetcat. - Optimized the `printf` implementation (https://github.com/fmtlib/fmt/pull/1982, https://github.com/fmtlib/fmt/pull/1984, https://github.com/fmtlib/fmt/pull/2016, https://github.com/fmtlib/fmt/pull/2164). - Thanks @rimathia and @moiwi. + Thanks to @rimathia and @moiwi. - Improved detection of `constexpr` `char_traits` (https://github.com/fmtlib/fmt/pull/2246, - https://github.com/fmtlib/fmt/pull/2257). Thanks @phprus. + https://github.com/fmtlib/fmt/pull/2257). Thanks to @phprus. - Fixed writing to `stdout` when it is redirected to `NUL` on Windows (https://github.com/fmtlib/fmt/issues/2080). @@ -2428,7 +2428,7 @@ - Improved `strftime` error handling (https://github.com/fmtlib/fmt/issues/2238, - https://github.com/fmtlib/fmt/pull/2244). Thanks @yumeyao. + https://github.com/fmtlib/fmt/pull/2244). Thanks to @yumeyao. - Stopped using deprecated GCC UDL template extension. @@ -2436,18 +2436,18 @@ (https://github.com/fmtlib/fmt/issues/2096). - Error messages are now passed to assert when exceptions are disabled - (https://github.com/fmtlib/fmt/pull/2145). Thanks @NobodyXu. + (https://github.com/fmtlib/fmt/pull/2145). Thanks to @NobodyXu. - Added the `FMT_MASTER_PROJECT` CMake option to control build and install targets when {fmt} is included via `add_subdirectory` (https://github.com/fmtlib/fmt/issues/2098, https://github.com/fmtlib/fmt/pull/2100). - Thanks @randomizedthinking. + Thanks to @randomizedthinking. - Improved build configuration (https://github.com/fmtlib/fmt/pull/2026, https://github.com/fmtlib/fmt/pull/2122). - Thanks @luncliff and @ibaned. + Thanks to @luncliff and @ibaned. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/1947, @@ -2546,7 +2546,7 @@ https://github.com/fmtlib/fmt/pull/2333, https://github.com/fmtlib/fmt/pull/2338, https://github.com/fmtlib/fmt/pull/2341). - Thanks @darklukee, @fagg, @killerbot242, @jgopel, @yeswalrus, @Finkman, + Thanks to @darklukee, @fagg, @killerbot242, @jgopel, @yeswalrus, @Finkman, @HazardyKnusperkeks, @dkavolis, @concatime, @chronoxor, @summivox, @yNeo, @Apache-HB, @alexezeder, @toojays, @Brainy0207, @vadz, @imsherlock, @phprus, @white238, @yafshar, @BillyDonahue, @jstaahl, @denchat, @DanielaE, @@ -2560,7 +2560,7 @@ https://github.com/fmtlib/fmt/pull/2081, https://github.com/fmtlib/fmt/issues/2084, https://github.com/fmtlib/fmt/pull/2312). - Thanks @imba-tjd, @0x416c69 and @mordante. + Thanks to @imba-tjd, @0x416c69 and @mordante. - Continuous integration and test improvements (https://github.com/fmtlib/fmt/issues/1969, @@ -2574,7 +2574,7 @@ https://github.com/fmtlib/fmt/pull/2256, https://github.com/fmtlib/fmt/pull/2336, https://github.com/fmtlib/fmt/pull/2346). - Thanks @jgopel, @alexezeder and @DanielaE. + Thanks to @jgopel, @alexezeder and @DanielaE. The change log for versions 0.8.0 - 7.1.3 is available [here]( doc/ChangeLog-old.md). From e355c116f94d9150c4d9da5ad20c5218335ccec0 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 09:22:44 -0700 Subject: [PATCH 27/41] Tweak wording in the changelog --- ChangeLog.md | 418 +++++++++++++++++++++++++-------------------------- 1 file changed, 209 insertions(+), 209 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index acf18456b9d52..5e06b83917b17 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -40,17 +40,17 @@ https://github.com/fmtlib/fmt/pull/4013, https://github.com/fmtlib/fmt/pull/4027, https://github.com/fmtlib/fmt/pull/4029). In particular, native CMake support - for modules is now used if available. Thanks to @yujincheng08 and @matt77hias. + for modules is now used if available. Thanks @yujincheng08 and @matt77hias. - Added an option to replace standard includes with `import std` enabled via the `FMT_IMPORT_STD` macro (https://github.com/fmtlib/fmt/issues/3921, - https://github.com/fmtlib/fmt/pull/3928). Thanks to @matt77hias. + https://github.com/fmtlib/fmt/pull/3928). Thanks @matt77hias. - Exported `fmt::range_format`, `fmt::range_format_kind` and `fmt::compiled_string` from the `fmt` module (https://github.com/fmtlib/fmt/pull/3970, https://github.com/fmtlib/fmt/pull/3999). - Thanks to @matt77hias and @yujincheng08. + Thanks @matt77hias and @yujincheng08. - Improved integration with stdio in `fmt::print`, enabling direct writes into a C stream buffer in common cases. This may give significant @@ -83,7 +83,7 @@ no longer results in a buffer overflow. Instead the output will be truncated and you can get the end iterator and whether truncation occurred from the - `result` object. Thanks to @ThePhD. + `result` object. Thanks @ThePhD. - Enabled Unicode support by default in MSVC, bringing it on par with other compilers and making it unnecessary for users to enable it explicitly. @@ -94,20 +94,20 @@ compiled with Unicode enabled. - Added a formatter for `std::expected` - (https://github.com/fmtlib/fmt/pull/3834). Thanks to @dominicpoeschko. + (https://github.com/fmtlib/fmt/pull/3834). Thanks @dominicpoeschko. - Added a formatter for `std::complex` (https://github.com/fmtlib/fmt/issues/1467, https://github.com/fmtlib/fmt/issues/3886, https://github.com/fmtlib/fmt/pull/3892, - https://github.com/fmtlib/fmt/pull/3900). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3900). Thanks @phprus. - Added a formatter for `std::type_info` - (https://github.com/fmtlib/fmt/pull/3978). Thanks to @matt77hias. + (https://github.com/fmtlib/fmt/pull/3978). Thanks @matt77hias. - Specialized `formatter` for `std::basic_string` types with custom traits and allocators (https://github.com/fmtlib/fmt/issues/3938, - https://github.com/fmtlib/fmt/pull/3943). Thanks to @dieram3. + https://github.com/fmtlib/fmt/pull/3943). Thanks @dieram3. - Added formatters for `std::chrono::day`, `std::chrono::month`, `std::chrono::year` and `std::chrono::year_month_day` @@ -129,55 +129,55 @@ image - Thanks to @zivshek. + Thanks @zivshek. - Fixed handling of precision in `%S` (https://github.com/fmtlib/fmt/issues/3794, - https://github.com/fmtlib/fmt/pull/3814). Thanks to @js324. + https://github.com/fmtlib/fmt/pull/3814). Thanks @js324. - Added support for the `-` specifier (glibc `strftime` extension) to day of the month (`%d`) and week of the year (`%W`, `%U`, `%V`) specifiers - (https://github.com/fmtlib/fmt/pull/3976). Thanks to @ZaheenJ. + (https://github.com/fmtlib/fmt/pull/3976). Thanks @ZaheenJ. - Fixed the scope of the `-` extension in chrono formatting so that it doesn't apply to subsequent specifiers (https://github.com/fmtlib/fmt/issues/3811, - https://github.com/fmtlib/fmt/pull/3812). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3812). Thanks @phprus. - Improved handling of `time_point::min()` (https://github.com/fmtlib/fmt/issues/3282). - Added support for character range formatting (https://github.com/fmtlib/fmt/issues/3857, - https://github.com/fmtlib/fmt/pull/3863). Thanks to @js324. + https://github.com/fmtlib/fmt/pull/3863). Thanks @js324. - Added `string` and `debug_string` range formatters (https://github.com/fmtlib/fmt/pull/3973, - https://github.com/fmtlib/fmt/pull/4024). Thanks to @matt77hias. + https://github.com/fmtlib/fmt/pull/4024). Thanks @matt77hias. - Enabled ADL for `begin` and `end` in `fmt::join` (https://github.com/fmtlib/fmt/issues/3813, - https://github.com/fmtlib/fmt/pull/3824). Thanks to @bbolli. + https://github.com/fmtlib/fmt/pull/3824). Thanks @bbolli. - Made contiguous iterator optimizations apply to `std::basic_string` iterators - (https://github.com/fmtlib/fmt/pull/3798). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/3798). Thanks @phprus. - Added support for ranges with mutable `begin` and `end` (https://github.com/fmtlib/fmt/issues/3752, https://github.com/fmtlib/fmt/pull/3800, - https://github.com/fmtlib/fmt/pull/3955). Thanks to @tcbrindle and @Arghnews. + https://github.com/fmtlib/fmt/pull/3955). Thanks @tcbrindle and @Arghnews. - Added support for move-only iterators to `fmt::join` (https://github.com/fmtlib/fmt/issues/3802, - https://github.com/fmtlib/fmt/pull/3946). Thanks to @Arghnews. + https://github.com/fmtlib/fmt/pull/3946). Thanks @Arghnews. - Moved range and iterator overloads of `fmt::join` to `fmt/ranges.h`, next to other overloads. - Fixed handling of types with `begin` returning `void` such as Eigen matrices (https://github.com/fmtlib/fmt/issues/3839, - https://github.com/fmtlib/fmt/pull/3964). Thanks to @Arghnews. + https://github.com/fmtlib/fmt/pull/3964). Thanks @Arghnews. - Added an `fmt::formattable` concept (https://github.com/fmtlib/fmt/pull/3974). - Thanks to @matt77hias. + Thanks @matt77hias. - Added support for `__float128` (https://github.com/fmtlib/fmt/issues/3494). @@ -186,10 +186,10 @@ - Made `fmt::isnan` not trigger floating-point exception for NaN values (https://github.com/fmtlib/fmt/issues/3948, - https://github.com/fmtlib/fmt/pull/3951). Thanks to @alexdewar. + https://github.com/fmtlib/fmt/pull/3951). Thanks @alexdewar. - Removed dependency on `` for `std::allocator_traits` when possible - (https://github.com/fmtlib/fmt/pull/3804). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/3804). Thanks @phprus. - Enabled compile-time checks in formatting functions that take text colors and styles. @@ -199,10 +199,10 @@ - Made format string compilation work with clang 12 and later despite only partial non-type template parameter support (https://github.com/fmtlib/fmt/issues/4000, - https://github.com/fmtlib/fmt/pull/4001). Thanks to @yujincheng08. + https://github.com/fmtlib/fmt/pull/4001). Thanks @yujincheng08. - Made `fmt::iterator_buffer`'s move constructor `noexcept` - (https://github.com/fmtlib/fmt/pull/3808). Thanks to @waywardmonkeys. + (https://github.com/fmtlib/fmt/pull/3808). Thanks @waywardmonkeys. - Started enforcing that `formatter::format` is const for compatibility with `std::format` (https://github.com/fmtlib/fmt/issues/3447). @@ -211,28 +211,28 @@ - Made `fmt::basic_string_view` not constructible from `nullptr` for consistency with `std::string_view` in C++23 - (https://github.com/fmtlib/fmt/pull/3846). Thanks to @dalle. + (https://github.com/fmtlib/fmt/pull/3846). Thanks @dalle. - Fixed `fmt::group_digits` for negative integers (https://github.com/fmtlib/fmt/issues/3891, - https://github.com/fmtlib/fmt/pull/3901). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3901). Thanks @phprus. - Fixed handling of negative ids in `fmt::basic_format_args::get` - (https://github.com/fmtlib/fmt/pull/3945). Thanks to @marlenecota. + (https://github.com/fmtlib/fmt/pull/3945). Thanks @marlenecota. - Improved named argument validation (https://github.com/fmtlib/fmt/issues/3817). - Disabled copy construction/assignment for `fmt::format_arg_store` and fixed moved construction (https://github.com/fmtlib/fmt/pull/3833). - Thanks to @ivafanas. + Thanks @ivafanas. - Worked around a locale issue in RHEL/devtoolset (https://github.com/fmtlib/fmt/issues/3858, - https://github.com/fmtlib/fmt/pull/3859). Thanks to @g199209. + https://github.com/fmtlib/fmt/pull/3859). Thanks @g199209. - Added RTTI detection for MSVC (https://github.com/fmtlib/fmt/pull/3821, - https://github.com/fmtlib/fmt/pull/3963). Thanks to @edo9300. + https://github.com/fmtlib/fmt/pull/3963). Thanks @edo9300. - Migrated the documentation from Sphinx to MkDocs. @@ -252,7 +252,7 @@ https://github.com/fmtlib/fmt/pull/3905, https://github.com/fmtlib/fmt/issues/3942, https://github.com/fmtlib/fmt/pull/4008). - Thanks to @zencatalyst, WolleTD, @tupaschoal, @Dobiasd, @frank-weinberg, @bbolli, + Thanks @zencatalyst, WolleTD, @tupaschoal, @Dobiasd, @frank-weinberg, @bbolli, @phprus, @waywardmonkeys, @js324 and @tchaikov. - Improved CI and tests @@ -265,23 +265,23 @@ https://github.com/fmtlib/fmt/pull/4010, https://github.com/fmtlib/fmt/pull/4012, https://github.com/fmtlib/fmt/pull/4038). - Thanks to @vgorrX, @waywardmonkeys, @tchaikov and @phprus. + Thanks @vgorrX, @waywardmonkeys, @tchaikov and @phprus. - Fixed buffer overflow when using format string compilation with debug format and `std::back_insert_iterator` (https://github.com/fmtlib/fmt/issues/3795, - https://github.com/fmtlib/fmt/pull/3797). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3797). Thanks @phprus. - Improved Bazel support (https://github.com/fmtlib/fmt/pull/3792, https://github.com/fmtlib/fmt/pull/3801, https://github.com/fmtlib/fmt/pull/3962, - https://github.com/fmtlib/fmt/pull/3965). Thanks to @Vertexwahn. + https://github.com/fmtlib/fmt/pull/3965). Thanks @Vertexwahn. - Improved/fixed the CMake config (https://github.com/fmtlib/fmt/issues/3777, https://github.com/fmtlib/fmt/pull/3783, https://github.com/fmtlib/fmt/issues/3847, - https://github.com/fmtlib/fmt/pull/3907). Thanks to @phprus and @xTachyon. + https://github.com/fmtlib/fmt/pull/3907). Thanks @phprus and @xTachyon. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/3685, @@ -323,7 +323,7 @@ https://github.com/fmtlib/fmt/pull/3995, https://github.com/fmtlib/fmt/pull/4009, https://github.com/fmtlib/fmt/pull/4023). - Thanks to @hmbj, @phprus, @res2k, @Baardi, @matt77hias, @waywardmonkeys, @hmbj, + Thanks @hmbj, @phprus, @res2k, @Baardi, @matt77hias, @waywardmonkeys, @hmbj, @yakra, @prlw1, @Arghnews, @mtillmann0, @ShifftC, @eepp, @jimmy-park and @ChristianGebhardt. @@ -331,13 +331,13 @@ - Fixed ABI compatibility with earlier 10.x versions (https://github.com/fmtlib/fmt/issues/3785, - https://github.com/fmtlib/fmt/pull/3786). Thanks to @saraedum. + https://github.com/fmtlib/fmt/pull/3786). Thanks @saraedum. # 10.2.0 - 2024-01-01 - Added support for the `%j` specifier (the number of days) for `std::chrono::duration` (https://github.com/fmtlib/fmt/issues/3643, - https://github.com/fmtlib/fmt/pull/3732). Thanks to @intelfx. + https://github.com/fmtlib/fmt/pull/3732). Thanks @intelfx. - Added support for the chrono suffix for days and changed the suffix for minutes from "m" to the correct "min" @@ -353,11 +353,11 @@ } ``` - Thanks to @Richardk2n. + Thanks @Richardk2n. - Fixed an overflow in `std::chrono::time_point` formatting with large dates (https://github.com/fmtlib/fmt/issues/3725, - https://github.com/fmtlib/fmt/pull/3727). Thanks to @cschreib. + https://github.com/fmtlib/fmt/pull/3727). Thanks @cschreib. - Added a formatter for `std::source_location` (https://github.com/fmtlib/fmt/pull/3730). @@ -378,7 +378,7 @@ /app/example.cpp:5:51: int main() ``` - Thanks to @felix642. + Thanks @felix642. - Added a formatter for `std::bitset` (https://github.com/fmtlib/fmt/pull/3660). @@ -393,7 +393,7 @@ } ``` - Thanks to @muggenhor. + Thanks @muggenhor. - Added an experimental `nested_formatter` that provides an easy way of applying a formatter to one or more subobjects while automatically handling @@ -441,10 +441,10 @@ prints `"C:/foo"` on Windows. - Thanks to @js324. + Thanks @js324. - Made `format_as` work with references - (https://github.com/fmtlib/fmt/pull/3739). Thanks to @tchaikov. + (https://github.com/fmtlib/fmt/pull/3739). Thanks @tchaikov. - Fixed formatting of invalid UTF-8 with precision (https://github.com/fmtlib/fmt/issues/3284). @@ -467,7 +467,7 @@ - Disallowed the `c` specifier for `bool` (https://github.com/fmtlib/fmt/issues/3726, - https://github.com/fmtlib/fmt/pull/3734). Thanks to @js324. + https://github.com/fmtlib/fmt/pull/3734). Thanks @js324. - Made the default formatting unlocalized in `fmt::ostream_formatter` for consistency with the rest of the library @@ -475,7 +475,7 @@ - Fixed localized formatting in bases other than decimal (https://github.com/fmtlib/fmt/issues/3693, - https://github.com/fmtlib/fmt/pull/3750). Thanks to @js324. + https://github.com/fmtlib/fmt/pull/3750). Thanks @js324. - Fixed a performance regression in experimental `fmt::ostream::print` (https://github.com/fmtlib/fmt/issues/3674). @@ -485,32 +485,32 @@ (https://github.com/fmtlib/fmt/pull/3668, https://github.com/fmtlib/fmt/issues/3688, https://github.com/fmtlib/fmt/pull/3689). - Thanks to @Roman-Koshelev and @dimztimz. + Thanks @Roman-Koshelev and @dimztimz. - Changed to only export `format_error` when {fmt} is built as a shared library (https://github.com/fmtlib/fmt/issues/3626, - https://github.com/fmtlib/fmt/pull/3627). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3627). Thanks @phprus. - Made `fmt::streamed` `constexpr`. - (https://github.com/fmtlib/fmt/pull/3650). Thanks to @muggenhor. + (https://github.com/fmtlib/fmt/pull/3650). Thanks @muggenhor. - Made `fmt::format_int` `constexpr` (https://github.com/fmtlib/fmt/issues/4031, - https://github.com/fmtlib/fmt/pull/4032). Thanks to @dixlorenz. + https://github.com/fmtlib/fmt/pull/4032). Thanks @dixlorenz. - Enabled `consteval` on older versions of MSVC - (https://github.com/fmtlib/fmt/pull/3757). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/3757). Thanks @phprus. - Added an option to build without `wchar_t` support on Windows (https://github.com/fmtlib/fmt/issues/3631, - https://github.com/fmtlib/fmt/pull/3636). Thanks to @glebm. + https://github.com/fmtlib/fmt/pull/3636). Thanks @glebm. - Improved build and CI configuration (https://github.com/fmtlib/fmt/pull/3679, https://github.com/fmtlib/fmt/issues/3701, https://github.com/fmtlib/fmt/pull/3702, https://github.com/fmtlib/fmt/pull/3749). - Thanks to @jcar87, @pklima and @tchaikov. + Thanks @jcar87, @pklima and @tchaikov. - Fixed various warnings, compilation and test issues (https://github.com/fmtlib/fmt/issues/3607, @@ -553,7 +553,7 @@ https://github.com/fmtlib/fmt/pull/3764, https://github.com/fmtlib/fmt/issues/3774, https://github.com/fmtlib/fmt/pull/3779). - Thanks to @danakj, @vinayyadav3016, @cyyever, @phprus, @qimiko, @saschasc, + Thanks @danakj, @vinayyadav3016, @cyyever, @phprus, @qimiko, @saschasc, @gsjaardema, @lazka, @Zhaojun-Liu, @carlsmedstad, @hotwatermorning, @cptFracassa, @kuguma, @PeterJohnson, @H1X4Dev, @asantoni, @eltociear, @msimberg, @tchaikov, @waywardmonkeys. @@ -570,7 +570,7 @@ https://github.com/fmtlib/fmt/pull/3737, https://github.com/fmtlib/fmt/issues/3742, https://github.com/fmtlib/fmt/pull/3744). - Thanks to @idzm, @perlun, @joycebrum, @fennewald, @reinhardt1053, @GeorgeLS. + Thanks @idzm, @perlun, @joycebrum, @fennewald, @reinhardt1053, @GeorgeLS. - Updated CI dependencies (https://github.com/fmtlib/fmt/pull/3615, @@ -587,7 +587,7 @@ - Added formatters for `std::atomic` and `atomic_flag` (https://github.com/fmtlib/fmt/pull/3574, https://github.com/fmtlib/fmt/pull/3594). - Thanks to @wangzw and @AlexGuteniev. + Thanks @wangzw and @AlexGuteniev. - Fixed an error about partial specialization of `formatter` after instantiation when compiled with gcc and C++20 (https://github.com/fmtlib/fmt/issues/3584). @@ -595,20 +595,20 @@ (https://github.com/fmtlib/fmt/issues/3587, https://github.com/fmtlib/fmt/pull/3597, https://github.com/fmtlib/fmt/pull/3605). - Thanks to @MathewBensonCode. + Thanks @MathewBensonCode. - Made `fmt::to_string` work with types that have `format_as` - overloads (https://github.com/fmtlib/fmt/pull/3575). Thanks to @phprus. + overloads (https://github.com/fmtlib/fmt/pull/3575). Thanks @phprus. - Made `formatted_size` work with integral format specifiers at compile time (https://github.com/fmtlib/fmt/pull/3591). - Thanks to @elbeno. + Thanks @elbeno. - Fixed a warning about the `no_unique_address` attribute on clang-cl - (https://github.com/fmtlib/fmt/pull/3599). Thanks to @lukester1975. + (https://github.com/fmtlib/fmt/pull/3599). Thanks @lukester1975. - Improved compatibility with the legacy GBK encoding (https://github.com/fmtlib/fmt/issues/3598, - https://github.com/fmtlib/fmt/pull/3599). Thanks to @YuHuanTin. + https://github.com/fmtlib/fmt/pull/3599). Thanks @YuHuanTin. - Added OpenSSF Scorecard analysis (https://github.com/fmtlib/fmt/issues/3530, - https://github.com/fmtlib/fmt/pull/3571). Thanks to @joycebrum. + https://github.com/fmtlib/fmt/pull/3571). Thanks @joycebrum. - Updated CI dependencies (https://github.com/fmtlib/fmt/pull/3591, https://github.com/fmtlib/fmt/pull/3592, @@ -640,7 +640,7 @@ BM_format_to_n 133 ns 133 ns 5257795 - Optimized storage of an empty allocator in `basic_memory_buffer` - (https://github.com/fmtlib/fmt/pull/3485). Thanks to @Minty-Meeo. + (https://github.com/fmtlib/fmt/pull/3485). Thanks @Minty-Meeo. - Added formatters for proxy references to elements of `std::vector` and `std::bitset` @@ -658,19 +658,19 @@ } ``` - Thanks to @phprus and @felix642. + Thanks @phprus and @felix642. - Fixed an ambiguous formatter specialization for containers that look like container adaptors such as `boost::flat_set` (https://github.com/fmtlib/fmt/issues/3556, - https://github.com/fmtlib/fmt/pull/3561). Thanks to @5chmidti. + https://github.com/fmtlib/fmt/pull/3561). Thanks @5chmidti. - Fixed compilation when formatting durations not convertible from `std::chrono::seconds` - (https://github.com/fmtlib/fmt/pull/3430). Thanks to @patlkli. + (https://github.com/fmtlib/fmt/pull/3430). Thanks @patlkli. - Made the `formatter` specialization for `char*` const-correct - (https://github.com/fmtlib/fmt/pull/3432). Thanks to @timsong-cpp. + (https://github.com/fmtlib/fmt/pull/3432). Thanks @timsong-cpp. - Made `{}` and `{:}` handled consistently during compile-time checks (https://github.com/fmtlib/fmt/issues/3526). @@ -679,12 +679,12 @@ safety by preventing dangling references. - Improved the compile-time error for unformattable types - (https://github.com/fmtlib/fmt/pull/3478). Thanks to @BRevzin. + (https://github.com/fmtlib/fmt/pull/3478). Thanks @BRevzin. - Improved the floating-point formatter (https://github.com/fmtlib/fmt/pull/3448, https://github.com/fmtlib/fmt/pull/3450). - Thanks to @florimond-collette. + Thanks @florimond-collette. - Fixed handling of precision for `long double` larger than 64 bits. (https://github.com/fmtlib/fmt/issues/3539, @@ -693,23 +693,23 @@ - Made floating-point and chrono tests less platform-dependent (https://github.com/fmtlib/fmt/issues/3337, https://github.com/fmtlib/fmt/issues/3433, - https://github.com/fmtlib/fmt/pull/3434). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3434). Thanks @phprus. - Removed the remnants of the Grisu floating-point formatter that has been replaced by Dragonbox in earlier versions. - Added `throw_format_error` to the public API - (https://github.com/fmtlib/fmt/pull/3551). Thanks to @mjerabek. + (https://github.com/fmtlib/fmt/pull/3551). Thanks @mjerabek. - Made `FMT_THROW` assert even if assertions are disabled when compiling with exceptions disabled (https://github.com/fmtlib/fmt/issues/3418, - https://github.com/fmtlib/fmt/pull/3439). Thanks to @BRevzin. + https://github.com/fmtlib/fmt/pull/3439). Thanks @BRevzin. - Made `format_as` and `std::filesystem::path` formatter work with exotic code unit types. (https://github.com/fmtlib/fmt/pull/3457, - https://github.com/fmtlib/fmt/pull/3476). Thanks to @gix and @hmbj. + https://github.com/fmtlib/fmt/pull/3476). Thanks @gix and @hmbj. - Added support for the `?` format specifier to `std::filesystem::path` and made the default unescaped for @@ -720,10 +720,10 @@ - Removed unused `basic_printf_parse_context`. - Improved RTTI detection used when formatting exceptions - (https://github.com/fmtlib/fmt/pull/3468). Thanks to @danakj. + (https://github.com/fmtlib/fmt/pull/3468). Thanks @danakj. - Improved compatibility with VxWorks7 - (https://github.com/fmtlib/fmt/pull/3467). Thanks to @wenshan1. + (https://github.com/fmtlib/fmt/pull/3467). Thanks @wenshan1. - Improved documentation (https://github.com/fmtlib/fmt/issues/3174, @@ -733,7 +733,7 @@ https://github.com/fmtlib/fmt/pull/3461, https://github.com/fmtlib/fmt/issues/3487, https://github.com/fmtlib/fmt/pull/3515). - Thanks to @zencatalyst, @rlalik and @mikecrowe. + Thanks @zencatalyst, @rlalik and @mikecrowe. - Improved build and CI configurations (https://github.com/fmtlib/fmt/issues/3449, @@ -748,7 +748,7 @@ https://github.com/fmtlib/fmt/issues/3517, https://github.com/fmtlib/fmt/pull/3523, https://github.com/fmtlib/fmt/pull/3563). - Thanks to @joycebrum, @glebm, @phprus, @petrmanek, @setoye and @abouvier. + Thanks @joycebrum, @glebm, @phprus, @petrmanek, @setoye and @abouvier. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/3408, @@ -770,7 +770,7 @@ https://github.com/fmtlib/fmt/pull/3549, https://github.com/fmtlib/fmt/pull/3550, https://github.com/fmtlib/fmt/pull/3552). - Thanks to @adesitter, @hmbj, @Minty-Meeo, @phprus, @TobiSchluter, + Thanks @adesitter, @hmbj, @Minty-Meeo, @phprus, @TobiSchluter, @kieranclancy, @alexeedm, @jurihock, @Ozomahtli and @razaqq. # 10.0.0 - 2023-05-09 @@ -790,16 +790,16 @@ to 1 - Blue: old algorithm - Thanks to @jk-jeon. + Thanks @jk-jeon. - Replaced `snprintf`-based hex float formatter with an internal implementation (https://github.com/fmtlib/fmt/pull/3179, https://github.com/fmtlib/fmt/pull/3203). This removes the - last usage of `s(n)printf` in {fmt}. Thanks to @phprus. + last usage of `s(n)printf` in {fmt}. Thanks @phprus. - Fixed alignment of floating-point numbers with localization (https://github.com/fmtlib/fmt/issues/3263, - https://github.com/fmtlib/fmt/pull/3272). Thanks to @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3272). Thanks @ShawnZhong. - Made handling of `#` consistent with `std::format`. @@ -813,7 +813,7 @@ https://github.com/fmtlib/fmt/pull/3397, https://github.com/fmtlib/fmt/pull/3399, https://github.com/fmtlib/fmt/pull/3400). - Thanks to @laitingsheng, @Orvid and @DanielaE. + Thanks @laitingsheng, @Orvid and @DanielaE. - Switched to the [modules CMake library](https://github.com/vitaut/modules) which allows building {fmt} as a C++20 module with clang: @@ -857,7 +857,7 @@ } ``` - Thanks to @ShawnZhong. + Thanks @ShawnZhong. - Implemented formatting of subseconds (https://github.com/fmtlib/fmt/issues/2207, @@ -877,27 +877,27 @@ } ``` - Thanks to @patrickroocks @phprus and @BRevzin. + Thanks @patrickroocks @phprus and @BRevzin. - Added precision support to `%S` - (https://github.com/fmtlib/fmt/pull/3148). Thanks to @SappyJoy + (https://github.com/fmtlib/fmt/pull/3148). Thanks @SappyJoy - Added support for `std::utc_time` (https://github.com/fmtlib/fmt/issues/3098, - https://github.com/fmtlib/fmt/pull/3110). Thanks to @patrickroocks. + https://github.com/fmtlib/fmt/pull/3110). Thanks @patrickroocks. - Switched formatting of `std::chrono::system_clock` from local time to UTC for compatibility with the standard (https://github.com/fmtlib/fmt/issues/3199, - https://github.com/fmtlib/fmt/pull/3230). Thanks to @ned14. + https://github.com/fmtlib/fmt/pull/3230). Thanks @ned14. - Added support for `%Ez` and `%Oz` to chrono formatters. (https://github.com/fmtlib/fmt/issues/3220, - https://github.com/fmtlib/fmt/pull/3222). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3222). Thanks @phprus. - Improved validation of format specifiers for `std::chrono::duration` (https://github.com/fmtlib/fmt/issues/3219, - https://github.com/fmtlib/fmt/pull/3232). Thanks to @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3232). Thanks @ShawnZhong. - Fixed formatting of time points before the epoch (https://github.com/fmtlib/fmt/issues/3117, @@ -914,12 +914,12 @@ } ``` - Thanks to @ShawnZhong. + Thanks @ShawnZhong. - Experimental: implemented glibc extension for padding seconds, minutes and hours (https://github.com/fmtlib/fmt/issues/2959, - https://github.com/fmtlib/fmt/pull/3271). Thanks to @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3271). Thanks @ShawnZhong. - Added a formatter for `std::exception` (https://github.com/fmtlib/fmt/issues/2977, @@ -946,10 +946,10 @@ vector::_M_range_check: __n (which is 0) >= this->size() (which is 0) - on libstdc++. Thanks to @zach2good and @phprus. + on libstdc++. Thanks @zach2good and @phprus. - Moved `std::error_code` formatter from `fmt/os.h` to `fmt/std.h`. - (https://github.com/fmtlib/fmt/pull/3125). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/3125). Thanks @phprus. - Added formatters for standard container adapters: `std::priority_queue`, `std::queue` and `std::stack` @@ -969,48 +969,48 @@ } ``` - Thanks to @ShawnZhong. + Thanks @ShawnZhong. - Added a formatter for `std::optional` to `fmt/std.h` (https://github.com/fmtlib/fmt/issues/1367, https://github.com/fmtlib/fmt/pull/3303). - Thanks to @tom-huntington. + Thanks @tom-huntington. - Fixed formatting of valueless by exception variants - (https://github.com/fmtlib/fmt/pull/3347). Thanks to @TheOmegaCarrot. + (https://github.com/fmtlib/fmt/pull/3347). Thanks @TheOmegaCarrot. - Made `fmt::ptr` accept `unique_ptr` with a custom deleter - (https://github.com/fmtlib/fmt/pull/3177). Thanks to @hmbj. + (https://github.com/fmtlib/fmt/pull/3177). Thanks @hmbj. - Fixed formatting of noncopyable ranges and nested ranges of chars (https://github.com/fmtlib/fmt/pull/3158 https://github.com/fmtlib/fmt/issues/3286, - https://github.com/fmtlib/fmt/pull/3290). Thanks to @BRevzin. + https://github.com/fmtlib/fmt/pull/3290). Thanks @BRevzin. - Fixed issues with formatting of paths and ranges of paths (https://github.com/fmtlib/fmt/issues/3319, https://github.com/fmtlib/fmt/pull/3321 - https://github.com/fmtlib/fmt/issues/3322). Thanks to @phprus. + https://github.com/fmtlib/fmt/issues/3322). Thanks @phprus. - Improved handling of invalid Unicode in paths. - Enabled compile-time checks on Apple clang 14 and later - (https://github.com/fmtlib/fmt/pull/3331). Thanks to @cloyce. + (https://github.com/fmtlib/fmt/pull/3331). Thanks @cloyce. - Improved compile-time checks of named arguments (https://github.com/fmtlib/fmt/issues/3105, - https://github.com/fmtlib/fmt/pull/3214). Thanks to @rbrich. + https://github.com/fmtlib/fmt/pull/3214). Thanks @rbrich. - Fixed formatting when both alignment and `0` are given (https://github.com/fmtlib/fmt/issues/3236, - https://github.com/fmtlib/fmt/pull/3248). Thanks to @ShawnZhong. + https://github.com/fmtlib/fmt/pull/3248). Thanks @ShawnZhong. - Improved Unicode support in the experimental file API on Windows (https://github.com/fmtlib/fmt/issues/3234, - https://github.com/fmtlib/fmt/pull/3293). Thanks to @Fros1er. + https://github.com/fmtlib/fmt/pull/3293). Thanks @Fros1er. - Unified UTF transcoding - (https://github.com/fmtlib/fmt/pull/3416). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/3416). Thanks @phprus. - Added support for UTF-8 digit separators via an experimental locale facet (https://github.com/fmtlib/fmt/issues/1861). For @@ -1026,24 +1026,24 @@ - Added an overload of `formatted_size` that takes a locale (https://github.com/fmtlib/fmt/issues/3084, - https://github.com/fmtlib/fmt/pull/3087). Thanks to @gerboengels. + https://github.com/fmtlib/fmt/pull/3087). Thanks @gerboengels. - Removed the deprecated `FMT_DEPRECATED_OSTREAM`. - Fixed a UB when using a null `std::string_view` with `fmt::to_string` or format string compilation (https://github.com/fmtlib/fmt/issues/3241, - https://github.com/fmtlib/fmt/pull/3244). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3244). Thanks @phprus. - Added `starts_with` to the fallback `string_view` implementation - (https://github.com/fmtlib/fmt/pull/3080). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/3080). Thanks @phprus. - Added `fmt::basic_format_string::get()` for compatibility with `basic_format_string` - (https://github.com/fmtlib/fmt/pull/3111). Thanks to @huangqinjin. + (https://github.com/fmtlib/fmt/pull/3111). Thanks @huangqinjin. - Added `println` for compatibility with C++23 - (https://github.com/fmtlib/fmt/pull/3267). Thanks to @ShawnZhong. + (https://github.com/fmtlib/fmt/pull/3267). Thanks @ShawnZhong. - Renamed the `FMT_EXPORT` macro for shared library usage to `FMT_LIB_EXPORT`. @@ -1054,7 +1054,7 @@ https://github.com/fmtlib/fmt/pull/3243). https://github.com/fmtlib/fmt/pull/3404, https://github.com/fmtlib/fmt/pull/4002). - Thanks to @Cleroth, @Vertexwahn and @yujincheng08. + Thanks @Cleroth, @Vertexwahn and @yujincheng08. - Improved build configuration and tests (https://github.com/fmtlib/fmt/pull/3118, @@ -1079,17 +1079,17 @@ https://github.com/fmtlib/fmt/pull/3395, https://github.com/fmtlib/fmt/pull/3406, https://github.com/fmtlib/fmt/pull/3411). - Thanks to @dimztimz, @phprus, @DavidKorczynski, @ChrisThrasher, + Thanks @dimztimz, @phprus, @DavidKorczynski, @ChrisThrasher, @FrancoisCarouge, @kennyweiss, @luzpaz, @codeinred, @Mixaill, @joycebrum, @kevinhwang and @Vertexwahn. - Fixed a regression in handling empty format specifiers after a colon - (`{:}`) (https://github.com/fmtlib/fmt/pull/3086). Thanks to @oxidase. + (`{:}`) (https://github.com/fmtlib/fmt/pull/3086). Thanks @oxidase. - Worked around a broken implementation of `std::is_constant_evaluated` in some versions of libstdc++ on clang (https://github.com/fmtlib/fmt/issues/3247, - https://github.com/fmtlib/fmt/pull/3281). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/3281). Thanks @phprus. - Fixed formatting of volatile variables (https://github.com/fmtlib/fmt/pull/3068). @@ -1152,7 +1152,7 @@ https://github.com/fmtlib/fmt/pull/3398, https://github.com/fmtlib/fmt/pull/3413, https://github.com/fmtlib/fmt/issues/3415). - Thanks to @phprus, @gsjaardema, @NewbieOrange, @EngineLessCC, @asmaloney, + Thanks @phprus, @gsjaardema, @NewbieOrange, @EngineLessCC, @asmaloney, @HazardyKnusperkeks, @sergiud, @Youw, @thesmurph, @czudziakm, @Roman-Koshelev, @chronoxor, @ShawnZhong, @russelltg, @glebm, @tmartin-gh, @Zhaojun-Liu, @louiswins and @mogemimi. @@ -1173,25 +1173,25 @@ } ``` - Thanks to @marksantaniello. + Thanks @marksantaniello. - Fixed handling of invalid UTF-8 (https://github.com/fmtlib/fmt/pull/3038, https://github.com/fmtlib/fmt/pull/3044, https://github.com/fmtlib/fmt/pull/3056). - Thanks to @phprus and @skeeto. + Thanks @phprus and @skeeto. - Improved Unicode support in `ostream` overloads of `print` (https://github.com/fmtlib/fmt/pull/2994, https://github.com/fmtlib/fmt/pull/3001, - https://github.com/fmtlib/fmt/pull/3025). Thanks to @dimztimz. + https://github.com/fmtlib/fmt/pull/3025). Thanks @dimztimz. - Fixed handling of the sign specifier in localized formatting on systems with 32-bit `wchar_t` (https://github.com/fmtlib/fmt/issues/3041). - Added support for wide streams to `fmt::streamed` - (https://github.com/fmtlib/fmt/pull/2994). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/2994). Thanks @phprus. - Added the `n` specifier that disables the output of delimiters when formatting ranges (https://github.com/fmtlib/fmt/pull/2981, @@ -1208,15 +1208,15 @@ } ``` - Thanks to @BRevzin. + Thanks @BRevzin. - Worked around problematic `std::string_view` constructors introduced in C++23 (https://github.com/fmtlib/fmt/issues/3030, - https://github.com/fmtlib/fmt/issues/3050). Thanks to @strega-nil-ms. + https://github.com/fmtlib/fmt/issues/3050). Thanks @strega-nil-ms. - Improve handling (exclusion) of recursive ranges (https://github.com/fmtlib/fmt/issues/2968, - https://github.com/fmtlib/fmt/pull/2974). Thanks to @Dani-Hub. + https://github.com/fmtlib/fmt/pull/2974). Thanks @Dani-Hub. - Improved error reporting in format string compilation (https://github.com/fmtlib/fmt/issues/3055). @@ -1224,19 +1224,19 @@ - Improved the implementation of [Dragonbox](https://github.com/jk-jeon/dragonbox), the algorithm used for the default floating-point formatting - (https://github.com/fmtlib/fmt/pull/2984). Thanks to @jk-jeon. + (https://github.com/fmtlib/fmt/pull/2984). Thanks @jk-jeon. - Fixed issues with floating-point formatting on exotic platforms. - Improved the implementation of chrono formatting - (https://github.com/fmtlib/fmt/pull/3010). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/3010). Thanks @phprus. - Improved documentation (https://github.com/fmtlib/fmt/pull/2966, https://github.com/fmtlib/fmt/pull/3009, https://github.com/fmtlib/fmt/issues/3020, https://github.com/fmtlib/fmt/pull/3037). - Thanks to @mwinterb, @jcelerier and @remiburtin. + Thanks @mwinterb, @jcelerier and @remiburtin. - Improved build configuration (https://github.com/fmtlib/fmt/pull/2991, @@ -1244,7 +1244,7 @@ https://github.com/fmtlib/fmt/issues/3004, https://github.com/fmtlib/fmt/pull/3007, https://github.com/fmtlib/fmt/pull/3040). - Thanks to @dimztimz and @hwhsu1231. + Thanks @dimztimz and @hwhsu1231. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/2969, @@ -1266,7 +1266,7 @@ https://github.com/fmtlib/fmt/issues/3052, https://github.com/fmtlib/fmt/pull/3053, https://github.com/fmtlib/fmt/pull/3054). - Thanks to @h-friederich, @dimztimz, @olupton, @bernhardmgruber and @phprus. + Thanks @h-friederich, @dimztimz, @olupton, @bernhardmgruber and @phprus. # 9.0.0 - 2022-07-04 @@ -1298,7 +1298,7 @@ [Dragonbox](https://github.com/jk-jeon/dragonbox), the algorithm used for the default floating-point formatting (https://github.com/fmtlib/fmt/pull/2713, - https://github.com/fmtlib/fmt/pull/2750). Thanks to @jk-jeon. + https://github.com/fmtlib/fmt/pull/2750). Thanks @jk-jeon. - Made `fmt::to_string` work with `__float128`. This uses the internal FP formatter and works even on system without `__float128` support @@ -1374,7 +1374,7 @@ variant(42) - Thanks to @jehelset. + Thanks @jehelset. - Added experimental `std::filesystem::path` formatting support (https://github.com/fmtlib/fmt/issues/2865, @@ -1396,7 +1396,7 @@ There is no place like "/home". - Thanks to @phprus. + Thanks @phprus. - Added a `std::thread::id` formatter to `fmt/std.h`. For example ([godbolt](https://godbolt.org/z/j1azbYf3E)): @@ -1432,11 +1432,11 @@ ![](https://user-images.githubusercontent.com/576385/175071215-12809244-dab0-4005-96d8-7cd911c964d5.png) - Thanks to @rbrugo. + Thanks @rbrugo. - Made `fmt::print` overload for text styles correctly handle UTF-8 (https://github.com/fmtlib/fmt/issues/2681, - https://github.com/fmtlib/fmt/pull/2701). Thanks to @AlexGuteniev. + https://github.com/fmtlib/fmt/pull/2701). Thanks @AlexGuteniev. - Fixed Unicode handling when writing to an ostream. @@ -1455,38 +1455,38 @@ prints `[0xa, 0x14, 0x1e]`. - Thanks to @BRevzin. + Thanks @BRevzin. - Implemented escaping of wide strings in ranges - (https://github.com/fmtlib/fmt/pull/2904). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/2904). Thanks @phprus. - Added support for ranges with `begin` / `end` found via the argument-dependent lookup - (https://github.com/fmtlib/fmt/pull/2807). Thanks to @rbrugo. + (https://github.com/fmtlib/fmt/pull/2807). Thanks @rbrugo. - Fixed formatting of certain kinds of ranges of ranges - (https://github.com/fmtlib/fmt/pull/2787). Thanks to @BRevzin. + (https://github.com/fmtlib/fmt/pull/2787). Thanks @BRevzin. - Fixed handling of maps with element types other than `std::pair` - (https://github.com/fmtlib/fmt/pull/2944). Thanks to @BrukerJWD. + (https://github.com/fmtlib/fmt/pull/2944). Thanks @BrukerJWD. - Made tuple formatter enabled only if elements are formattable (https://github.com/fmtlib/fmt/issues/2939, - https://github.com/fmtlib/fmt/pull/2940). Thanks to @jehelset. + https://github.com/fmtlib/fmt/pull/2940). Thanks @jehelset. - Made `fmt::join` compatible with format string compilation (https://github.com/fmtlib/fmt/issues/2719, - https://github.com/fmtlib/fmt/pull/2720). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/2720). Thanks @phprus. - Made compile-time checks work with named arguments of custom types and `std::ostream` `print` overloads (https://github.com/fmtlib/fmt/issues/2816, https://github.com/fmtlib/fmt/issues/2817, - https://github.com/fmtlib/fmt/pull/2819). Thanks to @timsong-cpp. + https://github.com/fmtlib/fmt/pull/2819). Thanks @timsong-cpp. - Removed `make_args_checked` because it is no longer needed for compile-time checks - (https://github.com/fmtlib/fmt/pull/2760). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/2760). Thanks @phprus. - Removed the following deprecated APIs: `_format`, `arg_join`, the `format_to` overload that takes a memory buffer, `[v]fprintf` that @@ -1505,11 +1505,11 @@ - Made access mode of a created file consistent with `fopen` by setting `S_IWGRP` and `S_IWOTH` - (https://github.com/fmtlib/fmt/pull/2733). Thanks to @arogge. + (https://github.com/fmtlib/fmt/pull/2733). Thanks @arogge. - Removed a redundant buffer resize when formatting to `std::ostream` (https://github.com/fmtlib/fmt/issues/2842, - https://github.com/fmtlib/fmt/pull/2843). Thanks to @jcelerier. + https://github.com/fmtlib/fmt/pull/2843). Thanks @jcelerier. - Made precision computation for strings consistent with width (https://github.com/fmtlib/fmt/issues/2888). @@ -1522,7 +1522,7 @@ - Improved support for systems such as CHERI with extra data stored in pointers (https://github.com/fmtlib/fmt/pull/2932). - Thanks to @davidchisnall. + Thanks @davidchisnall. - Improved documentation (https://github.com/fmtlib/fmt/pull/2706, @@ -1532,7 +1532,7 @@ https://github.com/fmtlib/fmt/pull/2805, https://github.com/fmtlib/fmt/pull/2815, https://github.com/fmtlib/fmt/pull/2924). - Thanks to @BRevzin, @Pokechu22, @setoye, @rtobar, @rbrugo, @anoonD and + Thanks @BRevzin, @Pokechu22, @setoye, @rtobar, @rbrugo, @anoonD and @leha-bot. - Improved build configuration @@ -1543,7 +1543,7 @@ https://github.com/fmtlib/fmt/pull/2907, https://github.com/fmtlib/fmt/pull/2913, https://github.com/fmtlib/fmt/pull/2914). - Thanks to @kambala-decapitator, @mattiasljungstrom, @kieselnb, @nathannaveen + Thanks @kambala-decapitator, @mattiasljungstrom, @kieselnb, @nathannaveen and @Vertexwahn. - Fixed various warnings and compilation issues @@ -1613,7 +1613,7 @@ https://github.com/fmtlib/fmt/pull/2957, https://github.com/fmtlib/fmt/issues/2958, https://github.com/fmtlib/fmt/pull/2960). - Thanks to @matrackif @Tobi823, @ivan-volnov, @VasiliPupkin256, + Thanks @matrackif @Tobi823, @ivan-volnov, @VasiliPupkin256, @federico-busato, @barcharcraz, @jk-jeon, @HazardyKnusperkeks, @dalboris, @seanm, @gsjaardema, @timsong-cpp, @seanm, @frithrah, @chronoxor, @Agga, @madmaxoft, @JurajX, @phprus and @Dani-Hub. @@ -1622,14 +1622,14 @@ - Restored ABI compatibility with version 8.0.x (https://github.com/fmtlib/fmt/issues/2695, - https://github.com/fmtlib/fmt/pull/2696). Thanks to @saraedum. + https://github.com/fmtlib/fmt/pull/2696). Thanks @saraedum. - Fixed chrono formatting on big endian systems (https://github.com/fmtlib/fmt/issues/2698, https://github.com/fmtlib/fmt/pull/2699). - Thanks to @phprus and @xvitaly. + Thanks @phprus and @xvitaly. - Fixed a linkage error with mingw (https://github.com/fmtlib/fmt/issues/2691, - https://github.com/fmtlib/fmt/pull/2692). Thanks to @rbberger. + https://github.com/fmtlib/fmt/pull/2692). Thanks @rbberger. # 8.1.0 - 2022-01-02 @@ -1664,7 +1664,7 @@ FMTFormatterCompile_Y 244 ns 10.5 ns ---------------------------------------------------------------------------- - Thanks to @phprus and @toughengineer. + Thanks @phprus and @toughengineer. - Implemented subsecond formatting for chrono durations (https://github.com/fmtlib/fmt/pull/2623). For example @@ -1680,14 +1680,14 @@ prints \"01.234\". - Thanks to @matrackif. + Thanks @matrackif. - Fixed handling of precision 0 when formatting chrono durations (https://github.com/fmtlib/fmt/issues/2587, - https://github.com/fmtlib/fmt/pull/2588). Thanks to @lukester1975. + https://github.com/fmtlib/fmt/pull/2588). Thanks @lukester1975. - Fixed an overflow on invalid inputs in the `tm` formatter - (https://github.com/fmtlib/fmt/pull/2564). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/2564). Thanks @phprus. - Added `fmt::group_digits` that formats integers with a non-localized digit separator (comma) for groups of three digits. For example @@ -1708,12 +1708,12 @@ - Thanks to @benit8 and @data-man. + Thanks @benit8 and @data-man. - Added experimental support for compile-time floating point formatting (https://github.com/fmtlib/fmt/pull/2426, https://github.com/fmtlib/fmt/pull/2470). It is currently - limited to the header-only mode. Thanks to @alexezeder. + limited to the header-only mode. Thanks @alexezeder. - Added UDL-based named argument support to compile-time format string checks (https://github.com/fmtlib/fmt/issues/2640, @@ -1733,7 +1733,7 @@ non-type template parameter support (gcc 10+) because `s` is not a valid format specifier for an integer. - Thanks to @alexezeder. + Thanks @alexezeder. - Implemented escaping of string range elements. For example ([godbolt](https://godbolt.org/z/rKvM1vKf3)): @@ -1757,7 +1757,7 @@ aan"] - Added an experimental `?` specifier for escaping strings. - (https://github.com/fmtlib/fmt/pull/2674). Thanks to @BRevzin. + (https://github.com/fmtlib/fmt/pull/2674). Thanks @BRevzin. - Switched to JSON-like representation of maps and sets for consistency with Python\'s `str.format`. For example @@ -1777,7 +1777,7 @@ {"answer": 42} - Extended `fmt::join` to support C++20-only ranges - (https://github.com/fmtlib/fmt/pull/2549). Thanks to @BRevzin. + (https://github.com/fmtlib/fmt/pull/2549). Thanks @BRevzin. - Optimized handling of non-const-iterable ranges and implemented initial support for non-const-formattable types. @@ -1790,7 +1790,7 @@ `[const] unsigned char*` to C strings. - Deprecated `_format`, a legacy UDL-based format API - (https://github.com/fmtlib/fmt/pull/2646). Thanks to @alexezeder. + (https://github.com/fmtlib/fmt/pull/2646). Thanks @alexezeder. - Marked `format`, `formatted_size` and `to_string` as `[[nodiscard]]` (https://github.com/fmtlib/fmt/pull/2612). @0x8000-0000. @@ -1800,37 +1800,37 @@ explicitly disallowed (https://github.com/fmtlib/fmt/issues/2598, https://github.com/fmtlib/fmt/pull/2609, - https://github.com/fmtlib/fmt/pull/2610). Thanks to @AlexGuteniev. + https://github.com/fmtlib/fmt/pull/2610). Thanks @AlexGuteniev. - Optimized writing to a contiguous buffer with `format_to_n` - (https://github.com/fmtlib/fmt/pull/2489). Thanks to @Roman-Koshelev. + (https://github.com/fmtlib/fmt/pull/2489). Thanks @Roman-Koshelev. - Optimized writing to non-`char` buffers - (https://github.com/fmtlib/fmt/pull/2477). Thanks to @Roman-Koshelev. + (https://github.com/fmtlib/fmt/pull/2477). Thanks @Roman-Koshelev. - Decimal point is now localized when using the `L` specifier. - Improved floating point formatter implementation (https://github.com/fmtlib/fmt/pull/2498, - https://github.com/fmtlib/fmt/pull/2499). Thanks to @Roman-Koshelev. + https://github.com/fmtlib/fmt/pull/2499). Thanks @Roman-Koshelev. - Fixed handling of very large precision in fixed format (https://github.com/fmtlib/fmt/pull/2616). - Made a table of cached powers used in FP formatting static - (https://github.com/fmtlib/fmt/pull/2509). Thanks to @jk-jeon. + (https://github.com/fmtlib/fmt/pull/2509). Thanks @jk-jeon. - Resolved a lookup ambiguity with C++20 format-related functions due to ADL (https://github.com/fmtlib/fmt/issues/2639, - https://github.com/fmtlib/fmt/pull/2641). Thanks to @mkurdej. + https://github.com/fmtlib/fmt/pull/2641). Thanks @mkurdej. - Removed unnecessary inline namespace qualification (https://github.com/fmtlib/fmt/issues/2642, - https://github.com/fmtlib/fmt/pull/2643). Thanks to @mkurdej. + https://github.com/fmtlib/fmt/pull/2643). Thanks @mkurdej. - Implemented argument forwarding in `format_to_n` (https://github.com/fmtlib/fmt/issues/2462, - https://github.com/fmtlib/fmt/pull/2463). Thanks to @owent. + https://github.com/fmtlib/fmt/pull/2463). Thanks @owent. - Fixed handling of implicit conversions in `fmt::to_string` and format string compilation @@ -1844,10 +1844,10 @@ (https://github.com/fmtlib/fmt/issues/2435). - Improved C++14/17 attribute detection - (https://github.com/fmtlib/fmt/pull/2615). Thanks to @AlexGuteniev. + (https://github.com/fmtlib/fmt/pull/2615). Thanks @AlexGuteniev. - Improved `consteval` detection for MSVC - (https://github.com/fmtlib/fmt/pull/2559). Thanks to @DanielaE. + (https://github.com/fmtlib/fmt/pull/2559). Thanks @DanielaE. - Improved documentation (https://github.com/fmtlib/fmt/issues/2406, @@ -1861,7 +1861,7 @@ https://github.com/fmtlib/fmt/pull/2606, https://github.com/fmtlib/fmt/pull/2620, https://github.com/fmtlib/fmt/issues/2676). - Thanks to @sobolevn, @UnePierre, @zhsj, @phprus, @ericcurtin and @Lounarok. + Thanks @sobolevn, @UnePierre, @zhsj, @phprus, @ericcurtin and @Lounarok. - Improved fuzzers and added a fuzzer for chrono timepoint formatting (https://github.com/fmtlib/fmt/pull/2461, @@ -1870,11 +1870,11 @@ - Added the `FMT_SYSTEM_HEADERS` CMake option setting which marks {fmt}\'s headers as system. It can be used to suppress warnings (https://github.com/fmtlib/fmt/issues/2644, - https://github.com/fmtlib/fmt/pull/2651). Thanks to @alexezeder. + https://github.com/fmtlib/fmt/pull/2651). Thanks @alexezeder. - Added the Bazel build system support (https://github.com/fmtlib/fmt/pull/2505, - https://github.com/fmtlib/fmt/pull/2516). Thanks to @Vertexwahn. + https://github.com/fmtlib/fmt/pull/2516). Thanks @Vertexwahn. - Improved build configuration and tests (https://github.com/fmtlib/fmt/issues/2437, @@ -1883,7 +1883,7 @@ https://github.com/fmtlib/fmt/pull/2650, https://github.com/fmtlib/fmt/pull/2663, https://github.com/fmtlib/fmt/pull/2677). - Thanks to @DanielaE, @alexezeder and @phprus. + Thanks @DanielaE, @alexezeder and @phprus. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/pull/2353, @@ -1934,7 +1934,7 @@ https://github.com/fmtlib/fmt/issues/2661, https://github.com/fmtlib/fmt/pull/2664, https://github.com/fmtlib/fmt/pull/2684). - Thanks to @DanielaE, @mwinterb, @cdacamar, @TrebledJ, @bodomartin, @cquammen, + Thanks @DanielaE, @mwinterb, @cdacamar, @TrebledJ, @bodomartin, @cquammen, @white238, @mmarkeloff, @palacaze, @jcelerier, @mborn-adi, @BrukerJWD, @spyridon97, @phprus, @oliverlee, @joshessman-llnl, @akohlmey, @timkalu, @olupton, @Acretock, @alexezeder, @andrewcorrigan, @lucpelletier and @@ -1951,9 +1951,9 @@ - Fixed documentation issues (https://github.com/fmtlib/fmt/pull/2396, https://github.com/fmtlib/fmt/issues/2403, - https://github.com/fmtlib/fmt/issues/2406). Thanks to @mkurdej. + https://github.com/fmtlib/fmt/issues/2406). Thanks @mkurdej. - Removed dead code in FP formatter ( - https://github.com/fmtlib/fmt/pull/2398). Thanks to @javierhonduco. + https://github.com/fmtlib/fmt/pull/2398). Thanks @javierhonduco. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/2351, https://github.com/fmtlib/fmt/issues/2359, @@ -1970,7 +1970,7 @@ https://github.com/fmtlib/fmt/issues/2400, https://github.com/fmtlib/fmt/issues/2401, https://github.com/fmtlib/fmt/pull/2407). - Thanks to @zx2c4, @AidanSun05, @mattiasljungstrom, @joemmett, @erengy, + Thanks @zx2c4, @AidanSun05, @mattiasljungstrom, @joemmett, @erengy, @patlkli, @gsjaardema and @phprus. # 8.0.0 - 2021-06-21 @@ -2021,7 +2021,7 @@ Most of the formatting functionality is available at compile time with a notable exception of floating-point numbers and pointers. - Thanks to @alexezeder. + Thanks @alexezeder. - Optimized handling of format specifiers during format string compilation. For example, hexadecimal formatting (`"{:x}"`) is now @@ -2082,7 +2082,7 @@ It requires compiler support for class types in non-type template parameters (a C++20 feature) which is available in GCC 9.3+. - Thanks to @alexezeder. + Thanks @alexezeder. - Format string compilation now requires `format` functions of `formatter` specializations for user-defined types to be `const`: @@ -2108,11 +2108,11 @@ ``` Here the argument named \"answer\" is resolved at compile time with - no runtime overhead. Thanks to @alexezeder. + no runtime overhead. Thanks @alexezeder. - Added format string compilation support to `fmt::print` (https://github.com/fmtlib/fmt/issues/2280, - https://github.com/fmtlib/fmt/pull/2304). Thanks to @alexezeder. + https://github.com/fmtlib/fmt/pull/2304). Thanks @alexezeder. - Added initial support for compiling {fmt} as a C++20 module (https://github.com/fmtlib/fmt/pull/2235, @@ -2128,18 +2128,18 @@ https://github.com/fmtlib/fmt/pull/2318, https://github.com/fmtlib/fmt/pull/2324, https://github.com/fmtlib/fmt/pull/2332, - https://github.com/fmtlib/fmt/pull/2340). Thanks to @DanielaE. + https://github.com/fmtlib/fmt/pull/2340). Thanks @DanielaE. - Made symbols private by default reducing shared library size (https://github.com/fmtlib/fmt/pull/2301). For example - there was a \~15% reported reduction on one platform. Thanks to @sergiud. + there was a \~15% reported reduction on one platform. Thanks @sergiud. - Optimized includes making the result of preprocessing `fmt/format.h` \~20% smaller with libstdc++/C++20 and slightly improving build times (https://github.com/fmtlib/fmt/issues/1998). - Added support of ranges with non-const `begin` / `end` - (https://github.com/fmtlib/fmt/pull/1953). Thanks to @kitegi. + (https://github.com/fmtlib/fmt/pull/1953). Thanks @kitegi. - Added support of `std::byte` and other formattable types to `fmt::join` (https://github.com/fmtlib/fmt/issues/1981, @@ -2160,7 +2160,7 @@ prints \"42\". - Thanks to @kamibo. + Thanks @kamibo. - Implemented the default format for `std::chrono::system_clock` (https://github.com/fmtlib/fmt/issues/2319, @@ -2175,7 +2175,7 @@ ``` prints \"2021-06-18 15:22:00\" (the output depends on the current - date and time). Thanks to @sunmy2019. + date and time). Thanks @sunmy2019. - Made more chrono specifiers locale independent by default. Use the `'L'` specifier to get localized formatting. For example: @@ -2194,7 +2194,7 @@ - Improved locale handling in chrono formatting (https://github.com/fmtlib/fmt/issues/2337, https://github.com/fmtlib/fmt/pull/2349, - https://github.com/fmtlib/fmt/pull/2350). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/2350). Thanks @phprus. - Deprecated `fmt/locale.h` moving the formatting functions that take a locale to `fmt/format.h` (`char`) and `fmt/xchar` (other @@ -2257,11 +2257,11 @@ - Made the `0` specifier ignored for infinity and NaN (https://github.com/fmtlib/fmt/issues/2305, - https://github.com/fmtlib/fmt/pull/2310). Thanks to @Liedtke. + https://github.com/fmtlib/fmt/pull/2310). Thanks @Liedtke. - Made the hexfloat formatting use the right alignment by default (https://github.com/fmtlib/fmt/issues/2308, - https://github.com/fmtlib/fmt/pull/2317). Thanks to @Liedtke. + https://github.com/fmtlib/fmt/pull/2317). Thanks @Liedtke. - Removed the deprecated numeric alignment (`'='`). Use the `'0'` specifier instead. @@ -2295,7 +2295,7 @@ } ``` - prints \"true\". Thanks to @powercoderlol. + prints \"true\". Thanks @powercoderlol. - Made `fmt::ptr` work with function pointers (https://github.com/fmtlib/fmt/pull/2131). For example: @@ -2308,14 +2308,14 @@ } ``` - Thanks to @mikecrowe. + Thanks @mikecrowe. - The undocumented support for specializing `formatter` for pointer types has been removed. - Fixed `fmt::formatted_size` with format string compilation (https://github.com/fmtlib/fmt/pull/2141, - https://github.com/fmtlib/fmt/pull/2161). Thanks to @alexezeder. + https://github.com/fmtlib/fmt/pull/2161). Thanks @alexezeder. - Fixed handling of empty format strings during format string compilation (https://github.com/fmtlib/fmt/issues/2042): @@ -2324,7 +2324,7 @@ auto s = fmt::format(FMT_COMPILE("")); ``` - Thanks to @alexezeder. + Thanks @alexezeder. - Fixed handling of enums in `fmt::to_string` (https://github.com/fmtlib/fmt/issues/2036). @@ -2370,7 +2370,7 @@ - Fixed moving of `fmt::ostream` that holds buffered data (https://github.com/fmtlib/fmt/issues/2197, - https://github.com/fmtlib/fmt/pull/2198). Thanks to @vtta. + https://github.com/fmtlib/fmt/pull/2198). Thanks @vtta. - Replaced the `fmt::system_error` exception with a function of the same name that constructs `std::system_error` @@ -2382,43 +2382,43 @@ (https://github.com/fmtlib/fmt/issues/2274, https://github.com/fmtlib/fmt/pull/2275). The latter is similar to `std::system_category` but correctly handles UTF-8. - Thanks to @phprus. + Thanks @phprus. - Replaced `fmt::error_code` with `std::error_code` and made it formattable (https://github.com/fmtlib/fmt/issues/2269, https://github.com/fmtlib/fmt/pull/2270, - https://github.com/fmtlib/fmt/pull/2273). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/2273). Thanks @phprus. - Added speech synthesis support (https://github.com/fmtlib/fmt/pull/2206). - Made `format_to` work with a memory buffer that has a custom allocator (https://github.com/fmtlib/fmt/pull/2300). - Thanks to @voxmea. + Thanks @voxmea. - Added `Allocator::max_size` support to `basic_memory_buffer`. - (https://github.com/fmtlib/fmt/pull/1960). Thanks to @phprus. + (https://github.com/fmtlib/fmt/pull/1960). Thanks @phprus. - Added wide string support to `fmt::join` - (https://github.com/fmtlib/fmt/pull/2236). Thanks to @crbrz. + (https://github.com/fmtlib/fmt/pull/2236). Thanks @crbrz. - Made iterators passed to `formatter` specializations via a format context satisfy C++20 `std::output_iterator` requirements (https://github.com/fmtlib/fmt/issues/2156, https://github.com/fmtlib/fmt/pull/2158, https://github.com/fmtlib/fmt/issues/2195, - https://github.com/fmtlib/fmt/pull/2204). Thanks to @randomnetcat. + https://github.com/fmtlib/fmt/pull/2204). Thanks @randomnetcat. - Optimized the `printf` implementation (https://github.com/fmtlib/fmt/pull/1982, https://github.com/fmtlib/fmt/pull/1984, https://github.com/fmtlib/fmt/pull/2016, https://github.com/fmtlib/fmt/pull/2164). - Thanks to @rimathia and @moiwi. + Thanks @rimathia and @moiwi. - Improved detection of `constexpr` `char_traits` (https://github.com/fmtlib/fmt/pull/2246, - https://github.com/fmtlib/fmt/pull/2257). Thanks to @phprus. + https://github.com/fmtlib/fmt/pull/2257). Thanks @phprus. - Fixed writing to `stdout` when it is redirected to `NUL` on Windows (https://github.com/fmtlib/fmt/issues/2080). @@ -2428,7 +2428,7 @@ - Improved `strftime` error handling (https://github.com/fmtlib/fmt/issues/2238, - https://github.com/fmtlib/fmt/pull/2244). Thanks to @yumeyao. + https://github.com/fmtlib/fmt/pull/2244). Thanks @yumeyao. - Stopped using deprecated GCC UDL template extension. @@ -2436,18 +2436,18 @@ (https://github.com/fmtlib/fmt/issues/2096). - Error messages are now passed to assert when exceptions are disabled - (https://github.com/fmtlib/fmt/pull/2145). Thanks to @NobodyXu. + (https://github.com/fmtlib/fmt/pull/2145). Thanks @NobodyXu. - Added the `FMT_MASTER_PROJECT` CMake option to control build and install targets when {fmt} is included via `add_subdirectory` (https://github.com/fmtlib/fmt/issues/2098, https://github.com/fmtlib/fmt/pull/2100). - Thanks to @randomizedthinking. + Thanks @randomizedthinking. - Improved build configuration (https://github.com/fmtlib/fmt/pull/2026, https://github.com/fmtlib/fmt/pull/2122). - Thanks to @luncliff and @ibaned. + Thanks @luncliff and @ibaned. - Fixed various warnings and compilation issues (https://github.com/fmtlib/fmt/issues/1947, @@ -2546,7 +2546,7 @@ https://github.com/fmtlib/fmt/pull/2333, https://github.com/fmtlib/fmt/pull/2338, https://github.com/fmtlib/fmt/pull/2341). - Thanks to @darklukee, @fagg, @killerbot242, @jgopel, @yeswalrus, @Finkman, + Thanks @darklukee, @fagg, @killerbot242, @jgopel, @yeswalrus, @Finkman, @HazardyKnusperkeks, @dkavolis, @concatime, @chronoxor, @summivox, @yNeo, @Apache-HB, @alexezeder, @toojays, @Brainy0207, @vadz, @imsherlock, @phprus, @white238, @yafshar, @BillyDonahue, @jstaahl, @denchat, @DanielaE, @@ -2560,7 +2560,7 @@ https://github.com/fmtlib/fmt/pull/2081, https://github.com/fmtlib/fmt/issues/2084, https://github.com/fmtlib/fmt/pull/2312). - Thanks to @imba-tjd, @0x416c69 and @mordante. + Thanks @imba-tjd, @0x416c69 and @mordante. - Continuous integration and test improvements (https://github.com/fmtlib/fmt/issues/1969, @@ -2574,7 +2574,7 @@ https://github.com/fmtlib/fmt/pull/2256, https://github.com/fmtlib/fmt/pull/2336, https://github.com/fmtlib/fmt/pull/2346). - Thanks to @jgopel, @alexezeder and @DanielaE. + Thanks @jgopel, @alexezeder and @DanielaE. The change log for versions 0.8.0 - 7.1.3 is available [here]( doc/ChangeLog-old.md). From 686339f7c12967975af0381eec7ca1a90af6bfcc Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 30 Jun 2024 10:29:50 -0700 Subject: [PATCH 28/41] Minor cleanup --- include/fmt/base.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 0256f956704bf..976402a42b66c 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -12,7 +12,6 @@ # define FMT_MODULE #endif -// c headers are preferable for performance reasons #ifndef FMT_MODULE # include // CHAR_BIT # include // FILE From 0041a40c1350ba702d475b9c4ad62da77caea164 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 1 Jul 2024 06:02:59 -0700 Subject: [PATCH 29/41] Update version --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5e06b83917b17..82c0fd6a27532 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,4 @@ -# 11.0.0 - TBD +# 11.0.0 - 2024-07-01 - Added `fmt/base.h` which provides a subset of the API with minimal include dependencies and enough functionality to replace all uses of the `printf` From 24c1f886afc35278ba95556345adcb9804f4c4f1 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Mon, 1 Jul 2024 21:24:33 +0500 Subject: [PATCH 30/41] Remove double has_value check (#4040) Signed-off-by: Vladislav Shchapov --- include/fmt/std.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index 01a61cee61fbd..528e4f1caa3ee 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -291,7 +291,7 @@ struct formatter, Char, if (value.has_value()) { out = detail::write(out, "expected("); - out = detail::write_escaped_alternative(out, value.value()); + out = detail::write_escaped_alternative(out, *value); } else { out = detail::write(out, "unexpected("); out = detail::write_escaped_alternative(out, value.error()); From 10f12fd3d270f303c2c1ddcfca7f834a68327ece Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 12:16:55 -0700 Subject: [PATCH 31/41] Bump github/codeql-action from 3.25.3 to 3.25.11 (#4041) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.3 to 3.25.11. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/d39d31e687223d841ef683f52467bd88e9b21c14...b611370bb5703a7efb587f9d136a52ea24c5c38c) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 522f9e1d3bf78..15582407dd517 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -60,6 +60,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 + uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 with: sarif_file: results.sarif From c4f6fa71357b223b0ab8ac29577c6228fde8853d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neboj=C5=A1a=20Cvetkovi=C4=87?= Date: Mon, 1 Jul 2024 15:43:52 -0600 Subject: [PATCH 32/41] fix: Make basic_format_arg::visit() const (#4043) --- include/fmt/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 976402a42b66c..783e03687d7e2 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1760,7 +1760,7 @@ template class basic_format_arg { * `vis(value)` will be called with the value of type `double`. */ template - FMT_CONSTEXPR auto visit(Visitor&& vis) -> decltype(vis(0)) { + FMT_CONSTEXPR auto visit(Visitor&& vis) const -> decltype(vis(0)) { switch (type_) { case detail::type::none_type: break; From 9d946a2fc426f1e1c48c252e55dfadcacf79a3c6 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 4 Jul 2024 04:41:08 +0900 Subject: [PATCH 33/41] Fix compilation errors due to `make_format_args` in gcc 14.1.1 with c++20 (#4042) --- include/fmt/printf.h | 4 ++-- test/printf-test.cc | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/fmt/printf.h b/include/fmt/printf.h index ee4b06fd5e724..072cc6b309d46 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -569,8 +569,8 @@ using wprintf_args = basic_format_args; /// arguments and can be implicitly converted to `printf_args`. template inline auto make_printf_args(T&... args) - -> decltype(make_format_args>(args...)) { - return make_format_args>(args...); + -> decltype(fmt::make_format_args>(args...)) { + return fmt::make_format_args>(args...); } template struct vprintf_args { diff --git a/test/printf-test.cc b/test/printf-test.cc index d3f03b7f3855b..ee5cf0b0e0a11 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -6,6 +6,10 @@ // For the license information refer to format.h. #include "fmt/printf.h" +// include if possible for https://github.com/fmtlib/fmt/pull/4042 +#if FMT_HAS_INCLUDE() && FMT_CPLUSPLUS > 201703L +# include +#endif #include #include From e50c8b6bd870eb743b2cf13850d5aafcf7d1bad8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 4 Jul 2024 07:27:22 -0700 Subject: [PATCH 34/41] Fix disabling Unicode support --- CMakeLists.txt | 6 +++++- test/CMakeLists.txt | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a1f86bcabe9c..e3b35110f8dc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,10 +355,14 @@ endif () add_library(fmt-header-only INTERFACE) add_library(fmt::fmt-header-only ALIAS fmt-header-only) -if (MSVC AND FMT_UNICODE) +if (NOT MSVC) + # Unicode is always supported on compilers other than MSVC. +elseif (FMT_UNICODE) # Unicode support requires compiling with /utf-8. target_compile_options(fmt PUBLIC $<$:/utf-8>) target_compile_options(fmt-header-only INTERFACE $<$:/utf-8>) +else () + target_compile_definitions(fmt PUBLIC FMT_UNICODE=0) endif () target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6f7214a8ff89c..fac82392e439a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -45,6 +45,10 @@ function(add_fmt_test name) add_fmt_executable(${name} ${sources}) target_link_libraries(${name} ${libs}) + if (ADD_FMT_TEST_HEADER_ONLY AND NOT FMT_UNICODE) + target_compile_definitions(${name} PUBLIC FMT_UNICODE=0) + endif () + # Define if certain C++ features can be used. if (FMT_PEDANTIC) target_compile_options(${name} PRIVATE ${PEDANTIC_COMPILE_FLAGS}) From 503e183b9e3284317e5c12ebbf1747b54de33008 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 4 Jul 2024 07:49:58 -0700 Subject: [PATCH 35/41] Bump version and add version validation --- include/fmt/base.h | 4 ++-- support/manage.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 783e03687d7e2..f440cffd20dc9 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -23,7 +23,7 @@ #endif // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 110000 +#define FMT_VERSION 110001 // Detect compiler versions. #if defined(__clang__) && !defined(__ibmxl__) @@ -262,7 +262,7 @@ #ifndef FMT_BEGIN_NAMESPACE # define FMT_BEGIN_NAMESPACE \ namespace fmt { \ - inline namespace v10 { + inline namespace v11 { # define FMT_END_NAMESPACE \ } \ } diff --git a/support/manage.py b/support/manage.py index ae5252fc54c49..928affe25ecc4 100755 --- a/support/manage.py +++ b/support/manage.py @@ -144,6 +144,16 @@ def release(args): if first_section[0] == '\n': first_section.pop(0) + ns_version = None + for line in fileinput.input(os.path.join(fmt_repo.dir, 'base.h')): + m = re.match(r'inline namespace v(.*)', line) + if m: + ns_version = m.group(1) + break + major_version = version.split('.')[0] + if not ns_version or ns_version != major_version: + raise Exception(f'Version mismatch {ns_version} != {major_version}') + # Workaround GitHub-flavored Markdown treating newlines as
. changes = '' code_block = False From 232c6bc4815f4c57361a5cad4eafd21defc107e7 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 4 Jul 2024 08:02:45 -0700 Subject: [PATCH 36/41] Update changelog --- ChangeLog.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 82c0fd6a27532..a4cbbf7a9510e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,17 @@ +# 11.0.1 - TBD + +- Fixed version number in the inline namespace + (https://github.com/fmtlib/fmt/issues/4047). + +- Fixed disabling Unicode support via CMake + (https://github.com/fmtlib/fmt/issues/4051). + +- Fixed deprecated `visit_format_arg` (https://github.com/fmtlib/fmt/pull/4043). + Thanks @nebkat. + +- Removed a redundant check in the formatter for `std::expected` + (https://github.com/fmtlib/fmt/pull/4040). Thanks @phprus. + # 11.0.0 - 2024-07-01 - Added `fmt/base.h` which provides a subset of the API with minimal include From a96259701e1d16e2f8c8299c668e863ec0ac0119 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Fri, 5 Jul 2024 05:24:01 +0500 Subject: [PATCH 37/41] Improve std::complex formatter (#4050) Signed-off-by: Vladislav Shchapov --- include/fmt/std.h | 76 ++++++++++++++++++++++++++++++++++------------- test/std-test.cc | 24 +++++++++++++++ 2 files changed, 79 insertions(+), 21 deletions(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index 528e4f1caa3ee..fb43940bc06f2 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -631,33 +631,67 @@ struct formatter : formatter { #endif // __cpp_lib_atomic_flag_test FMT_EXPORT -template -struct formatter, Char> : nested_formatter { +template struct formatter, Char> { private: - // Functor because C++11 doesn't support generic lambdas. - struct writer { - const formatter, Char>* f; - const std::complex& c; - - template - FMT_CONSTEXPR auto operator()(OutputIt out) -> OutputIt { - if (c.real() != 0) { - auto format_full = detail::string_literal{}; - return fmt::format_to(out, basic_string_view(format_full), - f->nested(c.real()), f->nested(c.imag())); - } - auto format_imag = detail::string_literal{}; - return fmt::format_to(out, basic_string_view(format_imag), - f->nested(c.imag())); + detail::dynamic_format_specs specs_; + + template + FMT_CONSTEXPR auto do_format(const std::complex& c, + detail::dynamic_format_specs& specs, + FormatContext& ctx, OutputIt out) const + -> OutputIt { + if (c.real() != 0) { + *out++ = Char('('); + out = detail::write(out, c.real(), specs, ctx.locale()); + specs.sign = sign::plus; + out = detail::write(out, c.imag(), specs, ctx.locale()); + if (!detail::isfinite(c.imag())) *out++ = Char(' '); + *out++ = Char('i'); + *out++ = Char(')'); + return out; } - }; + out = detail::write(out, c.imag(), specs, ctx.locale()); + if (!detail::isfinite(c.imag())) *out++ = Char(' '); + *out++ = Char('i'); + return out; + } public: + FMT_CONSTEXPR auto parse(basic_format_parse_context& ctx) + -> decltype(ctx.begin()) { + if (ctx.begin() == ctx.end() || *ctx.begin() == '}') return ctx.begin(); + return parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx, + detail::type_constant::value); + } + template - auto format(const std::complex& c, FormatContext& ctx) const + auto format(const std::complex& c, FormatContext& ctx) const -> decltype(ctx.out()) { - return this->write_padded(ctx, writer{this, c}); + auto specs = specs_; + if (specs.width_ref.kind != detail::arg_id_kind::none || + specs.precision_ref.kind != detail::arg_id_kind::none) { + detail::handle_dynamic_spec(specs.width, + specs.width_ref, ctx); + detail::handle_dynamic_spec( + specs.precision, specs.precision_ref, ctx); + } + + if (specs.width == 0) return do_format(c, specs, ctx, ctx.out()); + auto buf = basic_memory_buffer(); + + auto outer_specs = format_specs(); + outer_specs.width = specs.width; + outer_specs.fill = specs.fill; + outer_specs.align = specs.align; + + specs.width = 0; + specs.fill = {}; + specs.align = align::none; + + do_format(c, specs, ctx, basic_appender(buf)); + return detail::write(ctx.out(), + basic_string_view(buf.data(), buf.size()), + outer_specs); } }; diff --git a/test/std-test.cc b/test/std-test.cc index 17c95cfe57ed2..1327fe8279fd2 100644 --- a/test/std-test.cc +++ b/test/std-test.cc @@ -66,10 +66,34 @@ TEST(std_test, thread_id) { } TEST(std_test, complex) { + using limits = std::numeric_limits; + EXPECT_EQ(fmt::format("{}", std::complex(1, limits::quiet_NaN())), + "(1+nan i)"); + EXPECT_EQ(fmt::format("{}", std::complex(1, -limits::infinity())), + "(1-inf i)"); + + EXPECT_EQ(fmt::format("{}", std::complex(1, 2)), "(1+2i)"); + EXPECT_EQ(fmt::format("{}", std::complex(1, 2.2)), "(1+2.2i)"); + EXPECT_EQ(fmt::format("{}", std::complex(1, -2.2)), "(1-2.2i)"); EXPECT_EQ(fmt::format("{}", std::complex(0, 2.2)), "2.2i"); + EXPECT_EQ(fmt::format("{}", std::complex(0, -2.2)), "-2.2i"); + + EXPECT_EQ(fmt::format("{:+}", std::complex(0, 2.2)), "+2.2i"); + EXPECT_EQ(fmt::format("{:+}", std::complex(0, -2.2)), "-2.2i"); + EXPECT_EQ(fmt::format("{:+}", std::complex(1, -2.2)), "(+1-2.2i)"); + EXPECT_EQ(fmt::format("{:+}", std::complex(1, 2.2)), "(+1+2.2i)"); + EXPECT_EQ(fmt::format("{: }", std::complex(1, 2.2)), "( 1+2.2i)"); + EXPECT_EQ(fmt::format("{: }", std::complex(1, -2.2)), "( 1-2.2i)"); + EXPECT_EQ(fmt::format("{:>20.2f}", std::complex(1, 2.2)), " (1.00+2.20i)"); + EXPECT_EQ(fmt::format("{:<20.2f}", std::complex(1, 2.2)), + "(1.00+2.20i) "); + EXPECT_EQ(fmt::format("{:<20.2f}", std::complex(1, -2.2)), + "(1.00-2.20i) "); + EXPECT_EQ(fmt::format("{:<{}.{}f}", std::complex(1, -2.2), 20, 2), + "(1.00-2.20i) "); } #ifdef __cpp_lib_source_location From 2208143accf0917f9952a536c7b135a89c61b681 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 5 Jul 2024 08:20:52 -0700 Subject: [PATCH 38/41] Update changelog --- ChangeLog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index a4cbbf7a9510e..6e8a4d9e8c1a3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,6 +9,10 @@ - Fixed deprecated `visit_format_arg` (https://github.com/fmtlib/fmt/pull/4043). Thanks @nebkat. +- Fixed handling of a sign and improved the `std::complex` formater + (https://github.com/fmtlib/fmt/pull/4034, + https://github.com/fmtlib/fmt/pull/4050). Thanks @tesch1 and @phprus. + - Removed a redundant check in the formatter for `std::expected` (https://github.com/fmtlib/fmt/pull/4040). Thanks @phprus. From e314776c2ea4af846aeef86a3309ce15815c2138 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 5 Jul 2024 08:25:10 -0700 Subject: [PATCH 39/41] Fix version check --- support/manage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/support/manage.py b/support/manage.py index 928affe25ecc4..3467afb0f678e 100755 --- a/support/manage.py +++ b/support/manage.py @@ -145,8 +145,9 @@ def release(args): first_section.pop(0) ns_version = None - for line in fileinput.input(os.path.join(fmt_repo.dir, 'base.h')): - m = re.match(r'inline namespace v(.*)', line) + base_h_path = os.path.join(fmt_repo.dir, 'include', 'fmt', 'base.h') + for line in fileinput.input(base_h_path): + m = re.match(r'\s*inline namespace v(.*) .*', line) if m: ns_version = m.group(1) break From b50e685db996c167e6c831dcef582aba6e14276a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 5 Jul 2024 08:25:31 -0700 Subject: [PATCH 40/41] Update version --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 6e8a4d9e8c1a3..8f165b73f3078 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,4 @@ -# 11.0.1 - TBD +# 11.0.1 - 2024-07-05 - Fixed version number in the inline namespace (https://github.com/fmtlib/fmt/issues/4047). From 7a8b54a0ef7ca1791b0a5491b6e0593e1cf2dd5e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 6 Jul 2024 13:16:32 -0700 Subject: [PATCH 41/41] Don't confuse Glib::ustring with std::string --- include/fmt/base.h | 3 ++- test/format-test.cc | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index f440cffd20dc9..ceb9845591ebe 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -441,7 +441,8 @@ struct is_std_string_like : std::false_type {}; template struct is_std_string_like().find_first_of( typename T::value_type(), 0))>> - : std::true_type {}; + : std::is_convertible().data()), + const typename T::value_type*> {}; // Returns true iff the literal encoding is UTF-8. constexpr auto is_utf8_enabled() -> bool { diff --git a/test/format-test.cc b/test/format-test.cc index 257b6ead7a8f7..a9ef19fc19c81 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -2420,3 +2420,25 @@ TEST(format_test, formatter_overrides_implicit_conversion) { EXPECT_EQ(fmt::format("{}", convertible_to_int()), "x"); EXPECT_EQ(fmt::format("{}", convertible_to_cstring()), "y"); } + +struct ustring { + using value_type = unsigned; + + auto find_first_of(value_type, size_t) const -> size_t; + + auto data() const -> const char*; + auto size() const -> size_t; +}; + +FMT_BEGIN_NAMESPACE +template <> struct formatter : formatter { + auto format(const ustring&, format_context& ctx) const + -> decltype(ctx.out()) { + return formatter::format("ustring", ctx); + } +}; +FMT_END_NAMESPACE + +TEST(format_test, ustring) { + EXPECT_EQ(fmt::format("{}", ustring()), "ustring"); +}