[libcxx-commits] [PATCH] D145853: [libc++][format] range-default-formatter for strings.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 28 09:15:45 PDT 2023


ldionne accepted this revision.
ldionne added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libcxx/include/__format/range_default_formatter.h:180
+  // Using a string_view allows the format function to avoid a copy of the
+  // input range when it's a contigious range.
+  formatter<basic_string_view<_CharT>, _CharT> __underlying_;
----------------



================
Comment at: libcxx/test/std/utilities/format/format.range/format.range.fmtstr/format.functions.tests.h:29-30
+
+  typename Container ::const_iterator begin() const { return str_.begin(); }
+  typename Container ::const_iterator end() const { return str_.end(); }
+
----------------



================
Comment at: libcxx/test/std/utilities/format/format.range/format.range.fmtstr/format.functions.tests.h:44-45
+
+  typename Container ::const_iterator begin() const { return str_.begin(); }
+  typename Container ::const_iterator end() const { return str_.end(); }
+
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145853



More information about the libcxx-commits mailing list