[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
Mon Oct 18 10:49:44 PDT 2021


vitaut added inline comments.


================
Comment at: libcxx/include/__format/formatter.h:184-186
+template <class _CharT, class _Traits, class _Fill>
+_LIBCPP_HIDE_FROM_ABI auto __write_unicode(output_iterator<const _CharT&> auto __out_it,
+                                           basic_string_view<_CharT, _Traits> __str, ptrdiff_t __width,
----------------
I don't think traits are needed in this internal function. It might be better to convert `basic_string_view<_CharT, _Traits>` into `basic_string_view<_CharT>` when calling it and remove `_Traits` here to prevent template bloat.


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