[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
Tue Oct 19 09:51:10 PDT 2021


Mordante added a comment.

In D110494#3068986 <https://reviews.llvm.org/D110494#3068986>, @vitaut wrote:

> Now that the format context is almost always `format_context`, it might be worth adding `[[clang::preferred_name(format_context)]]` to the `basic_format_context` template.

Yes we can also add both `format_context` and `wformat_context`, this seems the way we do it for `string_view`.



================
Comment at: libcxx/include/format:501
 requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
-    __vformat_to(_OutIt __out_it, basic_string_view<_CharT> __fmt,
-                 format_args_t<type_identity_t<_OutIt>, _CharT> __args) {
-  return __format::__vformat_to(
+    __vformat_to_wrapped(
+        _OutIt __out_it, basic_string_view<_CharT> __fmt,
----------------
vitaut wrote:
> Is there a good reason to introduce this function as opposed to having this logic directly in `__vformat_to`?
It was easier for testing, but it seems during cleaning up the patch I never moved it back. Will do so.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110494/new/

https://reviews.llvm.org/D110494



More information about the libcxx-commits mailing list