Skip to content

Commit

Permalink
Small format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wellbelove committed Jul 18, 2024
1 parent 5e351cf commit 1ddc3ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 8 additions & 1 deletion include/etl/expected.h
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ namespace etl
}

//*******************************************
/// Equivalence operator.
/// Equivalence operators.
//*******************************************
template <typename TValue, typename TError, typename TValue2, typename TError2>
ETL_CONSTEXPR14
Expand All @@ -955,6 +955,7 @@ bool operator ==(const etl::expected<TValue, TError>& lhs, const etl::expected<T
return lhs.error() == rhs.error();
}

//*******************************************
template <typename TValue, typename TError, typename TValue2>
ETL_CONSTEXPR14
bool operator ==(const etl::expected<TValue, TError>& lhs, const TValue2& rhs)
Expand All @@ -966,6 +967,7 @@ bool operator ==(const etl::expected<TValue, TError>& lhs, const TValue2& rhs)
return lhs.value() == rhs;
}

//*******************************************
template <typename TValue, typename TError, typename TError2>
ETL_CONSTEXPR14
bool operator ==(const etl::expected<TValue, TError>& lhs, const etl::unexpected<TError2>& rhs)
Expand All @@ -977,34 +979,39 @@ bool operator ==(const etl::expected<TValue, TError>& lhs, const etl::unexpected
return lhs.error() == rhs;
}

//*******************************************
template <typename TError, typename TError2>
ETL_CONSTEXPR14
bool operator ==(const etl::unexpected<TError>& lhs, const etl::unexpected<TError2>& rhs)
{
return lhs.error() == rhs.error();
}

//*******************************************
template <typename TValue, typename TError, typename TValue2, typename TError2>
ETL_CONSTEXPR14
bool operator !=(const etl::expected<TValue, TError>& lhs, const etl::expected<TValue2, TError2>& rhs)
{
return !(lhs == rhs);
}

//*******************************************
template <typename TValue, typename TError, typename TValue2>
ETL_CONSTEXPR14
bool operator !=(const etl::expected<TValue, TError>& lhs, const TValue2& rhs)
{
return !(lhs == rhs);
}

//*******************************************
template <typename TValue, typename TError, typename TError2>
ETL_CONSTEXPR14
bool operator !=(const etl::expected<TValue, TError>& lhs, const etl::unexpected<TError2>& rhs)
{
return !(lhs == rhs);
}

//*******************************************
template <typename TError, typename TError2>
ETL_CONSTEXPR14
bool operator !=(const etl::unexpected<TError>& lhs, const etl::unexpected<TError2>& rhs)
Expand Down
6 changes: 2 additions & 4 deletions test/test_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ SOFTWARE.
#include <numeric>
#include <stdint.h>
#include <vector>

#include <memory>


namespace
{
typedef std::string non_trivial_t;
typedef uint32_t trivial_t;
typedef std::string non_trivial_t;
typedef uint32_t trivial_t;
typedef TestDataM<int> moveable_t;

const size_t SIZE = 10UL;
Expand Down

0 comments on commit 1ddc3ab

Please sign in to comment.