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

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 28 11:35:23 PST 2023


================
@@ -819,6 +819,19 @@ public:
   _LIBCPP_HIDE_FROM_ABI valarray& operator<<=(const value_type& __x);
   _LIBCPP_HIDE_FROM_ABI valarray& operator>>=(const value_type& __x);
 
+  // The valarray overloads are needed for the types with an implicit
+  // conversion to valarray. For example slice_array.
+  _LIBCPP_HIDE_FROM_ABI valarray& operator*=(const valarray& __v) { return operator*= <valarray>(__v); }
----------------
mordante wrote:

@ldionne There are a lot more functions to convert and a lot more tests to write. I like to discuss this approach before doing that work. It's the intention to do everything in one patch.

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


More information about the libcxx-commits mailing list