[libcxx-commits] [PATCH] D110494: [libc++][format][1/6] Reduce binary size.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Sep 26 04:53:12 PDT 2021


Mordante created this revision.
Mordante added reviewers: ldionne, vitaut.
Herald added a subscriber: arichardson.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This removes the `format_args_t` from `<format>` and adjusts the type of
the `format_args` for the `vformat_to` overloads.

The `format_context` uses a `back_insert_iterator<string>` therefore the
new `output_iterator` function uses a `string` as its temporary storage
buffer. This isn't ideal. The next patches in this series will improve
this. These improvements make it easy to also improve `format_to_n` and
`formatted_size`.

This addresses P2216 <https://reviews.llvm.org/P2216> `6. Binary size`.
P2216 <https://reviews.llvm.org/P2216> `5. Compile-time checks` are not part of this change.

Implements parts of:

- P2216 <https://reviews.llvm.org/P2216> std::format improvements

Depends on D103670 <https://reviews.llvm.org/D103670>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110494

Files:
  libcxx/docs/Status/Cxx20Papers.csv
  libcxx/include/format
  libcxx/include/version
  libcxx/test/std/language.support/support.limits/support.limits.general/format.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
  libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
  libcxx/test/std/utilities/format/format.functions/format_tests.h
  libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
  libcxx/test/std/utilities/format/format.functions/vformat.locale.pass.cpp
  libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp
  libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp
  libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110494.375090.patch
Type: text/x-patch
Size: 31271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210926/5dd7bf7f/attachment-0001.bin>


More information about the libcxx-commits mailing list