diff options
Diffstat (limited to 'options/value.hpp')
-rw-r--r-- | options/value.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
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<detail::value_type_t<t>>(get())); } + element_type const* operator->() const + { + static thread_local element_type last; + last = get(); + return &last; + } private: t def; }; |