diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-17 15:00:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-17 15:01:48 +0200 |
commit | 4dd6106bca4ef8b0f7d3ea5d1c8cbe50715f97d4 (patch) | |
tree | dadd2843e78df0b4e41b76e207fa6950e1c63d99 /options/value.hpp | |
parent | c05cdde5231139fc7224e3f92dfbaa407a603d9a (diff) |
options/value: allow for inspecting default value
Diffstat (limited to 'options/value.hpp')
-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; }; |