[libcxx-commits] [libcxx] [RFC][libc++] Fixes valarray proxy type operations. (PR #76528)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 16 10:06:42 PST 2024


================
@@ -12,29 +12,71 @@
 
 // valarray& operator&=(const valarray& v);
 
+// [valarray.syn]/3
+//   Any function returning a valarray<T> is permitted to return an object of
+//   another type, provided all the const member functions of valarray<T> are
+//   also applicable to this type.
+//
+// Libc++ uses this and returns __val_expr<_Expr> for several operations.
+//
+// The const overloads of
+//   valarray::operator[](...) const
+// return propxy objects. These proxies are implicitly convertable to
----------------
ldionne wrote:

```suggestion
// return propxy objects. These proxies are implicitly convertible to
```

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


More information about the libcxx-commits mailing list