Files
enduro2d/headers/3rdparty/flat.hpp/detail/eq_compare.hpp
2019-06-03 22:15:10 +07:00

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);
}
};
}