diff options
author | Geir Storli <geirst@verizonmedia.com> | 2019-09-10 07:43:49 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2019-09-10 07:43:49 +0000 |
commit | 85ca293e655aef7cc00833349e37072768d1a071 (patch) | |
tree | 5866d6685457560a0dd69c17a4cd000ac566e7a3 /vespalib/src | |
parent | 4f3dab0a567010fab1d4629ee7297bf2b8776262 (diff) |
Delay instantiation of enum store dictionary to after unique store is instantiated.
This should ensure that it compiles using clang.
Diffstat (limited to 'vespalib/src')
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store.h | 1 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store.hpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.h b/vespalib/src/vespa/vespalib/datastore/unique_store.h index cbaa6aa7db0..5758c7e3481 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.h @@ -49,6 +49,7 @@ public: UniqueStore(); UniqueStore(std::unique_ptr<IUniqueStoreDictionary> dict); ~UniqueStore(); + void set_dictionary(std::unique_ptr<IUniqueStoreDictionary> dict); UniqueStoreAddResult add(EntryConstRefType value); EntryRef find(EntryConstRefType value); EntryConstRefType get(EntryRef ref) const { return _allocator.get(ref); } diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp index abac2888a34..33830bbe4ab 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp @@ -45,6 +45,13 @@ template <typename EntryT, typename RefT, typename Compare, typename Allocator> UniqueStore<EntryT, RefT, Compare, Allocator>::~UniqueStore() = default; template <typename EntryT, typename RefT, typename Compare, typename Allocator> +void +UniqueStore<EntryT, RefT, Compare, Allocator>::set_dictionary(std::unique_ptr<IUniqueStoreDictionary> dict) +{ + _dict = std::move(dict); +} + +template <typename EntryT, typename RefT, typename Compare, typename Allocator> UniqueStoreAddResult UniqueStore<EntryT, RefT, Compare, Allocator>::add(EntryConstRefType value) { |