diff options
author | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-07-28 09:56:21 +0200 |
---|---|---|
committer | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-08-08 17:24:00 +0200 |
commit | 2fbbf206caf7a2a2940a3c7535a85660b54b6734 (patch) | |
tree | 403fc04a94c835fb2484d470f22bb0d7787f2599 /src | |
parent | 4eec91fcd22a1ff5473f3721feed1f15095682e3 (diff) |
result: remove broken map()
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/result.hpp | 12 |
1 files changed, 0 insertions, 12 deletions
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<T> ok() const { return this->t; } optional<char const *> err() const { return optional<char const *>(this->e); } - template <typename U> - result<U> map(std::function<U(T)> f); - result<T> map_err(std::function<char const *(char const *)> f); }; @@ -56,15 +53,6 @@ struct result<T> Ok(T t) { } template <typename T> -template <typename U> -result<U> result<T>::map(std::function<U(T)> f) { - if (this->is_ok()) { - return Ok<U>(f(this->unwrap())); - } - return Err<U>(this->e); -} - -template <typename T> result<T> result<T>::map_err(std::function<char const *(char const *)> f) { if (this->is_err()) { return Err<T>(f(this->e)); |