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

Victor Zverovich via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 17 06:28:05 PDT 2021


vitaut 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)
----------------
Mordante wrote:
> 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.
> I thought MSVC was heavily based on libfmt.

It was loosely based on {fmt} with important pieces removed for some reason (but partly reintroduced now via PRs and issues).


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