[libcxx-commits] [PATCH] D96477: [libcxx] adds remaining callable concepts

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 18 11:33:06 PDT 2021


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


================
Comment at: libcxx/test/std/concepts/callable/equiv.compile.pass.cpp:25
+template <class F, class T, class U>
+requires std::equivalence_relation<F, T, U>
+constexpr void ModelsEquivalenceRelation(F, T&&, U&&) noexcept {}
----------------
Quuxplusone wrote:
> Please indent the `requires` line by one indent-level (which I guess is 2 spaces, in the style used by this file, blecch).
> However, as I say below, I'd rather eliminate these functions altogether...
I'm not interested in arguing over whitespace. Once clang-format handles concepts properly, I'll remove the more offensive `// clang-format off`.


================
Comment at: libcxx/test/std/concepts/callable/equiv.compile.pass.cpp:88
+    /// ModelsEquivalenceRelation(Relation::Greater, 0, 0);
+    /// ModelsEquivalenceRelation(Relation::Greater, 0.0, 0);
+    ModelsEquivalenceRelation(Relation::MaybeRelation(), 0, 0);
----------------
Quuxplusone wrote:
> I don't think it's useful to keep these as comments.
> What is your understanding of the requirements on libc++ as a conforming implementation of C++20? Is libc++ //permitted// to reject these lines if they were to be uncommented?
> If we're not permitted to reject them, then we must accept them, and so you might as well uncomment them permanently. OTOH, if they're supposed to be some sort of "library IFNDR," such that a conforming library might reject them, then it makes sense not to uncomment them (but in that case I'd just delete these lines permanently).
They're INFDR, and I want to document that they're not forgotten. See http://eel.is/c++draft/res.on.requirements.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96477



More information about the libcxx-commits mailing list