45 #include <meta/meta.hpp> 53 #define SEQAN_NOT_POD "If you are not going to insert a POD type, use std::tuple instead." 57 template <
typename ...types>
82 template <
typename type0,
typename ...types>
85 static_assert(std::is_pod_v<type0>, SEQAN_NOT_POD);
96 constexpr
bool operator==(
pod_tuple const & rhs)
const noexcept
98 return std::tie(_head, _tail) == std::tie(rhs._head, rhs._tail);
101 constexpr
bool operator!=(
pod_tuple const & rhs)
const noexcept
103 return std::tie(_head, _tail) != std::tie(rhs._head, rhs._tail);
106 constexpr
bool operator<(
pod_tuple const & rhs)
const noexcept
108 return std::tie(_head, _tail) < std::tie(rhs._head, rhs._tail);
111 constexpr
bool operator>(
pod_tuple const & rhs)
const noexcept
113 return std::tie(_head, _tail) > std::tie(rhs._head, rhs._tail);
116 constexpr
bool operator<=(
pod_tuple const & rhs)
const noexcept
118 return std::tie(_head, _tail) <= std::tie(rhs._head, rhs._tail);
121 constexpr
bool operator>=(
pod_tuple const & rhs)
const noexcept
123 return std::tie(_head, _tail) >= std::tie(rhs._head, rhs._tail);
132 template <
typename type0>
135 static_assert(std::is_pod_v<type0>, SEQAN_NOT_POD);
144 constexpr
bool operator==(
pod_tuple const & rhs)
const noexcept
146 return _head == rhs._head;
149 constexpr
bool operator!=(
pod_tuple const & rhs)
const noexcept
151 return _head != rhs._head;
154 constexpr
bool operator<(
pod_tuple const & rhs)
const noexcept
156 return _head < rhs._head;
159 constexpr
bool operator>(
pod_tuple const & rhs)
const noexcept
161 return _head > rhs._head;
164 constexpr
bool operator<=(
pod_tuple const & rhs)
const noexcept
166 return _head <= rhs._head;
169 constexpr
bool operator>=(
pod_tuple const & rhs)
const noexcept
171 return _head >= rhs._head;
180 template <
typename ...types>
189 template <std::size_t i,
typename ...types>
192 requires i <
sizeof...(types)
194 if constexpr (i == 0)
201 template <std::size_t i,
typename ...types>
203 requires i <
sizeof...(types)
205 if constexpr (i == 0)
213 template <std::size_t i,
typename ...types>
215 requires i <
sizeof...(types)
217 if constexpr (i == 0)
218 return std::move(t._head);
224 template <std::size_t i,
typename ...types>
226 requires i <
sizeof...(types)
228 if constexpr (i == 0)
229 return std::move(t._head);
244 template <
typename type,
typename ...types>
247 requires meta::in<meta::list<types...>, type>::value &&
248 (meta::find_index<meta::list<types...>, type>::value ==
249 meta::reverse_find_index<meta::list<types...>, type>::value)
251 return seqan3::get<meta::find_index<meta::list<types...>, type>::value>(t);
255 template <
typename type,
typename ...types>
257 requires meta::in<meta::list<types...>, type>::value &&
258 (meta::find_index<meta::list<types...>, type>::value ==
259 meta::reverse_find_index<meta::list<types...>, type>::value)
261 return seqan3::get<meta::find_index<meta::list<types...>, type>::value>(t);
265 template <
typename type,
typename ...types>
267 requires meta::in<meta::list<types...>, type>::value &&
268 (meta::find_index<meta::list<types...>, type>::value ==
269 meta::reverse_find_index<meta::list<types...>, type>::value)
271 return seqan3::get<meta::find_index<meta::list<types...>, type>::value>(std::move(t));
275 template <
typename type,
typename ...types>
277 requires meta::in<meta::list<types...>, type>::value &&
278 (meta::find_index<meta::list<types...>, type>::value ==
279 meta::reverse_find_index<meta::list<types...>, type>::value)
281 return seqan3::get<meta::find_index<meta::list<types...>, type>::value>(std::move(t));
291 template <std::size_t i,
typename ...types>
293 requires i <
sizeof...(types)
295 return seqan3::get<i>(t);
298 template <std::size_t i,
typename ...types>
300 requires i <
sizeof...(types)
302 return seqan3::get<i>(t);
305 template <std::size_t i,
typename ...types>
307 requires i <
sizeof...(types)
309 return seqan3::get<i>(std::move(t));
312 template <std::size_t i,
typename ...types>
314 requires i <
sizeof...(types)
316 return seqan3::get<i>(std::move(t));
319 template <
typename type,
typename ...types>
321 requires meta::in<meta::list<types...>, type>::value &&
322 (meta::find_index<meta::list<types...>, type>::value ==
323 meta::reverse_find_index<meta::list<types...>, type>::value)
325 return seqan3::get<type>(t);
328 template <
typename type,
typename ...types>
330 requires meta::in<meta::list<types...>, type>::value &&
331 (meta::find_index<meta::list<types...>, type>::value ==
332 meta::reverse_find_index<meta::list<types...>, type>::value)
334 return seqan3::get<type>(t);
337 template <
typename type,
typename ...types>
339 requires meta::in<meta::list<types...>, type>::value &&
340 (meta::find_index<meta::list<types...>, type>::value ==
341 meta::reverse_find_index<meta::list<types...>, type>::value)
343 return seqan3::get<type>(std::move(t));
346 template <
typename type,
typename ...types>
348 requires meta::in<meta::list<types...>, type>::value &&
349 (meta::find_index<meta::list<types...>, type>::value ==
350 meta::reverse_find_index<meta::list<types...>, type>::value)
352 return seqan3::get<type>(std::move(t));
358 template <std::size_t i,
template <
typename...>
typename t,
typename ...types >
359 requires i <
sizeof...(types) &&
361 struct tuple_element<i, t<types...>>
363 using type = meta::at_c<meta::list<types...>, i>;
368 template <
template <
typename...>
typename t,
typename ...types >
370 struct tuple_size<t<types...>> :
371 public std::integral_constant<std::size_t, sizeof...(types)>
SeqAn specific customisations in the standard namespace.
Definition: align_result.hpp:221
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
constexpr auto const & get(detail::configuration< cfg_elements_t... > const &cfg) noexcept
Definition: utility.hpp:364
pod_tuple(types &&...) -> pod_tuple< types... >
User defined deduction guide enables easy use.
Provides C++20 additions to the type_traits header.
cond
Definition: pod_tuple.hpp:58