From 4dd6106bca4ef8b0f7d3ea5d1c8cbe50715f97d4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 17 Sep 2016 15:00:25 +0200 Subject: options/value: allow for inspecting default value --- options/value.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'options/value.hpp') 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::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; }; -- cgit v1.2.3