From 24723226f19f3a189d6108878020c52ad93ae1f2 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Mon, 17 Dec 2018 19:18:16 +0900 Subject: [PATCH] remove template argument from result::unwrap_or --- toml/result.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/toml/result.hpp b/toml/result.hpp index 1d2e596..7fa6b94 100644 --- a/toml/result.hpp +++ b/toml/result.hpp @@ -396,20 +396,17 @@ struct result return std::move(this->succ.value); } - template - value_type& unwrap_or(U& opt) & + value_type& unwrap_or(value_type& opt) & { if(is_err()) {return opt;} return this->succ.value; } - template - value_type const& unwrap_or(U const& opt) const& + value_type const& unwrap_or(value_type const& opt) const& { if(is_err()) {return opt;} return this->succ.value; } - template - value_type&& unwrap_or(U&& opt) && + value_type&& unwrap_or(value_type opt) && { if(is_err()) {return std::move(opt);} return std::move(this->succ.value);