Skip to content

Commit

Permalink
Use std::swap in noexcept version as per issue #8 (thanks to @rnburn)
Browse files Browse the repository at this point in the history
This is already the case with the non-specialised version.
  • Loading branch information
martinmoene committed Jun 16, 2017
1 parent 2ca4986 commit b74e3a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/nonstd/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ class expected<void, E>

void swap( expected & rhs ) noexcept
(
std::is_nothrow_move_constructible<E>::value && noexcept( swap( std::declval<E&>(), std::declval<E&>() ) )
std::is_nothrow_move_constructible<E>::value && noexcept( std::swap( std::declval<E&>(), std::declval<E&>() ) )
)
{
using std::swap;
Expand Down

0 comments on commit b74e3a9

Please sign in to comment.