diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-02-11 16:12:12 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-02-11 16:12:12 +0100 |
commit | c9741d627dd8ca293fc2819cee9ebe73785969eb (patch) | |
tree | deadfb76c1cd9c768fe2ffa899c0d31b19855aac /include | |
parent | e37add3fab8f39b18a69453ee1533e09e7f156de (diff) |
Add missing const operators to dynamic_reference[_nocheck]
Diffstat (limited to 'include')
-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; |