From c5b6ee6f81227f5363aa8d570129113ff7e77f19 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Wed, 17 Apr 2019 23:43:42 +0900 Subject: [PATCH] feat: add yet another constructor to value to make implementation of parse_value easier --- toml/value.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toml/value.hpp b/toml/value.hpp index 74b2265..ef4bd15 100644 --- a/toml/value.hpp +++ b/toml/value.hpp @@ -572,6 +572,14 @@ class value return *this; } + // for internal use ------------------------------------------------------ + + template::value, std::nullptr_t>::type = nullptr> + value(std::pair> parse_result) + : value(std::move(parse_result.first), std::move(parse_result.second)) + {} + // type checking and casting ============================================ template