5 #ifndef VCCC_TYPE_TRAITS_DETAIL_IS_SWAPPABLE_CXX14_HPP_
6 #define VCCC_TYPE_TRAITS_DETAIL_IS_SWAPPABLE_CXX14_HPP_
10 #include <forward_list>
19 #include <type_traits>
20 #include <unordered_map>
21 #include <unordered_set>
33 template<
typename T1,
typename T2>
34 struct is_swappable_with_impl<
std::pair<T1, T2>&, std::pair<T1, T2>&>
35 : conjunction<is_swappable<T1>, is_swappable<T2>> {
39 template<
typename T1,
typename T2>
40 struct is_swappable_with_impl<const
std::pair<T1, T2>&, const std::pair<T1, T2>&>
41 : conjunction<is_swappable<const T1>, is_swappable<const T2>> {
48 template<
typename... Types>
49 struct is_swappable_with_impl<
std::tuple<Types...>&, std::tuple<Types...>&>
50 : conjunction<is_swappable<Types>...> {
51 static constexpr
bool nothrow = conjunction<is_nothrow_swappable<Types>...>
::value;
54 template<
typename... Types>
55 struct is_swappable_with_impl<const
std::tuple<Types...>&, const std::tuple<Types...>&>
56 : conjunction<is_swappable<const Types>...> {
57 static constexpr
bool nothrow = conjunction<is_nothrow_swappable<const Types>...>
::value;
63 template<
typename T,
typename D>
64 struct is_swappable_with_impl<
std::unique_ptr<T, D>&, std::unique_ptr<T, D>&> : is_swappable<D> {
65 static constexpr
bool nothrow =
true;
71 template<
typename CharT,
typename Traits,
typename Allocator>
72 struct is_swappable_with_impl<
std::basic_string<CharT, Traits, Allocator>&, std::basic_string<CharT, Traits, Allocator>&> : std::true_type {
73 static constexpr
bool nothrow =
81 struct is_swappable_with_impl<
std::array<T, 0>&, std::array<T, 0>&> : std::true_type {
82 static constexpr
bool nothrow =
true;
85 template<
typename T, std::
size_t N>
86 struct is_swappable_with_impl<
std::array<T, N>&, std::array<T, N>&> : is_swappable<T> {
93 template<
typename T,
typename Alloc>
94 struct is_swappable_with_impl<
std::deque<T, Alloc>&, std::deque<T, Alloc>&> : std::true_type {
101 template<
typename T,
typename Alloc>
102 struct is_swappable_with_impl<
std::forward_list<T, Alloc>&, std::forward_list<T, Alloc>&> : std::true_type {
109 template<
typename T,
typename Alloc>
110 struct is_swappable_with_impl<
std::list<T, Alloc>&, std::list<T, Alloc>&> : std::true_type {
117 template<
typename T,
typename Alloc>
118 struct is_swappable_with_impl<
std::vector<T, Alloc>&, std::vector<T, Alloc>&> : std::true_type {
119 static constexpr
bool nothrow =
127 template<
typename Key,
typename T,
typename Compare,
typename Alloc>
128 struct is_swappable_with_impl<
std::map<Key, T, Compare, Alloc>&, std::map<Key, T, Compare, Alloc>&> : std::true_type {
129 static constexpr
bool nothrow =
137 template<
typename Key,
typename T,
typename Compare,
typename Alloc>
138 struct is_swappable_with_impl<
std::multimap<Key, T, Compare, Alloc>&, std::multimap<Key, T, Compare, Alloc>&> : std::true_type {
139 static constexpr
bool nothrow =
147 template<
typename Key,
typename Compare,
typename Alloc>
148 struct is_swappable_with_impl<
std::set<Key, Compare, Alloc>&, std::set<Key, Compare, Alloc>&> : std::true_type {
149 static constexpr
bool nothrow =
157 template<
typename Key,
typename Compare,
typename Alloc>
158 struct is_swappable_with_impl<
std::multiset<Key, Compare, Alloc>&, std::multiset<Key, Compare, Alloc>&> : std::true_type {
159 static constexpr
bool nothrow =
167 template<
typename Key,
typename T,
typename Hash,
typename KeyEqual,
typename Alloc>
168 struct is_swappable_with_impl<
std::unordered_map<Key, T, Hash, KeyEqual, Alloc>&, std::unordered_map<Key, T, Hash, KeyEqual, Alloc>&> : std::true_type {
169 static constexpr
bool nothrow =
178 template<
typename Key,
typename T,
typename Hash,
typename KeyEqual,
typename Alloc>
179 struct is_swappable_with_impl<
std::unordered_multimap<Key, T, Hash, KeyEqual, Alloc>&, std::unordered_multimap<Key, T, Hash, KeyEqual, Alloc>&> : std::true_type {
180 static constexpr
bool nothrow =
189 template<
typename Key,
typename Hash,
typename KeyEqual,
typename Alloc>
190 struct is_swappable_with_impl<
std::unordered_set<Key, Hash, KeyEqual, Alloc>&, std::unordered_set<Key, Hash, KeyEqual, Alloc>&> : std::true_type {
191 static constexpr
bool nothrow =
200 template<
typename Key,
typename Hash,
typename KeyEqual,
typename Alloc>
201 struct is_swappable_with_impl<
std::unordered_multiset<Key, Hash, KeyEqual, Alloc>&, std::unordered_multiset<Key, Hash, KeyEqual, Alloc>&> : std::true_type {
202 static constexpr
bool nothrow =
211 template<
typename T,
typename Container>
212 struct is_swappable_with_impl<
std::queue<T, Container>&, std::queue<T, Container>&> : is_swappable<Container> {
219 template<
typename T,
typename Container,
typename Compare>
220 struct is_swappable_with_impl<
std::priority_queue<T, Container, Compare>&, std::priority_queue<T, Container, Compare>&>
221 : conjunction<is_swappable<Container>, is_swappable<Compare>> {
222 static constexpr
bool nothrow = conjunction<is_nothrow_swappable<Container>, is_nothrow_swappable<Compare>>
::value;
228 template<
typename T,
typename Container>
229 struct is_swappable_with_impl<
std::stack<T, Container>&, std::stack<T, Container>&> : is_swappable<Container> {
Definition: matrix.hpp:495
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35