Swap¶
-
template<typename TValueType, typename TSfinae = void>
struct libsemigroups::Swap¶ Adapter for swapping.
Defined in
adapters.hpp
.This type should be a stateless trivially default constructible with a call operator of signature
void operator()(TValueType const&, TValueType const&)
(possiblynoexcept
,inline
and/orconstexpr
also) which swaps its arguments.- Template Parameters
TValueType – the type of objects to compare.
TSfinae – this template parameter can be used for SFINAE.
Public Functions
-
inline void operator()(TValueType &x, TValueType &y)¶
This call operator swaps
x
andy
using std::swap.