Commit 3ab0691e authored by Max Kellermann's avatar Max Kellermann

Util/Manual: add method Get()

May be more clear than operators.
parent 1e073a19
......@@ -92,20 +92,28 @@ public:
#endif
}
operator T &() {
T &Get() {
return *(T *)data;
}
operator const T &() const {
const T &Get() const {
return *(const T *)data;
}
operator T &() {
return Get();
}
operator const T &() const {
return Get();
}
T *operator->() {
return (T *)data;
return &Get();
}
const T *operator->() const {
return (T *)data;
return &Get();
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment