25namespace seqan3::detail
30template <
typename list_t,
template <
typename...>
typename output_t>
31struct variant_from_tags;
35template <
template <
typename...>
typename output_t,
typename... ts>
36struct variant_from_tags<type_list<ts...>, output_t>
48template <std::output_iterator<
char> it_t>
49constexpr void write_eol(it_t & it,
bool const add_cr)
67template <
typename format_variant_type>
70 using valid_formats = detail::transfer_template_args_onto_t<format_variant_type, type_list>;
72 bool format_found =
false;
74 if (extension.
size() > 1)
76 extension = extension.
substr(1);
77 detail::for_each<valid_formats>(
80 using fm_type =
typename decltype(fmt)::type;
82 for (
auto const & ext : fm_type::file_extensions)
86 format.template emplace<fm_type>();
95 throw unhandled_extension_error(
"No valid format found for this extension.");
103template <
typename list_t>
104inline constexpr bool has_member_file_extensions =
false;
107template <
template <
typename...>
typename list_t,
typename... ts>
109 requires { ts::file_extensions; },
112inline constexpr bool has_member_file_extensions<list_t<ts...>> =
true;
120template <
typename query_t>
121inline constexpr bool has_type_valid_formats =
false;
124template <
typename query_t>
125 requires requires {
typename query_t::valid_formats; }
126inline constexpr bool has_type_valid_formats<query_t> =
true;
149template <
typename formats_t>
152 static_assert(has_member_file_extensions<formats_t>,
153 "Expects that all formats have a static member file_extensions storing the extensions in a range");
156 detail::for_each<formats_t>(
157 [&extensions](
auto t_identity)
159 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.