From: Marcus Fritzsch Date: Fri, 28 Jul 2017 07:56:21 +0000 (+0200) Subject: result: remove broken map() X-Git-Tag: 4.99.1~223 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=2fbbf206caf7a2a2940a3c7535a85660b54b6734;p=staging%2Fwindowmanager.git result: remove broken map() Signed-off-by: Marcus Fritzsch --- diff --git a/src/result.hpp b/src/result.hpp index 4768d9f..b740a0c 100644 --- a/src/result.hpp +++ b/src/result.hpp @@ -39,9 +39,6 @@ struct result { optional ok() const { return this->t; } optional err() const { return optional(this->e); } - template - result map(std::function f); - result map_err(std::function f); }; @@ -55,15 +52,6 @@ struct result Ok(T t) { return result{nullptr, t}; } -template -template -result result::map(std::function f) { - if (this->is_ok()) { - return Ok(f(this->unwrap())); - } - return Err(this->e); -} - template result result::map_err(std::function f) { if (this->is_err()) {