Skip to content

Commit

Permalink
Add missing swap implementations for expected (#928)
Browse files Browse the repository at this point in the history
* Fix missing partial specialisation equal operators

* Add missing swap implementations for expected
  • Loading branch information
John Wellbelove committed Jul 20, 2024
1 parent 2d38509 commit 5952f02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/etl/expected.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ namespace etl
#endif

//*******************************************
///
/// Copy assign from etl::expected.
//*******************************************
this_type& operator =(const this_type& other)
{
Expand All @@ -400,7 +400,7 @@ namespace etl

#if ETL_USING_CPP11
//*******************************************
///
/// Move assign from etl::expected.
//*******************************************
this_type& operator =(this_type&& other)
{
Expand Down
8 changes: 4 additions & 4 deletions test/test_type_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,15 @@ namespace
Two
};

CHECK((etl::is_same<etl::make_signed<__underlying_type(ue)>::type, std::make_signed<ue>::type>::value));
CHECK((etl::is_same<etl::make_signed<typename std::underlying_type<ue>::type>::type, std::make_signed<ue>::type>::value));

enum class se : int8_t
{
One,
Two
};

CHECK((etl::is_same<etl::make_signed<__underlying_type(se)>::type, std::make_signed<se>::type>::value));
CHECK((etl::is_same<etl::make_signed<typename std::underlying_type<se>::type>::type, std::make_signed<se>::type>::value));
}

//*************************************************************************
Expand Down Expand Up @@ -636,15 +636,15 @@ namespace
Two
};

CHECK((etl::is_same<etl::make_unsigned<__underlying_type(ue)>::type, std::make_unsigned<ue>::type>::value));
CHECK((etl::is_same<etl::make_unsigned<typename std::underlying_type<ue>::type>::type, std::make_unsigned<ue>::type>::value));

enum class se : int8_t
{
One,
Two
};

CHECK((etl::is_same<etl::make_unsigned<__underlying_type(se)>::type, std::make_unsigned<se>::type>::value));
CHECK((etl::is_same<etl::make_unsigned<typename std::underlying_type<se>::type>::type, std::make_unsigned<se>::type>::value));
}

//*************************************************************************
Expand Down

0 comments on commit 5952f02

Please sign in to comment.