diff options
Diffstat (limited to 'include/dynref.h')
-rw-r--r-- | include/dynref.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/dynref.h b/include/dynref.h index 2069a87eb..6e2e17423 100644 --- a/include/dynref.h +++ b/include/dynref.h @@ -79,6 +79,16 @@ class dynamic_reference : public dynamic_reference_base { return operator->(); } + + const T* operator->() const + { + return static_cast<T*>(value); + } + + const T* operator*() const + { + return operator->(); + } }; template<typename T> @@ -97,6 +107,16 @@ class dynamic_reference_nocheck : public dynamic_reference_base { return operator->(); } + + const T* operator->() const + { + return static_cast<T*>(value); + } + + const T* operator*() const + { + return operator->(); + } }; class ModeHandler; |