[libcxx-commits] [PATCH] D103357: [libc++][format] Add __format_arg_store.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 13 13:30:32 PDT 2021


Mordante added inline comments.


================
Comment at: libcxx/include/__format/format_context.h:63
+  _LIBCPP_INLINE_VISIBILITY
+  basic_format_context(_OutIt __out_it,
+                       basic_format_args<basic_format_context> __args)
----------------
vitaut wrote:
> You could expose `__uglified` public "factory" functions for testing. MSVC is not a great example, they were doing a bunch of things wrong, I would reported this one if I had time.
I thought MSVC was heavily based on libfmt.

I did some investigations and your suggestion seems to work. 
When I make the constructor private I'll need a "factory" or a friend for the internal parts of `<format>`.
So I'll go for a "factory" so the unit tests and internal implementation can share the same function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103357



More information about the libcxx-commits mailing list