61template <
typename field_types,
62 typename field_types_as_ids,
63 typename selected_field_ids,
65 typename ...return_types>
75template <
typename field_types,
76 typename field_types_as_ids,
77 typename selected_field_ids,
79 typename ...return_types>
86template <
typename field_types,
87 typename field_types_as_ids,
88 typename selected_field_ids,
90 typename ...return_types>
91 requires (field_no < selected_field_ids::as_array.size())
95 "You selected a field that was not in field_types_as_ids.");
104 selected_field_ids::as_array[field_no]), field_types>>;
116template <field f,
typename field_types,
typename field_
ids>
120 return std::get<field_ids::index_of(f)>(r);
126template <field f,
typename field_types,
typename field_
ids>
130 return std::get<field_ids::index_of(f)>(r);
136template <
size_t i, tuple_like tuple_t>
139 if constexpr (i < std::tuple_size_v<tuple_t>)
140 return std::get<i>(t);
146template <
size_t i, tuple_like tuple_t>
149 if constexpr (i < std::tuple_size_v<tuple_t>)
150 return std::get<i>(t);
161template <field f,
typename field_types,
typename field_
ids,
typename or_type>
165 return std::get<field_ids::index_of(f)>(r);
167 return std::forward<or_type>(or_value);
171template <field f,
typename field_types,
typename field_
ids,
typename or_type>
175 return std::get<field_ids::index_of(f)>(r);
177 return std::forward<or_type>(or_value);
181template <
size_t i,
typename or_type,
typename ...types>
184 if constexpr (i <
sizeof...(types))
185 return std::get<i>(t);
187 return std::forward<or_type>(or_value);
191template <
size_t i,
typename or_type,
typename ...types>
194 if constexpr (i <
sizeof...(types))
195 return std::get<i>(t);
197 return std::forward<or_type>(or_value);
206template <std::ranges::input_range rng_t>
Auxiliary concept that checks whether a type is a specialisation of seqan3::fields.
Definition: record.hpp:35
auto & get_or_ignore(record< field_types, field_ids > &r)
Access an element in a std::tuple or seqan3::record; return reference to std::ignore if not contained...
Definition: record.hpp:117
decltype(auto) get_or(record< field_types, field_ids > &r, or_type &&or_value)
Access an element in a std::tuple or seqan3::record; return or_value if not contained.
Definition: record.hpp:162
auto & range_wrap_ignore(rng_t &range)
Pass through the reference to the argument in case the argument satisfies std::ranges::input_range.
Definition: record.hpp:207
constexpr bool contains
Whether a type occurs in a type list or not.
Definition: traits.hpp:255
typename decltype(detail::at< idx >(list_t{}))::type at
Return the type at given index from the type list.
Definition: traits.hpp:284
constexpr detail::repeat_fn repeat
A view factory that repeats a given value infinitely.
Definition: repeat.hpp:347
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
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:429
The <ranges> header from C++20's standard library.
Provides the seqan3::record template and the seqan3::field enum.
Provides the seqan3::views::repeat.
Exposes a subset of types as a seqan3::type_list selected based on their IDs.
Definition: record.hpp:67
typename select_types_with_ids< field_types, field_types_as_ids, selected_field_ids, field_no, return_types... >::type select_types_with_ids_t
Shortcut for seqan3::select_types_with_ids (transformation_trait shortcut).
Definition: record.hpp:84
The class template that file records are based on; behaves like a std::tuple.
Definition: record.hpp:191
Type that contains multiple types.
Definition: type_list.hpp:29
Provides traits for seqan3::type_list.
Provides seqan3::tuple_like.