From: Attila Molnar Date: Wed, 11 Feb 2015 15:12:12 +0000 (+0100) Subject: Add missing const operators to dynamic_reference[_nocheck] X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=c9741d627dd8ca293fc2819cee9ebe73785969eb;p=user%2Fhenk%2Fcode%2Finspircd.git Add missing const operators to dynamic_reference[_nocheck] --- 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;