[libcxx-commits] [PATCH] D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>

Victor Zverovich via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 19 12:32:54 PDT 2021


vitaut added inline comments.


================
Comment at: libcxx/include/__format/formatter_string.h:141
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string_view<_CharT, _Traits>, _CharT>
+    : public __format_spec::__formatter_string<_CharT, _Traits> {};
 
----------------
Mordante wrote:
> I even wonder whether we want to drop the `_Traits` here and have no `_Traits` for `__formatter_string`.
> When a string(_view) is stored as `format_arg` the traits and allocator are stripped http://eel.is/c++draft/format#arg-9
Yes, please.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112017



More information about the libcxx-commits mailing list