comparator: indexed comparator should be const

This commit is contained in:
Danny Robson 2017-06-29 15:28:37 +10:00
parent 01ed956ee4
commit 3f8c490733

View File

@ -61,7 +61,7 @@ namespace util::comparator {
template <typename T>
struct indexed {
constexpr
bool operator() (const T &a, const T &b)
bool operator() (const T &a, const T &b) const
{
for (auto x: util::zip (a, b)) {
const auto &[i,j] = x; // clang-4.0: workaround for segfault.