Skip to content

Commit

Permalink
result: post-fixes to move ctor/assignment (adding noexcept)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Parpart <christian@parpart.family>
  • Loading branch information
christianparpart committed Mar 29, 2024
1 parent 0a80ac7 commit 881f765
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crispy/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class failure
using error_type = E;

constexpr failure(const failure&) = default;
constexpr failure(failure&&) = default;
constexpr failure(failure&&) noexcept = default;

template <typename Err = E>
constexpr explicit failure(Err&& e): _value { std::forward<Err>(e) }
Expand All @@ -36,7 +36,7 @@ class failure
}

constexpr failure& operator=(const failure&) = default;
constexpr failure& operator=(failure&&) = default;
constexpr failure& operator=(failure&&) noexcept = default;

constexpr const E& error() const& noexcept { return _value; }
constexpr E& error() & noexcept { return _value; }
Expand Down

0 comments on commit 881f765

Please sign in to comment.