blob: 2cdef9abca1269d2926a9c58cadc740ea483ae6c (
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
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
namespace vespalib::datastore {
class AtomicEntryRef;
class EntryRef;
}
namespace search::attribute::atomic_utils {
/*
* Helper class to map from atomic value to non-atomic value, e.g.
* from AtomicEntryRef to EntryRef.
*/
template <typename MaybeAtomicValue>
class NonAtomicValue {
public:
using type = MaybeAtomicValue;
};
template <>
class NonAtomicValue<vespalib::datastore::AtomicEntryRef>
{
public:
using type = vespalib::datastore::EntryRef;
};
template <class MaybeAtomicValue>
using NonAtomicValue_t = typename NonAtomicValue<MaybeAtomicValue>::type;
}
|