24namespace seqan3::detail
35concept fields_specialisation = is_value_specialisation_of_v<t, fields>;
61template <
typename field_types,
62 typename field_types_as_ids,
63 typename selected_field_ids,
65 typename... return_types>
66struct select_types_with_ids
69 using type = type_list<return_types...>;
75template <
typename field_types,
76 typename field_types_as_ids,
77 typename selected_field_ids,
79 typename... return_types>
80using select_types_with_ids_t =
81 typename select_types_with_ids<field_types, field_types_as_ids, selected_field_ids, field_no, return_types...>::
84template <
typename field_types,
85 typename field_types_as_ids,
86 typename selected_field_ids,
88 typename... return_types>
89 requires (field_no < selected_field_ids::as_array.size())
90struct select_types_with_ids<field_types, field_types_as_ids, selected_field_ids, field_no, return_types...>
93 "You selected a field that was not in field_types_as_ids.");
96 using type = select_types_with_ids_t<
102 list_traits::at<field_types_as_ids::index_of(selected_field_ids::as_array[field_no]), field_types>>;
112template <field f,
typename field_types,
typename field_
ids>
113auto & get_or_ignore(record<field_types, field_ids> & r)
116 return std::get<field_ids::index_of(f)>(r);
122template <field f,
typename field_types,
typename field_
ids>
123auto const & get_or_ignore(record<field_types, field_ids>
const & r)
126 return std::get<field_ids::index_of(f)>(r);
132template <
size_t i, tuple_like tuple_t>
133auto & get_or_ignore(tuple_t & t)
135 if constexpr (i < std::tuple_size_v<tuple_t>)
136 return std::get<i>(t);
142template <
size_t i, tuple_like tuple_t>
143auto const & get_or_ignore(tuple_t
const & t)
145 if constexpr (i < std::tuple_size_v<tuple_t>)
146 return std::get<i>(t);
157template <field f,
typename field_types,
typename field_
ids,
typename or_type>
158decltype(
auto) get_or(record<field_types, field_ids> & r, or_type && or_value)
161 return std::get<field_ids::index_of(f)>(r);
163 return std::forward<or_type>(or_value);
167template <field f,
typename field_types,
typename field_
ids,
typename or_type>
168decltype(
auto) get_or(record<field_types, field_ids>
const & r, or_type && or_value)
171 return std::get<field_ids::index_of(f)>(r);
173 return std::forward<or_type>(or_value);
177template <
size_t i,
typename or_type,
typename... types>
180 if constexpr (i <
sizeof...(types))
181 return std::get<i>(t);
183 return std::forward<or_type>(or_value);
187template <
size_t i,
typename or_type,
typename... types>
190 if constexpr (i <
sizeof...(types))
191 return std::get<i>(t);
193 return std::forward<or_type>(or_value);
202template <std::ranges::input_range rng_t>
203inline auto & range_wrap_ignore(rng_t & range)
215inline auto range_wrap_ignore(ignore_t
const &)
constexpr bool contains
Whether a type occurs in a type list or not.
Definition: traits.hpp:252
typename decltype(detail::at< idx >(list_t{}))::type at
Return the type at given index from the type list.
Definition: traits.hpp:279
constexpr detail::repeat_fn repeat
A view factory that repeats a given value infinitely.
Definition: repeat.hpp:342
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: configuration.hpp:415
Provides the seqan3::record template and the seqan3::field enum.
Provides the seqan3::views::repeat.
Provides traits for seqan3::type_list.
Provides seqan3::tuple_like.