forked from facebook/fbthrift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
container_traits_folly.h
86 lines (70 loc) · 3.23 KB
/
container_traits_folly.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* Copyright 2016-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef THRIFT_FATAL_CONTAINER_TRAITS_FOLLY_H_
#define THRIFT_FATAL_CONTAINER_TRAITS_FOLLY_H_ 1
#include <folly/FBString.h>
#include <folly/container/F14Map.h>
#include <folly/container/F14Set.h>
#include <folly/small_vector.h>
#include <folly/sorted_vector_types.h>
#include <thrift/lib/cpp2/reflection/reflection.h>
namespace apache {
namespace thrift {
template <typename C, typename T, typename A, typename S>
struct thrift_string_traits<folly::basic_fbstring<C, T, A, S>>
: thrift_string_traits_std<folly::basic_fbstring<C, T, A, S>> {};
template <class T, std::size_t M, class A, class B, class C>
struct thrift_list_traits<folly::small_vector<T, M, A, B, C>>
: thrift_list_traits_std<folly::small_vector<T, M, A, B, C>> {};
template <typename T, typename C, typename A, typename G, typename CT>
struct thrift_set_traits<folly::sorted_vector_set<T, C, A, G, CT>>
: thrift_set_traits_std<folly::sorted_vector_set<T, C, A, G, CT>> {};
template <
typename K,
typename V,
typename C,
typename A,
typename G,
typename CT>
struct thrift_map_traits<folly::sorted_vector_map<K, V, C, A, G, CT>>
: thrift_map_traits_std<folly::sorted_vector_map<K, V, C, A, G, CT>> {};
template <class K, class H, class E, class A>
struct thrift_set_traits<folly::F14ValueSet<K, H, E, A>>
: thrift_set_traits_std<folly::F14ValueSet<K, H, E, A>> {};
template <class K, class H, class E, class A>
struct thrift_set_traits<folly::F14NodeSet<K, H, E, A>>
: thrift_set_traits_std<folly::F14NodeSet<K, H, E, A>> {};
template <class K, class H, class E, class A>
struct thrift_set_traits<folly::F14VectorSet<K, H, E, A>>
: thrift_set_traits_std<folly::F14VectorSet<K, H, E, A>> {};
template <class K, class H, class E, class A>
struct thrift_set_traits<folly::F14FastSet<K, H, E, A>>
: thrift_set_traits_std<folly::F14FastSet<K, H, E, A>> {};
template <class K, class T, class H, class E, class A>
struct thrift_map_traits<folly::F14ValueMap<K, T, H, E, A>>
: thrift_map_traits_std<folly::F14ValueMap<K, T, H, E, A>> {};
template <class K, class T, class H, class E, class A>
struct thrift_map_traits<folly::F14NodeMap<K, T, H, E, A>>
: thrift_map_traits_std<folly::F14NodeMap<K, T, H, E, A>> {};
template <class K, class T, class H, class E, class A>
struct thrift_map_traits<folly::F14VectorMap<K, T, H, E, A>>
: thrift_map_traits_std<folly::F14VectorMap<K, T, H, E, A>> {};
template <class K, class T, class H, class E, class A>
struct thrift_map_traits<folly::F14FastMap<K, T, H, E, A>>
: thrift_map_traits_std<folly::F14FastMap<K, T, H, E, A>> {};
} // namespace thrift
} // namespace apache
#endif // THRIFT_FATAL_CONTAINER_TRAITS_FOLLY_H_