58template <
typename field_types,
60 typename selected_field_ids,
72template <
typename field_types,
74 typename selected_field_ids,
81template <
typename field_types,
83 typename selected_field_ids,
86 requires (
field_no < selected_field_ids::as_array.size())
89 static_assert(field_types_as_ids::contains(selected_field_ids::as_array[
field_no]),
90 "You selected a field that was not in field_types_as_ids.");
109template <field f,
typename field_types,
typename field_
ids>
112 if constexpr (field_ids::contains(
f))
113 return std::get<field_ids::index_of(
f)>(
r);
119template <field f,
typename field_types,
typename field_
ids>
122 if constexpr (field_ids::contains(
f))
123 return std::get<field_ids::index_of(
f)>(
r);
129template <
size_t i, tuple_like tuple_t>
133 return std::get<i>(t);
139template <
size_t i, tuple_like tuple_t>
143 return std::get<i>(t);
154template <field f,
typename field_types,
typename field_
ids,
typename or_type>
157 if constexpr (field_ids::contains(
f))
158 return std::get<field_ids::index_of(
f)>(
r);
160 return std::forward<or_type>(
or_value);
164template <field f,
typename field_types,
typename field_
ids,
typename or_type>
167 if constexpr (field_ids::contains(
f))
168 return std::get<field_ids::index_of(
f)>(
r);
170 return std::forward<or_type>(
or_value);
177 if constexpr (
i <
sizeof...(types))
178 return std::get<i>(t);
180 return std::forward<or_type>(
or_value);
187 if constexpr (
i <
sizeof...(types))
188 return std::get<i>(t);
190 return std::forward<or_type>(
or_value);
199template <std::ranges::input_range rng_t>
Auxiliary concept that checks whether a type is a specialisation of seqan3::fields.
Definition detail/record.hpp:32
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 detail/record.hpp:110
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 detail/record.hpp:155
auto & range_wrap_ignore(rng_t &range)
Pass through the reference to the argument in case the argument satisfies std::ranges::input_range.
Definition detail/record.hpp:200
typename decltype(detail::at< idx >(list_t{}))::type at
Return the type at given index from the type list.
Definition type_list/traits.hpp:276
constexpr detail::repeat_fn repeat
A view factory that repeats a given value infinitely.
Definition repeat.hpp:344
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
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:412
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 detail/record.hpp:64
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 detail/record.hpp:79
The class template that file records are based on; behaves like a std::tuple.
Definition record.hpp:190
Type that contains multiple types.
Definition type_list.hpp:26
Provides traits for seqan3::type_list.
Provides seqan3::tuple_like.