Skip to content

Commit

Permalink
In in-place make_unexpected(), return unexpected created via std::mov…
Browse files Browse the repository at this point in the history
…e() (#67)
  • Loading branch information
martinmoene committed Jun 22, 2024
1 parent dfecb83 commit 5d3c8d3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/nonstd/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1590,9 +1590,7 @@ template
nsel_constexpr14 auto
make_unexpected( nonstd_lite_in_place_t(E), Args &&... args ) -> unexpected_type< typename std::decay<E>::type >
{
return std::forward< unexpected_type< typename std::decay<E>::type > >(
unexpected_type< typename std::decay<E>::type >( nonstd_lite_in_place(E), std::forward<Args>(args)...)
);
return std::move( unexpected_type< typename std::decay<E>::type >( nonstd_lite_in_place(E), std::forward<Args>(args)...) );
}

#if nsel_P0323R <= 3
Expand Down

0 comments on commit 5d3c8d3

Please sign in to comment.