Unverified Commit 654e6ef5 authored by Shuhao Zhang's avatar Shuhao Zhang Committed by GitHub
Browse files

feat(op-overload): add notes

parent f47e5fed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@ struct student {
};
bool operator<(const student& a, const student& b) {
  return a.score < b.score || (a.score == b.score && a.name > b.name);
  // 上面省略了 this 指针,完整表达式如下:
  // this->score<a.score||(this->score==a.score&&this->name>a.name);
}
priority_queue<student> pq;
```