diff options
Diffstat (limited to 'options')
-rw-r--r-- | options/value.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/options/value.hpp b/options/value.hpp index ccec36a4..2d10a2c8 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -166,6 +166,11 @@ public: return detail::value_get_traits<t>::get(val, def); } + t default_value() const + { + return def; + } + operator t() const { return get(); } void reload() override @@ -185,7 +190,7 @@ public: return &last; } private: - t def; + const t def; }; |