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> template <typename T>
struct indexed { struct indexed {
constexpr 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)) { for (auto x: util::zip (a, b)) {
const auto &[i,j] = x; // clang-4.0: workaround for segfault. const auto &[i,j] = x; // clang-4.0: workaround for segfault.