[libcxx-commits] [PATCH] D88131: adds [concepts.arithmetic]

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 20 18:38:17 PST 2021


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

@CaseyCarter @miscco @ldionne @EricWF I think this has addressed all the comments and should be good to merge.
Input from @CaseyCarter on the new `CheckSubsumption` appreciated, since that check always trips me up.



================
Comment at: libcxx/include/concepts:164
 concept derived_from =
   __is_base_of(_Bp, _Dp) && __is_convertible_to(const volatile _Dp*, const volatile _Bp*);
 
----------------
CaseyCarter wrote:
> Pre-existing: did GCC start supporting `__is_convertible_to` while I wasn't looking, or is this clang-only?
I've done something weird here with Git because D74292 is still open.


================
Comment at: libcxx/test/std/concepts/lang/arithmetic.pass.cpp:75-77
+  struct WithMember {
+    int Sneaky;
+  };
----------------
CaseyCarter wrote:
> None of these `Sneaky` members are used - they could be elided. Of course it's then odd to have a dozen-ish empty `struct`s with different names; you could as well use `EmptyStruct` for all of these. (A type `T` doesn't need to have any members of type `U` for us to form the pointer-to-member type `U T::*`.)
Thanks, that simplifies things a lot!


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

https://reviews.llvm.org/D88131



More information about the libcxx-commits mailing list