RavEngine
Loading...
Searching...
No Matches
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 {
49 using Hash = phmap::Hash<T>;
50 using Eq = phmap::EqualTo<T>;
51 };
52
53 template <class T>
54 using hash_default_hash = typename priv::HashEq<T>::Hash;
55
56 template <class T>
57 using hash_default_eq = typename priv::HashEq<T>::Eq;
58
59 // type alias for std::allocator so we can forward declare without including other headers
60 template <class T>
61 using Allocator = typename phmap::Allocator<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,
71 class Hash = phmap::priv::hash_default_hash<T>,
72 class Eq = phmap::priv::hash_default_eq<T>,
73 class Alloc = phmap::priv::Allocator<T>> // alias for std::allocator
74 class flat_hash_set;
75
76 template <class K, class V,
77 class Hash = phmap::priv::hash_default_hash<K>,
78 class Eq = phmap::priv::hash_default_eq<K>,
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,
84 class Hash = phmap::priv::hash_default_hash<T>,
85 class Eq = phmap::priv::hash_default_eq<T>,
86 class Alloc = phmap::priv::Allocator<T>> // alias for std::allocator
87 class node_hash_set;
88
89 template <class Key, class Value,
90 class Hash = phmap::priv::hash_default_hash<Key>,
91 class Eq = phmap::priv::hash_default_eq<Key>,
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,
97 class Hash = phmap::priv::hash_default_hash<T>,
98 class Eq = phmap::priv::hash_default_eq<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,
105 class Hash = phmap::priv::hash_default_hash<K>,
106 class Eq = phmap::priv::hash_default_eq<K>,
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,
114 class Hash = phmap::priv::hash_default_hash<T>,
115 class Eq = phmap::priv::hash_default_eq<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,
122 class Hash = phmap::priv::hash_default_hash<Key>,
123 class Eq = phmap::priv::hash_default_eq<Key>,
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_
A generic couple structure.
Definition GuCookingConvexPolygonsBuilder.cpp:76
Definition phmap_base.h:4773
Definition phmap.h:4308
Definition phmap.h:4246
Definition phmap.h:4436
Definition phmap.h:4372
Definition phmap.h:4545
Definition phmap.h:4492
Definition phmap.h:4659
Definition phmap.h:4603
Definition phmap_base.h:76
Definition phmap_utils.h:149
Definition phmap_fwd_decl.h:48