22namespace seqan3::detail
27template <
typename list_t,
template <
typename...>
typename output_t>
28struct variant_from_tags;
32template <
template <
typename...>
typename output_t,
typename... ts>
33struct variant_from_tags<type_list<ts...>, output_t>
45template <std::output_iterator<
char> it_t>
46constexpr void write_eol(it_t & it,
bool const add_cr)
64template <
typename format_variant_type>
67 using valid_formats = detail::transfer_template_args_onto_t<format_variant_type, type_list>;
69 bool format_found =
false;
71 if (extension.
size() > 1)
73 extension = extension.
substr(1);
74 detail::for_each<valid_formats>(
77 using fm_type =
typename decltype(fmt)::type;
79 for (
auto const & ext : fm_type::file_extensions)
83 format.template emplace<fm_type>();
92 throw unhandled_extension_error(
"No valid format found for this extension.");
100template <
typename list_t>
101inline constexpr bool has_member_file_extensions =
false;
104template <
template <
typename...>
typename list_t,
typename... ts>
106 requires { ts::file_extensions; },
109inline constexpr bool has_member_file_extensions<list_t<ts...>> =
true;
117template <
typename query_t>
118inline constexpr bool has_type_valid_formats =
false;
121template <
typename query_t>
122 requires requires {
typename query_t::valid_formats; }
123inline constexpr bool has_type_valid_formats<query_t> =
true;
146template <
typename formats_t>
149 static_assert(has_member_file_extensions<formats_t>,
150 "Expects that all formats have a static member file_extensions storing the extensions in a range");
153 detail::for_each<formats_t>(
154 [&extensions](
auto t_identity)
156 using format_t =
typename decltype(t_identity)::type;
T back_inserter(T... args)
Provides exceptions used in the I/O module.
Provides type traits for working with templates.
Provides algorithms for meta programming, parameter packs and seqan3::type_list.