mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Swap can be part of the etl namespace and let ADL do its thing (#1414)
* Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * Swap can be part of the etl namespace and let ADL do its thing --------- Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de> Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com> Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
parent
ff772d4bd1
commit
5ccbc6fbff
@ -1380,24 +1380,25 @@ namespace etl
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Swap etl::expected.
|
||||
//*******************************************
|
||||
template <typename TValue, typename TError>
|
||||
ETL_CONSTEXPR14 void swap(etl::expected<TValue, TError>& lhs, etl::expected<TValue, TError>& rhs)
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Swap etl::unexpected.
|
||||
//*******************************************
|
||||
template <typename TError>
|
||||
ETL_CONSTEXPR14 void swap(etl::unexpected<TError>& lhs, etl::unexpected<TError>& rhs)
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
} // namespace etl
|
||||
|
||||
//*******************************************
|
||||
/// Swap etl::expected.
|
||||
//*******************************************
|
||||
template <typename TValue, typename TError>
|
||||
ETL_CONSTEXPR14 void swap(etl::expected<TValue, TError>& lhs, etl::expected<TValue, TError>& rhs)
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Swap etl::unexpected.
|
||||
//*******************************************
|
||||
template <typename TError>
|
||||
ETL_CONSTEXPR14 void swap(etl::unexpected<TError>& lhs, etl::unexpected<TError>& rhs)
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user