From 707edf55646b62d74a3ff3de9acc274687c13e05 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 16 Sep 2016 15:12:05 +0200 Subject: options/value: allow for deref operator C++ expects pointer so let it have it. --- options/value.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/options/value.hpp b/options/value.hpp index 06b231c1..ccec36a4 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -178,6 +178,12 @@ public: emit valueChanged(static_cast>(get())); } + element_type const* operator->() const + { + static thread_local element_type last; + last = get(); + return &last; + } private: t def; }; -- cgit v1.2.3