NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
phmap_fwd_decl.h
浏览该文件的文档.
1#if !defined(phmap_fwd_decl_h_guard_)
2#define phmap_fwd_decl_h_guard_
3
4// ---------------------------------------------------------------------------
5// Copyright (c) 2019, Gregory Popovitch - greg7mdp@gmail.com
6//
7// Licensed under the Apache License, Version 2.0 (the "License");
8// you may not use this file except in compliance with the License.
9// You may obtain a copy of the License at
10//
11// https://www.apache.org/licenses/LICENSE-2.0
12// ---------------------------------------------------------------------------
13
14#ifdef _MSC_VER
15 #pragma warning(push)
16 #pragma warning(disable : 4514) // unreferenced inline function has been removed
17 #pragma warning(disable : 4710) // function not inlined
18 #pragma warning(disable : 4711) // selected for automatic inline expansion
19#endif
20
21#include <memory>
22#include <utility>
23
24#if defined(PHMAP_USE_ABSL_HASH) && !defined(ABSL_HASH_HASH_H_)
25 namespace absl { template <class T> struct Hash; };
26#endif
27
28namespace phmap {
29
30#if defined(PHMAP_USE_ABSL_HASH)
31 template <class T> using Hash = ::absl::Hash<T>;
32#else
33 template <class T> struct Hash;
34#endif
35
36 template <class T> struct EqualTo;
37 template <class T> struct Less;
38 template <class T> using Allocator = typename std::allocator<T>;
39 template<class T1, class T2> using Pair = typename std::pair<T1, T2>;
40
41 class NullMutex;
42
43 namespace priv {
44
45 // The hash of an object of type T is computed by using phmap::Hash.
46 template <class T, class E = void>
47 struct HashEq
48 {
51 };
52
53 template <class T>
55
56 template <class T>
58
59 // type alias for std::allocator so we can forward declare without including other headers
60 template <class T>
62
63 // type alias for std::pair so we can forward declare without including other headers
64 template<class T1, class T2>
65 using Pair = typename phmap::Pair<T1, T2>;
66
67 } // namespace priv
68
69 // ------------- forward declarations for hash containers ----------------------------------
70 template <class T,
73 class Alloc = phmap::priv::Allocator<T>> // alias for std::allocator
74 class flat_hash_set;
75
76 template <class K, class V,
79 class Alloc = phmap::priv::Allocator<
80 phmap::priv::Pair<const K, V>>> // alias for std::allocator
81 class flat_hash_map;
82
83 template <class T,
86 class Alloc = phmap::priv::Allocator<T>> // alias for std::allocator
87 class node_hash_set;
88
89 template <class Key, class Value,
92 class Alloc = phmap::priv::Allocator<
93 phmap::priv::Pair<const Key, Value>>> // alias for std::allocator
94 class node_hash_map;
95
96 template <class T,
99 class Alloc = phmap::priv::Allocator<T>, // alias for std::allocator
100 size_t N = 4, // 2**N submaps
101 class Mutex = phmap::NullMutex> // use std::mutex to enable internal locks
103
104 template <class K, class V,
107 class Alloc = phmap::priv::Allocator<
108 phmap::priv::Pair<const K, V>>, // alias for std::allocator
109 size_t N = 4, // 2**N submaps
110 class Mutex = phmap::NullMutex> // use std::mutex to enable internal locks
112
113 template <class T,
116 class Alloc = phmap::priv::Allocator<T>, // alias for std::allocator
117 size_t N = 4, // 2**N submaps
118 class Mutex = phmap::NullMutex> // use std::mutex to enable internal locks
120
121 template <class Key, class Value,
124 class Alloc = phmap::priv::Allocator<
125 phmap::priv::Pair<const Key, Value>>, // alias for std::allocator
126 size_t N = 4, // 2**N submaps
127 class Mutex = phmap::NullMutex> // use std::mutex to enable internal locks
129
130 // ------------- forward declarations for btree containers ----------------------------------
131 template <typename Key, typename Compare = phmap::Less<Key>,
132 typename Alloc = phmap::Allocator<Key>>
133 class btree_set;
134
135 template <typename Key, typename Compare = phmap::Less<Key>,
136 typename Alloc = phmap::Allocator<Key>>
137 class btree_multiset;
138
139 template <typename Key, typename Value, typename Compare = phmap::Less<Key>,
140 typename Alloc = phmap::Allocator<phmap::priv::Pair<const Key, Value>>>
141 class btree_map;
142
143 template <typename Key, typename Value, typename Compare = phmap::Less<Key>,
144 typename Alloc = phmap::Allocator<phmap::priv::Pair<const Key, Value>>>
145 class btree_multimap;
146
147} // namespace phmap
148
149
150#ifdef _MSC_VER
151 #pragma warning(pop)
152#endif
153
154#endif // phmap_fwd_decl_h_guard_
Definition phmap_base.h:4766
Definition btree.h:3966
Definition btree.h:4027
Definition btree.h:3906
Definition btree.h:3847
Definition phmap.h:4640
Definition phmap.h:4578
Definition phmap.h:4770
Definition phmap.h:4704
Definition phmap.h:4879
Definition phmap.h:4826
Definition phmap.h:4993
Definition phmap.h:4937
phmap::NullMutex NullMutex
Definition ne_stl_map.h:19
typename phmap::Pair< T1, T2 > Pair
Definition phmap_fwd_decl.h:65
typename priv::HashEq< T >::Hash hash_default_hash
Definition phmap_fwd_decl.h:54
typename priv::HashEq< T >::Eq hash_default_eq
Definition phmap_fwd_decl.h:57
typename phmap::Allocator< T > Allocator
Definition phmap_fwd_decl.h:61
Definition btree.h:77
typename std::allocator< T > Allocator
Definition phmap_base.h:70
typename std::pair< T1, T2 > Pair
Definition phmap_base.h:72
Definition phmap_base.h:76
Definition phmap_utils.h:139
Definition phmap_fwd_decl.h:48