[libcxx-commits] [PATCH] D96664: [libc++][format] Implement formatters.

Victor Zverovich via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 23 16:17:50 PDT 2021


vitaut added inline comments.


================
Comment at: libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp:59-62
+    const CharT* (F::*parse)(PC&) = &F::parse;
+    assert(parse);
+    Out (F::*format)(bool, C&) = &F::format;
+    assert(format);
----------------
Quuxplusone wrote:
> These asserts seem non-standard: I mean, I would by default assume there's no legal guarantee that `&F::parse` compiles at all. `parse` might be a template or overload set.
> @vitaut , what's your understanding and/or intent here? Are user-programmers supposed to be able to take member pointers to the `parse` and `format` callables like this? (I hope not!)
IIRC users have no right to rely on specific signatures of functions in `std` so I would recommend deleting these over-specified asserts.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96664



More information about the libcxx-commits mailing list