[PATCH] D144331: [libc++][format] Implements formatter thread::id.

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 9 10:38:25 PDT 2023


Mordante marked an inline comment as done.
Mordante added inline comments.


================
Comment at: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp:49
+  std::same_as<typename StringViewT::iterator> auto it = formatter.parse(parse_ctx);
+  assert(it == fmt.end() - (!fmt.empty() && fmt.back() == '}'));
+}
----------------
ldionne wrote:
> This seems a bit clever to me. Can we pass the expected end position as a parameter to the function explicitly? So this would look like `it == fmt.begin() + offset`. If you have this pattern in other places, I'm OK to land the patch as-is but we could have a simple patch to change all of them.
See D147885


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144331



More information about the cfe-commits mailing list