24 namespace seqan3::detail
36 SEQAN3_CONCEPT fields_specialisation = is_value_specialisation_of_v<t, fields>;
62 template <
typename field_types,
63 typename field_types_as_ids,
64 typename selected_field_ids,
66 typename ...return_types>
67 struct select_types_with_ids
77 template <
typename field_types,
78 typename field_types_as_ids,
79 typename selected_field_ids,
81 typename ...return_types>
82 using select_types_with_ids_t =
typename select_types_with_ids<field_types,
86 return_types...>::type;
88 template <
typename field_types,
89 typename field_types_as_ids,
90 typename selected_field_ids,
92 typename ...return_types>
93 requires (field_no < selected_field_ids::as_array.
size())
94 struct select_types_with_ids<field_types, field_types_as_ids, selected_field_ids, field_no, return_types...>
97 "You selected a field that was not in field_types_as_ids.");
100 using type = select_types_with_ids_t<field_types,
106 selected_field_ids::as_array[field_no]), field_types>>;
120 template <field f,
typename field_types,
typename field_
ids>
121 auto & get_or_ignore(record<field_types, field_ids> & r)
124 return std::get<field_ids::index_of(f)>(r);
130 template <field f,
typename field_types,
typename field_
ids>
131 auto const & get_or_ignore(record<field_types, field_ids>
const & r)
134 return std::get<field_ids::index_of(f)>(r);
140 template <
size_t i, tuple_like tuple_t>
141 auto & get_or_ignore(tuple_t & t)
143 if constexpr (i < std::tuple_size_v<tuple_t>)
144 return std::get<i>(t);
150 template <
size_t i, tuple_like tuple_t>
151 auto const & get_or_ignore(tuple_t
const & t)
153 if constexpr (i < std::tuple_size_v<tuple_t>)
154 return std::get<i>(t);
169 template <field f,
typename field_types,
typename field_
ids,
typename or_type>
170 decltype(
auto) get_or(record<field_types, field_ids> & r, or_type && or_value)
173 return std::get<field_ids::index_of(f)>(r);
175 return std::forward<or_type>(or_value);
179 template <field f,
typename field_types,
typename field_
ids,
typename or_type>
180 decltype(
auto) get_or(record<field_types, field_ids> const & r, or_type && or_value)
183 return std::get<field_ids::index_of(f)>(r);
185 return std::forward<or_type>(or_value);
189 template <
size_t i,
typename or_type,
typename ...types>
190 decltype(
auto) get_or(
std::tuple<types...> & t, or_type && or_value)
192 if constexpr (i <
sizeof...(types))
193 return std::get<i>(t);
195 return std::forward<or_type>(or_value);
199 template <
size_t i,
typename or_type,
typename ...types>
200 decltype(
auto) get_or(
std::tuple<types...> const & t, or_type && or_value)
202 if constexpr (i <
sizeof...(types))
203 return std::get<i>(t);
205 return std::forward<or_type>(or_value);
214 template <std::ranges::input_range rng_t>
215 inline auto & range_wrap_ignore(rng_t & range)
226 inline auto range_wrap_ignore(ignore_t
const &)
constexpr bool contains
Whether a type occurs in a type list or not.
Definition: traits.hpp:231
typename decltype(detail::at< idx >(list_t{}))::type at
Return the type at given index from the type list.
Definition: traits.hpp:260
constexpr size_t size
The size of a type pack.
Definition: traits.hpp:151
constexpr detail::repeat_fn repeat
A view factory that repeats a given value infinitely.
Definition: repeat.hpp:355
SeqAn specific customisations in the standard namespace.
Adaptations of concepts from the Ranges TS.
Provides the seqan3::record template and the seqan3::field enum.
Type that contains multiple types.
Definition: type_list.hpp:29
Provides seqan3::tuple_like.
Provides traits for seqan3::type_list.
Provides the seqan3::views::repeat.