Skip to content

Commit

Permalink
Merge pull request seqan#3257 from eseiler/infra/clang-18
Browse files Browse the repository at this point in the history
[FIX] clang-18
  • Loading branch information
eseiler authored Jun 8, 2024
2 parents 21c7d04 + de751e3 commit 1b672ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
9 changes: 5 additions & 4 deletions include/seqan3/contrib/parallel/buffer_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <cassert>
#include <cmath>
#include <concepts>
#include <exception>
#include <mutex>
#include <ranges>
#include <seqan3/std/new>
Expand Down Expand Up @@ -334,15 +335,15 @@ class buffer_queue
}

template <typename value2_t>
requires (std::convertible_to<value2_t, value_t>) && (buffer_policy == buffer_queue_policy::fixed) bool
overflow(value2_t &&)
requires (std::convertible_to<value2_t, value_t>) && (buffer_policy == buffer_queue_policy::fixed)
bool overflow(value2_t &&)
{
return false;
}

template <typename value2_t>
requires (std::convertible_to<value2_t, value_t>) && (buffer_policy == buffer_queue_policy::dynamic) bool
overflow(value2_t && value);
requires (std::convertible_to<value2_t, value_t>) && (buffer_policy == buffer_queue_policy::dynamic)
bool overflow(value2_t && value);

//!\brief The buffer that is used as ring buffer.
buffer_t buffer;
Expand Down
14 changes: 4 additions & 10 deletions include/seqan3/core/detail/template_inspection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,8 @@ struct is_type_specialisation_of : public std::false_type
{};

//!\overload
template <typename source_t, template <typename...> typename target_template>
requires (
!std::same_as<transformation_trait_or_t<transfer_template_args_onto<source_t, target_template>, void>, void>)
struct is_type_specialisation_of<source_t, target_template> :
std::is_same<source_t, transfer_template_args_onto_t<source_t, target_template>>
template <template <typename...> typename source_t, typename... source_args>
struct is_type_specialisation_of<source_t<source_args...>, source_t> : public std::true_type
{};

/*!\brief Helper variable template for seqan3::detail::is_type_specialisation_of (unary_type_trait shortcut).
Expand Down Expand Up @@ -169,11 +166,8 @@ struct is_value_specialisation_of : std::false_type
* \see seqan3::detail::is_type_specialisation_of
* \see seqan3::detail::is_value_specialisation_of_v
*/
template <typename source_t, template <auto...> typename target_template>
requires (
!std::same_as<transformation_trait_or_t<transfer_template_vargs_onto<source_t, target_template>, void>, void>)
struct is_value_specialisation_of<source_t, target_template> :
std::is_same<source_t, transfer_template_vargs_onto_t<source_t, target_template>>
template <template <auto...> typename source_t, auto... source_args>
struct is_value_specialisation_of<source_t<source_args...>, source_t> : public std::true_type
{};

/*!\brief Helper variable template for seqan3::detail::is_value_specialisation_of (unary_type_trait shortcut).
Expand Down
7 changes: 4 additions & 3 deletions include/seqan3/io/sam_file/format_sam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,12 @@ inline void format_sam::read_sequence_record(stream_type & stream,
if (std::ranges::distance(sequence) == 0)
throw parse_error{"The sequence information must not be empty."};
if constexpr (!detail::decays_to_ignore_v<id_type>)
{
if (std::ranges::distance(id) == 0)
throw parse_error{"The id information must not be empty."};

if (options.truncate_ids)
id = id | detail::take_until_and_consume(is_space) | ranges::to<id_type>();
if (options.truncate_ids)
id = id | detail::take_until_and_consume(is_space) | ranges::to<id_type>();
}
}

//!\copydoc sequence_file_output_format::write_sequence_record
Expand Down

0 comments on commit 1b672ad

Please sign in to comment.