We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb237ef commit 8821656Copy full SHA for 8821656
cpp/numbertheory/modint.h
@@ -51,15 +51,15 @@ struct modint {
51
return u;
52
}
53
54
+ bool operator==(modint rhs) { return value == rhs.value; }
55
+
56
+ bool operator!=(modint rhs) { return !(*this == rhs); }
57
58
friend modint operator+(modint lhs, modint rhs) { return lhs += rhs; }
59
60
friend modint operator-(modint lhs, modint rhs) { return lhs -= rhs; }
61
62
friend modint operator*(modint lhs, modint rhs) { return lhs *= rhs; }
63
64
friend modint operator/(modint lhs, modint rhs) { return lhs /= rhs; }
-
- friend bool operator==(modint lhs, modint rhs) { return lhs.value == rhs.value; }
- friend bool operator!=(modint lhs, modint rhs) { return lhs.value != rhs.value; }
65
};
0 commit comments