Skip to content

Commit

Permalink
expected<void, E>::error() is now mandated to be noexcept.
Browse files Browse the repository at this point in the history
Thanks to cplusplus/draft#5381 ,
this shouldn't be marked as strengthened.
  • Loading branch information
StephanTLavavej committed May 20, 2022
1 parent bb06fa1 commit 45a39ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stl/inc/expected
Original file line number Diff line number Diff line change
Expand Up @@ -973,16 +973,16 @@ public:
}
}

_NODISCARD constexpr const _Err& error() const& noexcept { // strengthened
_NODISCARD constexpr const _Err& error() const& noexcept {
return _Unexpected;
}
_NODISCARD constexpr _Err& error() & noexcept { // strengthened
_NODISCARD constexpr _Err& error() & noexcept {
return _Unexpected;
}
_NODISCARD constexpr const _Err&& error() const&& noexcept { // strengthened
_NODISCARD constexpr const _Err&& error() const&& noexcept {
return _STD move(_Unexpected);
}
_NODISCARD constexpr _Err&& error() && noexcept { // strengthened
_NODISCARD constexpr _Err&& error() && noexcept {
return _STD move(_Unexpected);
}

Expand Down

0 comments on commit 45a39ec

Please sign in to comment.