[flang-commits] [clang] [flang] [compiler-rt] [libunwind] [libc] [clang-tools-extra] [lldb] [libcxx] [llvm] [libc++] Implement ranges::iota (PR #68494)

James E T Smith via flang-commits flang-commits at lists.llvm.org
Mon Jan 15 17:42:04 PST 2024


================
@@ -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;
+  }
----------------
jamesETsmith wrote:

Should be fixed by [2803493](https://github.com/llvm/llvm-project/pull/68494/commits/2803493cba2a05fce5b3379c8ba43989aa4eaf73)

https://github.com/llvm/llvm-project/pull/68494


More information about the flang-commits mailing list