Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] clang-18 #3257

Merged
merged 3 commits into from
Jun 8, 2024
Merged

[FIX] clang-18 #3257

merged 3 commits into from
Jun 8, 2024

Conversation

eseiler
Copy link
Member

@eseiler eseiler commented Jun 7, 2024

I'll update the CI later.
These are some errors I encountered when updating raptor.

eseiler added 2 commits June 7, 2024 20:07
the ignore type is const, ranges::to does not take const
Copy link

vercel bot commented Jun 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
seqan3 ✅ Ready (Inspect) Visit Preview Jun 7, 2024 10:08pm

@seqan-actions seqan-actions added the lint [INTERNAL] signal for linting label Jun 7, 2024
@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Jun 7, 2024
@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Jun 7, 2024
@eseiler eseiler force-pushed the infra/clang-18 branch 2 times, most recently from 6bc2c3e to a93ce7e Compare June 7, 2024 22:05
@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Jun 7, 2024
`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.
@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Jun 7, 2024
Copy link
Contributor

@SGSSGene SGSSGene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo much simpler now!

@eseiler eseiler merged commit 1b672ad into seqan:main Jun 8, 2024
32 checks passed
@eseiler eseiler deleted the infra/clang-18 branch June 8, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants