From 27231180ecd5e7162a4f12480b9c45abb6d8fc33 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 7 Dec 2024 10:19:23 +0000 Subject: [PATCH] Work around MSVC error C2580 "multiple versions of a defaulted special member functions are not allowed" --- mlx/array.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mlx/array.h b/mlx/array.h index 8c1f7e933..cc526cd9f 100644 --- a/mlx/array.h +++ b/mlx/array.h @@ -67,7 +67,9 @@ class array { array& operator=(array&& other) && = delete; /** Default copy and move constructors otherwise. */ +#if !defined(_MSC_VER) array& operator=(array&& other) & = default; +#endif array(const array& other) = default; array(array&& other) = default;