mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-13 15:48:11 +07:00
26 lines
823 B
C++
26 lines
823 B
C++
/*******************************************************************************
|
|
* This file is part of the "https://github.com/blackmatov/flat.hpp"
|
|
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
|
* Copyright (C) 2019, by Matvey Cherevko (blackmatov@gmail.com)
|
|
******************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
namespace flat_hpp::detail
|
|
{
|
|
template < typename Compare >
|
|
class eq_compare : public Compare {
|
|
public:
|
|
eq_compare() = default;
|
|
|
|
eq_compare(const Compare& compare)
|
|
: Compare(compare) {}
|
|
|
|
template < typename L, typename R >
|
|
bool operator()(const L& l, const R& r) const {
|
|
return !Compare::operator()(l, r)
|
|
&& !Compare::operator()(r, l);
|
|
}
|
|
};
|
|
}
|