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