[libcxx-commits] [libcxx] 0fcea41 - [libcxx][NFC] tweaks `incrementable_traits` per review

Christopher Di Bella via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 12 22:21:33 PDT 2021


Author: Christopher Di Bella
Date: 2021-04-13T05:20:55Z
New Revision: 0fcea41920cef7414cd55f5fdb2f335f6d2ddb92

URL: https://github.com/llvm/llvm-project/commit/0fcea41920cef7414cd55f5fdb2f335f6d2ddb92
DIFF: https://github.com/llvm/llvm-project/commit/0fcea41920cef7414cd55f5fdb2f335f6d2ddb92.diff

LOG: [libcxx][NFC] tweaks `incrementable_traits` per review

One suggestion was missed and is being patched now.

Added: 
    

Modified: 
    libcxx/include/iterator

Removed: 
    


################################################################################
diff  --git a/libcxx/include/iterator b/libcxx/include/iterator
index c45a1e542f91..cddeb9a5e86e 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -461,12 +461,12 @@ struct incrementable_traits<_Tp> {
 
 template<class _Tp>
 concept __has_integral_minus =
-  !__has_member_
diff erence_type<_Tp> &&
   requires(const _Tp& __x, const _Tp& __y) {
     { __x - __y } -> integral;
   };
 
 template<__has_integral_minus _Tp>
+requires (!__has_member_
diff erence_type<_Tp>)
 struct incrementable_traits<_Tp> {
   using 
diff erence_type = make_signed_t<decltype(declval<_Tp>() - declval<_Tp>())>;
 };


        


More information about the libcxx-commits mailing list