================
@@ -1172,6 +1198,22 @@ struct Proxy {
     requires std::three_way_comparable_with<std::decay_t<T>, std::decay_t<U>> {
     return lhs.data <=> rhs.data;
   }
+
+  // Needed to allow certain types to be weakly_incremental
+  constexpr Proxy& operator++()
+    requires(HasPreIncrementOp<T>)
+  {
+    ++data;
+    return *this;
+  }
+
+  constexpr Proxy operator++(int)
+    requires(HasPostIncrementOp<T>)
+  {
+    Proxy tmp = *this;
+    operator++();
+    return tmp;
+  }
----------------
cjdb wrote:

Please use `std::weakly_incrementable` and `std::incrementable`. You'll also 
need to support `void operator++(int)` for when a type is weakly 
incremenetable, but not incrementable.

https://github.com/llvm/llvm-project/pull/68494
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to