summaryrefslogtreecommitdiff
path: root/pkiter.h
diff options
context:
space:
mode:
Diffstat (limited to 'pkiter.h')
-rw-r--r--pkiter.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkiter.h b/pkiter.h
index db7f451..d2694a3 100644
--- a/pkiter.h
+++ b/pkiter.h
@@ -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