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
This commit is contained in:
parent
3e4d41ca57
commit
f5ee4f1451
@ -1381,24 +1381,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