[libcxx-commits] [PATCH] D120916: [libc++][test] Improves handle formatter.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 3 09:58:36 PST 2022
Mordante created this revision.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Before it only accepted one output iterator type. Now it accepts all
output iterator types as required by BasicFormatter.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D120916
Files:
libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
Index: libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
===================================================================
--- libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
+++ libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
@@ -32,9 +32,7 @@
template <>
struct std::formatter<color> : std::formatter<const char*> {
- auto format(color c, format_context& ctx) {
- return formatter<const char*>::format(color_names[static_cast<int>(c)], ctx);
- }
+ auto format(color c, auto& ctx) { return formatter<const char*>::format(color_names[static_cast<int>(c)], ctx); }
};
void test(std::string expected, std::string_view fmt, color arg) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120916.412753.patch
Type: text/x-patch
Size: 798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220303/d5611af4/attachment.bin>
More information about the libcxx-commits
mailing list