summaryrefslogtreecommitdiff
path: root/include/dynref.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-02-11 16:12:12 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-02-11 16:12:12 +0100
commitc9741d627dd8ca293fc2819cee9ebe73785969eb (patch)
treedeadfb76c1cd9c768fe2ffa899c0d31b19855aac /include/dynref.h
parente37add3fab8f39b18a69453ee1533e09e7f156de (diff)
Add missing const operators to dynamic_reference[_nocheck]
Diffstat (limited to 'include/dynref.h')
-rw-r--r--include/dynref.h20
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;