为资源代理添加==运算符

This commit is contained in:
2024-11-24 18:44:50 +08:00
parent aa2e2040dd
commit 58637627ae
2 changed files with 13 additions and 0 deletions

View File

@@ -124,6 +124,10 @@ namespace ling {
T *operator->() {
return resource;
}
bool operator==(const T *const value) {
return this->resource == value;
}
};
/// 资源的只读代理
@@ -172,6 +176,10 @@ namespace ling {
const T *operator->() const {
return resource;
}
bool operator==(const T *const value) {
return this->resource == value;
}
};
} // ling