From c9741d627dd8ca293fc2819cee9ebe73785969eb Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 11 Feb 2015 16:12:12 +0100 Subject: Add missing const operators to dynamic_reference[_nocheck] --- include/dynref.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') 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(value); + } + + const T* operator*() const + { + return operator->(); + } }; template @@ -97,6 +107,16 @@ class dynamic_reference_nocheck : public dynamic_reference_base { return operator->(); } + + const T* operator->() const + { + return static_cast(value); + } + + const T* operator*() const + { + return operator->(); + } }; class ModeHandler; -- cgit v1.2.3