NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
ne_stl_set.h
浏览该文件的文档.
1#ifndef NE_STL_SET_H
2#define NE_STL_SET_H
3#include "ne_stl_build.h"
4#include "phmap.h"
5namespace nstd {
6template <class T>
8template <class T>
10template <class T>
12template <class T, class Hash = hash_default_hash<T>, class Eq = hash_default_eq<T>, class Alloc = Allocator<T>>
13class set : public phmap::flat_hash_set<T, Hash, Eq, Alloc> { // NOLINT
14public:
15 set() {
16 static_assert(std::is_standard_layout<T>::value, "T should be standard layout");
17 static_assert(std::is_standard_layout<set>::value, "set should be standard layout");
18 }
19};
21template <class T,
22 class Hash = hash_default_hash<T>,
23 class Eq = hash_default_eq<T>,
24 class Alloc = Allocator<T>,
25 size_t N = 4, // NOLINT
26 class Mtx = NullMutex>
27class parallel_set : public phmap::parallel_flat_hash_set<T, Hash, Eq, Alloc> { // NOLINT
28public:
30 static_assert(std::is_standard_layout<T>::value, "T should be standard layout");
31 static_assert(std::is_standard_layout<parallel_set>::value, "parallel_set should be standard layout");
32 }
33};
34} // namespace nstd
35#endif
Definition ne_stl_set.h:27
parallel_set()
Definition ne_stl_set.h:29
Definition ne_stl_set.h:13
set()
Definition ne_stl_set.h:15
Definition phmap_base.h:4766
Definition phmap.h:4578
Definition phmap.h:4826
Definition ne_stl_any.h:7
phmap::priv::hash_default_hash< K > hash_default_hash
Definition ne_stl_map.h:7
phmap::priv::hash_default_eq< K > hash_default_eq
Definition ne_stl_map.h:9
phmap::NullMutex NullMutex
Definition ne_stl_map.h:19
phmap::priv::Allocator< K > Allocator
Definition ne_stl_map.h:13
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