]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/memtable/stl_wrappers.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
10 #include "rocksdb/comparator.h"
11 #include "rocksdb/memtablerep.h"
12 #include "rocksdb/slice.h"
13 #include "util/coding.h"
14 #include "util/murmurhash.h"
17 namespace stl_wrappers
{
21 const MemTableRep::KeyComparator
& compare_
;
22 explicit Base(const MemTableRep::KeyComparator
& compare
)
23 : compare_(compare
) {}
26 struct Compare
: private Base
{
27 explicit Compare(const MemTableRep::KeyComparator
& compare
) : Base(compare
) {}
28 inline bool operator()(const char* a
, const char* b
) const {
29 return compare_(a
, b
) < 0;