[libcxx-commits] [PATCH] D121514: [libc++][format] Improve format-arg-store.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 20 10:32:29 PDT 2022
Mordante marked 5 inline comments as done.
Mordante added inline comments.
================
Comment at: libcxx/include/__format/format_arg_store.h:203-225
+ if constexpr (same_as<_Sp, basic_string_view<typename _Context::char_type>>)
+ // When the _Traits or _Allocator are different an implicit conversion will
+ // fail. Instead of adding special cases to __storage<_Sp> handle the
+ // special case here.
+ //
+ // Note since the input can be an array use the non-member functions to
+ // extract the constructor arguments.
----------------
Mordante wrote:
> vitaut wrote:
> > I think it would be cleaner to move this into the function that does normalization by making it take an argument instead of splitting type and value handling.
> I think I need both for the `basic-format-string` changes. Based on your feedback I'll look at some alternative approaches.
It was easier to let `__make_storage_type` (renamed to `__determine_arg_t`) return the `__arg_t` and let this function do the normalization based on the `__arg_t`. I went with this direction since I use the `__arg_t` in the `basic-format-string`. In that code I've no need for normalization since that code only cares about the types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121514/new/
https://reviews.llvm.org/D121514
More information about the libcxx-commits
mailing list