userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
str_icase_containers.hpp
Go to the documentation of this file.
1
#pragma once
2
7
8
#include <unordered_map>
9
#include <unordered_set>
10
11
#include <
userver/utils/algo.hpp
>
12
#include <
userver/utils/str_icase.hpp
>
13
14
USERVER_NAMESPACE_BEGIN
15
16
namespace
utils
{
17
21
template
<
typename
Key,
typename
Value>
22
auto
WithSafeHash
(
const
std::unordered_map<Key, Value>& map) {
23
return
utils::AsContainer<std::unordered_map<Key, Value, utils::StrCaseHash>
>(map);
24
}
25
27
template
<
typename
Key,
typename
Value>
28
auto
WithSafeHash
(std::unordered_map<Key, Value>&& map) {
29
return
utils::AsContainer<std::unordered_map<Key, Value, utils::StrCaseHash>
>(std::move(map));
30
}
31
33
template
<
typename
Key,
typename
Value>
34
auto
WithSafeHash
(
const
std::unordered_multimap<Key, Value>& map) {
35
return
utils::AsContainer<std::unordered_multimap<Key, Value, utils::StrCaseHash>
>(map);
36
}
37
39
template
<
typename
Key,
typename
Value>
40
auto
WithSafeHash
(std::unordered_multimap<Key, Value>&& map) {
41
return
utils::AsContainer<std::unordered_multimap<Key, Value, utils::StrCaseHash>
>(std::move(map));
42
}
43
45
template
<
typename
Key>
46
auto
WithSafeHash
(
const
std::unordered_set<Key>& map) {
47
return
utils::AsContainer<std::unordered_set<Key, utils::StrCaseHash>
>(map);
48
}
49
51
template
<
typename
Key>
52
auto
WithSafeHash
(std::unordered_set<Key>&& map) {
53
return
utils::AsContainer<std::unordered_set<Key, utils::StrCaseHash>
>(std::move(map));
54
}
55
57
template
<
typename
Key>
58
auto
WithSafeHash
(
const
std::unordered_multiset<Key>& map) {
59
return
utils::AsContainer<std::unordered_multiset<Key, utils::StrCaseHash>
>(map);
60
}
61
63
template
<
typename
Key>
64
auto
WithSafeHash
(std::unordered_multiset<Key>&& map) {
65
return
utils::AsContainer<std::unordered_multiset<Key, utils::StrCaseHash>
>(std::move(map));
66
}
67
68
}
// namespace utils
69
70
USERVER_NAMESPACE_END
userver
utils
str_icase_containers.hpp
Generated on
for userver by
Doxygen
1.17.0