12 #ifndef PLSSVM_DETAIL_TYPE_TRAITS_HPP_
13 #define PLSSVM_DETAIL_TYPE_TRAITS_HPP_
18 #include <forward_list>
22 #include <type_traits>
23 #include <type_traits>
24 #include <unordered_map>
25 #include <unordered_set>
33 #define PLSSVM_REQUIRES(...) std::enable_if_t<__VA_ARGS__, bool> = true
57 template <
typename T, std::
size_t I>
58 struct is_array<std::array<T, I>> : std::true_type {};
75 struct is_vector<std::vector<T>> : std::true_type {};
92 struct is_deque<std::deque<T>> : std::true_type {};
103 template <
typename T>
108 template <
typename T>
113 template <
typename T>
120 template <
typename T>
125 template <
typename T>
126 struct is_list<std::list<T>> : std::true_type {};
130 template <
typename T>
136 template <
typename T>
137 constexpr
bool is_sequence_container_v = is_array_v<T> || is_vector_v<T> || is_deque_v<T> || is_forward_list_v<T> || is_list_v<T>;
143 template <
typename T>
148 template <
typename T>
149 struct is_set<std::set<T>> : std::true_type {};
153 template <
typename T>
160 template <
typename T>
165 template <
typename Key,
typename T>
166 struct is_map<std::map<Key, T>> : std::true_type {};
170 template <
typename T>
177 template <
typename T>
182 template <
typename T>
187 template <
typename T>
194 template <
typename T>
199 template <
typename Key,
typename T>
204 template <
typename T>
210 template <
typename T>
217 template <
typename T>
222 template <
typename T>
227 template <
typename T>
234 template <
typename T>
239 template <
typename Key,
typename T>
244 template <
typename T>
251 template <
typename T>
256 template <
typename T>
261 template <
typename T>
268 template <
typename T>
273 template <
typename Key,
typename T>
278 template <
typename T>
284 template <
typename T>
290 template <
typename T>
291 constexpr
bool is_container_v = is_sequence_container_v<T> || is_associative_container_v<T> || is_unordered_associative_container_v<T>;
Namespace containing implementation details. Should not directly be used by users.
Definition: csvm.hpp:27
constexpr bool is_map_v
Type trait to check whether T is a std::map.
Definition: type_traits.hpp:171
constexpr bool is_container_v
Type trait to check whether T is a container.
Definition: type_traits.hpp:291
constexpr bool is_unordered_multiset_v
Type trait to check whether T is a std::unordered_multiset.
Definition: type_traits.hpp:262
constexpr bool is_set_v
Type trait to check whether T is a std::set.
Definition: type_traits.hpp:154
std::remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
Remove the topmost reference- and cv-qualifiers.
Definition: type_traits.hpp:46
constexpr bool is_unordered_multimap_v
Type trait to check whether T is a std::unordered_multimap.
Definition: type_traits.hpp:279
constexpr bool is_unordered_associative_container_v
Type trait to check whether T is a unordered associative container.
Definition: type_traits.hpp:285
constexpr bool is_vector_v
Type trait to check whether T is a std::vector.
Definition: type_traits.hpp:80
constexpr bool is_forward_list_v
Type trait to check whether T is a std::forward_list.
Definition: type_traits.hpp:114
constexpr bool is_multimap_v
Type trait to check whether T is a std::multimap.
Definition: type_traits.hpp:205
constexpr bool is_unordered_map_v
Type trait to check whether T is a std::unordered_map.
Definition: type_traits.hpp:245
constexpr bool always_false_v
Type-dependent expression that always evaluates to false.
Definition: type_traits.hpp:39
constexpr bool is_array_v
Type trait to check whether T is a std::array.
Definition: type_traits.hpp:63
constexpr bool is_deque_v
Type trait to check whether T is a std::deque.
Definition: type_traits.hpp:97
constexpr bool is_sequence_container_v
Type trait to check whether T is a sequence container.
Definition: type_traits.hpp:137
constexpr bool is_list_v
Type trait to check whether T is a std::list.
Definition: type_traits.hpp:131
constexpr bool is_unordered_set_v
Type trait to check whether T is a std::unordered_set.
Definition: type_traits.hpp:228
constexpr bool is_associative_container_v
Type trait to check whether T is a associative container.
Definition: type_traits.hpp:211
constexpr bool is_multiset_v
Type trait to check whether T is a std::multiset.
Definition: type_traits.hpp:188
Type trait to check whether T is a std::array.
Definition: type_traits.hpp:53
Type trait to check whether T is a std::deque.
Definition: type_traits.hpp:87
Type trait to check whether T is a std::forward_list.
Definition: type_traits.hpp:104
Type trait to check whether T is a std::list.
Definition: type_traits.hpp:121
Type trait to check whether T is a std::map.
Definition: type_traits.hpp:161
Type trait to check whether T is a std::multimap.
Definition: type_traits.hpp:195
Type trait to check whether T is a std::multiset.
Definition: type_traits.hpp:178
Type trait to check whether T is a std::set.
Definition: type_traits.hpp:144
Type trait to check whether T is a std::unordered_map.
Definition: type_traits.hpp:235
Type trait to check whether T is a std::unordered_multimap.
Definition: type_traits.hpp:269
Type trait to check whether T is a std::unordered_multiset.
Definition: type_traits.hpp:252
Type trait to check whether T is a std::unordered_set.
Definition: type_traits.hpp:218
Type trait to check whether T is a std::vector.
Definition: type_traits.hpp:70