42 #include <range/v3/algorithm/equal.hpp> 59 template <std::OutputIterator<
char> it_t>
60 constexpr
void write_eol(it_t & it,
bool const add_cr)
78 template <
typename format_variant_type>
79 void set_format(format_variant_type & format,
80 filesystem::path
const & file_name)
82 using valid_formats = detail::transfer_template_args_onto_t<format_variant_type, type_list>;
84 bool format_found =
false;
85 std::string extension = file_name.extension().string();
86 if (extension.size() > 1)
88 extension = extension.substr(1);
89 meta::for_each(valid_formats{}, [&] (
auto && fmt)
91 using fmt_type = remove_cvref_t<decltype(fmt)>;
93 for (
auto const & ext : fmt_type::file_extensions)
106 throw unhandled_extension_error(
"No valid format found for this extension.");
Provides exceptions used in the I/O module.
Provides C++20 additions to the <iterator> header.
Provides seqan3::type_list and auxiliary metafunctions.
Provides seqan3::type_list and auxiliary metafunctions.
Definition: aligned_sequence_concept.hpp:288
This header includes C++17 filesystem support and imports it into namespace seqan3::filesystem (indep...
::ranges::equal equal
Alias for ranges::equal. Determines if two sets of elements are the same.
Definition: ranges:210