Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] clang-18: char_traits for non-character-types are deprecated
`seqan3::sam_file_input::dummy_ref_type` uses `seqan::views::repeat_n`, which uses `seqan3::detail::take_exactly`. Depending on the range type, `seqan3::detail::take_exactly` will do different things. The types are checked with `if constexpr (seqan3::detail::is_type_specialisation_of_v<..., ...>)`. `seqan3::detail::is_type_specialisation_of_v` will use `seqan3::detail::`transfer_template_args_onto`, which is a type trait exposing a type member that will lead to valid but deprecated templates being instantiated. E.g., `std::basic_string<seqan3::dna5>` is valid and compiles. However, `std::basic_string` instantiates `std::char_traits<seqan3::dna5>`. `std::char_traits` is only defined for the provided character types and LLVM deprecates other specialisations. In summary, the trait will instantiate `using type = std::basic_string<seqan3::dna5>;`. This then generates a deprecation warning or error (with -Werror). The fix is to simplify `is_type_specialisation_of_v` to not use `transfer_template_args_onto`. Same is done with `is_value_specialisation_of_v`, even though it does not create any warnings/errors. `transfer_template_args_onto` is used in other places, while `transfer_template_vargs_onto` is not.
- Loading branch information