Swap¶
-
template<typename TValueType, typename = void>
struct libsemigroups::Swap¶ 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.The second template parameter exists for SFINAE in overload resolution.
- tparam TValueType
the type of objects to compare.
Public Functions
-
inline void operator()(TValueType &x, TValueType &y)¶
This call operator swaps
x
andy
using std::swap<TValueType>.