diff options
Diffstat (limited to 'pkiter.h')
| -rw-r--r-- | pkiter.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -19,8 +19,11 @@ struct pk_iter { #if defined (__cplusplus) template <typename T> struct pk_iter_t : public pk_iter { - operator T&() { - return *reinterpret_cast<T*>(this->data); + operator T*() { + return reinterpret_cast<T*>(this->data); + } + T* operator->() { + return reinterpret_cast<T*>(this->data); } }; #endif |
