From 6539eddbdb0ed3bd2e4be75b6974988f8c3bc1e1 Mon Sep 17 00:00:00 2001 From: DarkSharpness_XzY <2040703891@qq.com> Date: Fri, 20 Oct 2023 12:13:11 +0800 Subject: [PATCH] =?UTF-8?q?Upd:=20=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=8F=B3?= =?UTF-8?q?=E5=80=BC=E6=9E=84=E9=80=A0=E5=87=BD=E6=95=B0=E5=92=8C=E5=8F=B3?= =?UTF-8?q?=E5=80=BC=E8=B5=8B=E5=80=BC=E3=80=82=E7=84=B6=E5=90=8E=E7=A8=8D?= =?UTF-8?q?=E5=BE=AE=E7=BB=9F=E4=B8=80=E4=BA=86=E4=B8=80=E4=B8=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- int2048.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/int2048.h b/int2048.h index 279576d..de4e5a7 100644 --- a/int2048.h +++ b/int2048.h @@ -25,6 +25,7 @@ public: int2048(long long x); int2048(const std::string &s); int2048(const int2048 &); + int2048(int2048 &&); // 以下给定函数的形式参数类型仅供参考,可自行选择使用常量引用或者不使用引用 // 如果需要,可以自行增加其他所需的函数 @@ -52,11 +53,12 @@ public: // =================================== int2048 &operator=(const int2048 &); + int2048 &operator=(int2048 &&); - int2048 &operator+=(int2048); + int2048 &operator+=(const int2048 &); friend int2048 operator+(int2048, const int2048 &); - int2048 &operator-=(int2048); + int2048 &operator-=(const int2048 &); friend int2048 operator-(int2048, const int2048 &); int2048 &operator*=(const int2048 &);