[libcxx][NFC] tweaks `incrementable_traits` per review
authorChristopher Di Bella <cjdb@google.com>
Tue, 13 Apr 2021 05:15:10 +0000 (05:15 +0000)
committerChristopher Di Bella <cjdb@google.com>
Tue, 13 Apr 2021 05:20:55 +0000 (05:20 +0000)
One suggestion was missed and is being patched now.

libcxx/include/iterator

index c45a1e5..cddeb9a 100644 (file)
@@ -461,12 +461,12 @@ struct incrementable_traits<_Tp> {
 
 template<class _Tp>
 concept __has_integral_minus =
-  !__has_member_difference_type<_Tp> &&
   requires(const _Tp& __x, const _Tp& __y) {
     { __x - __y } -> integral;
   };
 
 template<__has_integral_minus _Tp>
+requires (!__has_member_difference_type<_Tp>)
 struct incrementable_traits<_Tp> {
   using difference_type = make_signed_t<decltype(declval<_Tp>() - declval<_Tp>())>;
 };