blob: cc51f5ef73240b0ca89a4ec3b7a072c6bb3e44b9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "entry_comparator.h"
namespace vespalib::datastore {
/*
* Copyable comparator wrapper.
*/
class EntryComparatorWrapper {
const EntryComparator &_comp;
public:
EntryComparatorWrapper(const EntryComparator &comp)
: _comp(comp)
{ }
bool operator()(const AtomicEntryRef &lhs, const AtomicEntryRef &rhs) const {
return _comp.less(lhs.load_acquire(), rhs.load_acquire());
}
};
}
|