From 909247c55be9d7141946a99566f9456d6343d529 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:32:50 +0200 Subject: [PATCH 01/21] [FIX] Remove __cpp_nontype_template_parameter_class The correct version would have been __cpp_nontype_template_args >= 201911L. All supported compilers fulfil this. --- include/seqan3/io/sam_file/sam_tag_dictionary.hpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/seqan3/io/sam_file/sam_tag_dictionary.hpp b/include/seqan3/io/sam_file/sam_tag_dictionary.hpp index cd81b8d267..e5de1586c0 100644 --- a/include/seqan3/io/sam_file/sam_tag_dictionary.hpp +++ b/include/seqan3/io/sam_file/sam_tag_dictionary.hpp @@ -70,22 +70,9 @@ inline namespace literals * The purpose of those tags is to fill or query the seqan3::sam_tag_dictionary for a specific key (tag_id) and * retrieve the corresponding value. */ - -#ifdef __cpp_nontype_template_parameter_class template str> // TODO: better handling if too large string is provided? constexpr uint16_t operator""_tag() { -#else // GCC/Clang extension -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpedantic" -template -constexpr uint16_t operator""_tag() -{ - static_assert(std::same_as, "Illegal SAM tag: Type must be char."); - constexpr small_string str{std::array{s...}}; -# pragma GCC diagnostic pop -#endif - static_assert(str.size() == 2, "Illegal SAM tag: Exactly two characters must be given."); constexpr char char0 = str[0]; From a8f17b42f21e830b28dae3227767c5bd58dd214b Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:40:07 +0200 Subject: [PATCH 02/21] [FIX] Unused variables --- .../pairwise/alignment_algorithm.hpp | 1 - .../argument_parser/detail/format_parse.hpp | 5 +- .../parallel/serialised_resource_pool.hpp | 3 - include/seqan3/contrib/stream/bz2_ostream.hpp | 3 +- include/seqan3/contrib/stream/gz_ostream.hpp | 3 +- .../io/sam_file/detail/format_sam_base.hpp | 2 +- include/seqan3/search/fm_index/fm_index.hpp | 2 + .../utility/container/aligned_allocator.hpp | 1 + .../align_config_common_test.cpp | 2 +- .../decorator/gap_decorator_test.cpp | 2 +- .../alignment/scoring/scoring_scheme_test.cpp | 2 +- .../composite/alphabet_variant_test.cpp | 40 +++++----- .../composite/composite_integration_test.cpp | 76 ++++++++++--------- .../container/bitpacked_sequence_test.cpp | 2 +- .../parallel/buffer_queue_parallel_test.cpp | 4 +- .../pipeable_config_element_test.cpp | 1 - .../adaptor_for_view_without_args_test.cpp | 4 +- test/unit/io/sam_file/format_bam_test.cpp | 2 +- .../sam_file_format_test_template.hpp | 2 +- .../io/views/detail/take_until_view_test.cpp | 3 +- .../search_config_common_test.cpp | 2 +- .../search/search_scheme_algorithm_test.cpp | 2 - test/unit/utility/detail/bits_of_test.cpp | 2 - .../unit/utility/simd/simd_algorithm_test.cpp | 4 +- 24 files changed, 80 insertions(+), 90 deletions(-) diff --git a/include/seqan3/alignment/pairwise/alignment_algorithm.hpp b/include/seqan3/alignment/pairwise/alignment_algorithm.hpp index e34df53a5a..74b25999f2 100644 --- a/include/seqan3/alignment/pairwise/alignment_algorithm.hpp +++ b/include/seqan3/alignment/pairwise/alignment_algorithm.hpp @@ -742,7 +742,6 @@ class alignment_algorithm : // if traceback is enabled. if constexpr (traits_t::compute_sequence_alignment) { - auto trace_matrix_it = trace_debug_matrix.begin() + offset; std::ranges::copy( column | std::views::transform( diff --git a/include/seqan3/argument_parser/detail/format_parse.hpp b/include/seqan3/argument_parser/detail/format_parse.hpp index 5c1bb83ea8..3933567154 100644 --- a/include/seqan3/argument_parser/detail/format_parse.hpp +++ b/include/seqan3/argument_parser/detail/format_parse.hpp @@ -64,10 +64,9 @@ class format_parse : public format_base ~format_parse() = default; //!< Defaulted. /*!\brief The constructor of the parse format. - * \param[in] argc_ The number of command line arguments. * \param[in] argv_ The command line arguments to parse. */ - format_parse(int const argc_, std::vector argv_) : argc{argc_ - 1}, argv{std::move(argv_)} + format_parse(int const, std::vector argv_) : argv{std::move(argv_)} {} //!\} @@ -822,8 +821,6 @@ class format_parse : public format_base std::vector> positional_option_calls; //!\brief Keeps track of the number of specified positional options. unsigned positional_option_count{0}; - //!\brief Number of command line arguments. - int argc; //!\brief Vector of command line arguments. std::vector argv; //!\brief Artificial end of argv if \-- was seen. diff --git a/include/seqan3/contrib/parallel/serialised_resource_pool.hpp b/include/seqan3/contrib/parallel/serialised_resource_pool.hpp index 814f53944f..53dbc873dd 100644 --- a/include/seqan3/contrib/parallel/serialised_resource_pool.hpp +++ b/include/seqan3/contrib/parallel/serialised_resource_pool.hpp @@ -43,11 +43,8 @@ struct ResourcePool { unlockWriting(recycled); TValue * ptr = NULL; - unsigned count = 0; while (popBack(ptr, recycled)) { - if (ptr != NULL) - count++; delete ptr; } } diff --git a/include/seqan3/contrib/stream/bz2_ostream.hpp b/include/seqan3/contrib/stream/bz2_ostream.hpp index 50d6311cf3..3a62b67f85 100644 --- a/include/seqan3/contrib/stream/bz2_ostream.hpp +++ b/include/seqan3/contrib/stream/bz2_ostream.hpp @@ -233,7 +233,7 @@ bool basic_bz2_ostreambuf< std::streamsize buffer_size_ ) { - std::streamsize written_byte_size=0, total_written_byte_size = 0; + std::streamsize written_byte_size=0; m_bzip2_stream.next_in=(byte_buffer_type)buffer_; m_bzip2_stream.avail_in=buffer_size_*sizeof(char_type); @@ -248,7 +248,6 @@ bool basic_bz2_ostreambuf< if (m_err == BZ_RUN_OK || m_err == BZ_STREAM_END) { written_byte_size= static_cast(m_output_buffer.size()) - m_bzip2_stream.avail_out; - total_written_byte_size+=written_byte_size; // output buffer is full, dumping to ostream m_ostream.write( (const char_type*) &(m_output_buffer[0]), diff --git a/include/seqan3/contrib/stream/gz_ostream.hpp b/include/seqan3/contrib/stream/gz_ostream.hpp index 74cd6a8e23..611b754538 100644 --- a/include/seqan3/contrib/stream/gz_ostream.hpp +++ b/include/seqan3/contrib/stream/gz_ostream.hpp @@ -221,7 +221,7 @@ bool basic_gz_ostreambuf::zip_to_stream( typename basic_gz_ostreambuf::char_type * buffer_, std::streamsize buffer_size_) { - std::streamsize written_byte_size = 0, total_written_byte_size = 0; + std::streamsize written_byte_size = 0; m_zip_stream.next_in = (byte_buffer_type)buffer_; m_zip_stream.avail_in = static_cast(buffer_size_ * sizeof(char_type)); @@ -236,7 +236,6 @@ bool basic_gz_ostreambuf::zip_to_stream( if (m_err == Z_OK || m_err == Z_STREAM_END) { written_byte_size = static_cast(m_output_buffer.size()) - m_zip_stream.avail_out; - total_written_byte_size += written_byte_size; // output buffer is full, dumping to ostream m_ostream.write((const char_type *) &(m_output_buffer[0]), diff --git a/include/seqan3/io/sam_file/detail/format_sam_base.hpp b/include/seqan3/io/sam_file/detail/format_sam_base.hpp index c9bafcf88c..d570d793fe 100644 --- a/include/seqan3/io/sam_file/detail/format_sam_base.hpp +++ b/include/seqan3/io/sam_file/detail/format_sam_base.hpp @@ -338,7 +338,7 @@ inline void format_sam_base::read_header(stream_view_type && stream_view, read_forward_range_field(string_buffer, value); }; - auto print_cerr_of_unspported_tag = [&it](char const * const header_tag, std::array raw_tag) + auto print_cerr_of_unspported_tag = [](char const * const header_tag, std::array raw_tag) { std::cerr << "Unsupported SAM header tag in @" << header_tag << ": " << raw_tag[0] << raw_tag[1] << '\n'; }; diff --git a/include/seqan3/search/fm_index/fm_index.hpp b/include/seqan3/search/fm_index/fm_index.hpp index 24ed5a9d0e..f9853832c9 100644 --- a/include/seqan3/search/fm_index/fm_index.hpp +++ b/include/seqan3/search/fm_index/fm_index.hpp @@ -235,6 +235,8 @@ class fm_index uint8_t const rank = seqan3::to_rank(chr); if constexpr (sigma >= max_sigma) warn_if_rank_out_of_range(rank); + else + (void)warn_if_rank_out_of_range; return rank + 1; }) .out; diff --git a/include/seqan3/utility/container/aligned_allocator.hpp b/include/seqan3/utility/container/aligned_allocator.hpp index b3a38966a8..8049d831ea 100644 --- a/include/seqan3/utility/container/aligned_allocator.hpp +++ b/include/seqan3/utility/container/aligned_allocator.hpp @@ -193,6 +193,7 @@ class aligned_allocator ::operator delete(p, bytes_to_deallocate, static_cast(alignment)); #else /*__cpp_sized_deallocation >= 201309*/ // e.g. clang++ + (void)bytes_to_deallocate; if constexpr (alignment <= __STDCPP_DEFAULT_NEW_ALIGNMENT__) ::operator delete(p); else // Use alignment aware deallocator function. diff --git a/test/unit/alignment/configuration/align_config_common_test.cpp b/test/unit/alignment/configuration/align_config_common_test.cpp index f3e5ae2cac..d9dd6fb15e 100644 --- a/test/unit/alignment/configuration/align_config_common_test.cpp +++ b/test/unit/alignment/configuration/align_config_common_test.cpp @@ -33,7 +33,7 @@ using alignment_result_t = seqan3::alignment_result; // Needed for the on result config -auto on_result_callback = []([[maybe_unused]] auto && res) {}; +[[maybe_unused]] auto on_result_callback = []([[maybe_unused]] auto && res) {}; using callback_t = decltype(on_result_callback); // A list of config types to test, associated with their incompatible config classes defined as a taboo list. diff --git a/test/unit/alignment/decorator/gap_decorator_test.cpp b/test/unit/alignment/decorator/gap_decorator_test.cpp index 30d0f2d429..74f3e8adfe 100644 --- a/test/unit/alignment/decorator/gap_decorator_test.cpp +++ b/test/unit/alignment/decorator/gap_decorator_test.cpp @@ -21,7 +21,7 @@ using decorator_t = seqan3::gap_decorator const &>; -std::vector const dummy_obj{}; // dummy lvalue for type declaration of views +[[maybe_unused]] std::vector const dummy_obj{}; // dummy lvalue for type declaration of views using decorator_t2 = seqan3::gap_decorator{ dummy_obj.begin(), diff --git a/test/unit/alignment/scoring/scoring_scheme_test.cpp b/test/unit/alignment/scoring/scoring_scheme_test.cpp index da91ccbfc2..0e3b5b5980 100644 --- a/test/unit/alignment/scoring/scoring_scheme_test.cpp +++ b/test/unit/alignment/scoring/scoring_scheme_test.cpp @@ -114,7 +114,7 @@ TYPED_TEST(generic, member_types) { using alph_t = typename TestFixture::alph_t; - TypeParam scheme{}; + [[maybe_unused]] TypeParam scheme{}; using score_t = typename TypeParam::score_type; using matrix_size_t = typename TypeParam::matrix_size_type; diff --git a/test/unit/alphabet/composite/alphabet_variant_test.cpp b/test/unit/alphabet/composite/alphabet_variant_test.cpp index a905dedeb4..615dec42b7 100644 --- a/test/unit/alphabet/composite/alphabet_variant_test.cpp +++ b/test/unit/alphabet/composite/alphabet_variant_test.cpp @@ -44,39 +44,39 @@ TYPED_TEST_SUITE(alphabet_variant_test, alphabet_variant_types, ); TEST(alphabet_variant_test, initialise_from_component_alphabet) { - seqan3::dna5 l('A'_rna5); + [[maybe_unused]] seqan3::dna5 l('A'_rna5); using alphabet_t = seqan3::alphabet_variant; using variant_t = std::variant; - constexpr variant_t variant0{'A'_dna4}; + [[maybe_unused]] constexpr variant_t variant0{'A'_dna4}; constexpr alphabet_t letter0{'A'_dna4}; - constexpr variant_t variant1 = 'C'_dna4; + [[maybe_unused]] constexpr variant_t variant1 = 'C'_dna4; constexpr alphabet_t letter1 = 'C'_dna4; - constexpr variant_t variant2 = {'G'_dna4}; + [[maybe_unused]] constexpr variant_t variant2 = {'G'_dna4}; constexpr alphabet_t letter2 = {'G'_dna4}; - constexpr variant_t variant3 = static_cast('T'_dna4); + [[maybe_unused]] constexpr variant_t variant3 = static_cast('T'_dna4); constexpr alphabet_t letter3 = static_cast('T'_dna4); - constexpr variant_t variant4 = {static_cast('A'_dna5)}; + [[maybe_unused]] constexpr variant_t variant4 = {static_cast('A'_dna5)}; constexpr alphabet_t letter4 = {static_cast('A'_dna5)}; - variant_t variant5{'C'_dna5}; + [[maybe_unused]] variant_t variant5{'C'_dna5}; alphabet_t letter5{'C'_dna5}; - variant_t variant6 = 'G'_dna5; + [[maybe_unused]] variant_t variant6 = 'G'_dna5; alphabet_t letter6 = 'G'_dna5; - variant_t variant7 = {'N'_dna5}; + [[maybe_unused]] variant_t variant7 = {'N'_dna5}; alphabet_t letter7 = {'N'_dna5}; - variant_t variant8 = static_cast('T'_dna5); + [[maybe_unused]] variant_t variant8 = static_cast('T'_dna5); alphabet_t letter8 = static_cast('T'_dna5); - variant_t variant9 = {static_cast(seqan3::gap{})}; + [[maybe_unused]] variant_t variant9 = {static_cast(seqan3::gap{})}; alphabet_t letter9 = {static_cast(seqan3::gap{})}; EXPECT_EQ(letter0.to_rank(), 0); @@ -96,31 +96,31 @@ TEST(alphabet_variant_test, initialise_from_component_alphabet_subtype) using alphabet_t = seqan3::alphabet_variant; using variant_t = std::variant; - variant_t variant0{'A'_rna4}; + [[maybe_unused]] variant_t variant0{'A'_rna4}; alphabet_t letter0{'A'_rna4}; - variant_t variant1 = 'C'_rna4; + [[maybe_unused]] variant_t variant1 = 'C'_rna4; alphabet_t letter1 = 'C'_rna4; - variant_t variant2 = {'G'_rna4}; + [[maybe_unused]] variant_t variant2 = {'G'_rna4}; alphabet_t letter2 = {'G'_rna4}; - variant_t variant3 = static_cast('T'_rna4); + [[maybe_unused]] variant_t variant3 = static_cast('T'_rna4); alphabet_t letter3 = static_cast('T'_rna4); - variant_t variant4 = {static_cast('A'_rna5)}; + [[maybe_unused]] variant_t variant4 = {static_cast('A'_rna5)}; alphabet_t letter4 = {static_cast('A'_rna5)}; - variant_t variant5{'C'_rna5}; + [[maybe_unused]] variant_t variant5{'C'_rna5}; alphabet_t letter5{'C'_rna5}; - variant_t variant6 = 'G'_rna5; + [[maybe_unused]] variant_t variant6 = 'G'_rna5; alphabet_t letter6 = 'G'_rna5; - variant_t variant7 = {'N'_rna5}; + [[maybe_unused]] variant_t variant7 = {'N'_rna5}; alphabet_t letter7 = {'N'_rna5}; - variant_t variant8 = static_cast('T'_rna5); + [[maybe_unused]] variant_t variant8 = static_cast('T'_rna5); alphabet_t letter8 = static_cast('T'_rna5); EXPECT_EQ(letter0.to_rank(), 0); diff --git a/test/unit/alphabet/composite/composite_integration_test.cpp b/test/unit/alphabet/composite/composite_integration_test.cpp index 60241ba54b..2c37ba8e96 100644 --- a/test/unit/alphabet/composite/composite_integration_test.cpp +++ b/test/unit/alphabet/composite/composite_integration_test.cpp @@ -62,7 +62,7 @@ TEST(composite, custom_constructors) qualified_gapped_dna_phred42 t34{seqan3::gap{}}; qualified_gapped_dna_phred42 t35{seqan3::gapped('C'_dna4)}; qualified_gapped_dna_phred42 t36{seqan3::gapped(seqan3::gap{})}; - qualified_gapped_dna_phred42 t37{seqan3::gap{}, '$'_phred42}; + [[maybe_unused]] qualified_gapped_dna_phred42 t37{seqan3::gap{}, '$'_phred42}; gapped_qualified_dna_phred42 t41{'C'_dna4}; gapped_qualified_dna_phred42 t42{'C'_rna4}; @@ -114,41 +114,43 @@ TEST(composite, custom_constructors) TEST(composite_constexpr, custom_constructor) { - constexpr qualified_dna_phred42 t11{'C'_dna4}; - constexpr qualified_dna_phred42 t12{'C'_rna4}; - constexpr qualified_dna_phred42 t13{'$'_phred42}; - constexpr qualified_dna_phred42 t14{'$'_phred63}; - - constexpr seqan3::qualified t21{'K'_aa27}; - constexpr seqan3::qualified t22{'$'_phred63}; - constexpr seqan3::qualified t23{'$'_phred42}; - - constexpr qualified_gapped_dna_phred42 t31{'C'_dna4}; - constexpr qualified_gapped_dna_phred42 t32{'C'_rna4}; - constexpr qualified_gapped_dna_phred42 t33{'$'_phred42}; - constexpr qualified_gapped_dna_phred42 t34{seqan3::gap{}}; - constexpr qualified_gapped_dna_phred42 t35{seqan3::gapped('C'_dna4)}; - constexpr qualified_gapped_dna_phred42 t36{seqan3::gapped(seqan3::gap{})}; - constexpr qualified_gapped_dna_phred42 t37{seqan3::gap{}, '$'_phred42}; - - constexpr gapped_qualified_dna_phred42 t41{'C'_dna4}; - constexpr gapped_qualified_dna_phred42 t42{'C'_rna4}; - constexpr gapped_qualified_dna_phred42 t43{'$'_phred42}; - constexpr gapped_qualified_dna_phred42 t44{seqan3::gap{}}; - constexpr gapped_qualified_dna_phred42 t45{qualified_dna_phred42{'C'_dna4, '!'_phred42}}; - - constexpr qualified_qualified_gapped_dna_phred42_phred42 t51{'C'_dna4}; - constexpr qualified_qualified_gapped_dna_phred42_phred42 t52{'C'_rna4}; - constexpr qualified_qualified_gapped_dna_phred42_phred42 t53{'$'_phred42}; - constexpr qualified_qualified_gapped_dna_phred42_phred42 t54{seqan3::gap{}}; - constexpr qualified_qualified_gapped_dna_phred42_phred42 t55{seqan3::gapped('C'_dna4)}; - constexpr qualified_qualified_gapped_dna_phred42_phred42 t56{seqan3::gapped(seqan3::gap{})}; - - constexpr gapped_alphabet_variant_dna_phred42 t61{'C'_dna4}; - constexpr gapped_alphabet_variant_dna_phred42 t62{'C'_rna4}; - constexpr gapped_alphabet_variant_dna_phred42 t63{'$'_phred42}; - constexpr gapped_alphabet_variant_dna_phred42 t64{seqan3::gap{}}; - constexpr gapped_alphabet_variant_dna_phred42 t65{qualified_dna_phred42{'C'_dna4, '!'_phred42}}; + [[maybe_unused]] constexpr qualified_dna_phred42 t11{'C'_dna4}; + [[maybe_unused]] constexpr qualified_dna_phred42 t12{'C'_rna4}; + [[maybe_unused]] constexpr qualified_dna_phred42 t13{'$'_phred42}; + [[maybe_unused]] constexpr qualified_dna_phred42 t14{'$'_phred63}; + + [[maybe_unused]] constexpr seqan3::qualified t21{'K'_aa27}; + [[maybe_unused]] constexpr seqan3::qualified t22{'$'_phred63}; + [[maybe_unused]] constexpr seqan3::qualified t23{'$'_phred42}; + + [[maybe_unused]] constexpr qualified_gapped_dna_phred42 t31{'C'_dna4}; + [[maybe_unused]] constexpr qualified_gapped_dna_phred42 t32{'C'_rna4}; + [[maybe_unused]] constexpr qualified_gapped_dna_phred42 t33{'$'_phred42}; + [[maybe_unused]] constexpr qualified_gapped_dna_phred42 t34{seqan3::gap{}}; + [[maybe_unused]] constexpr qualified_gapped_dna_phred42 t35{seqan3::gapped('C'_dna4)}; + [[maybe_unused]] constexpr qualified_gapped_dna_phred42 t36{seqan3::gapped(seqan3::gap{})}; + [[maybe_unused]] constexpr qualified_gapped_dna_phred42 t37{seqan3::gap{}, '$'_phred42}; + + [[maybe_unused]] constexpr gapped_qualified_dna_phred42 t41{'C'_dna4}; + [[maybe_unused]] constexpr gapped_qualified_dna_phred42 t42{'C'_rna4}; + [[maybe_unused]] constexpr gapped_qualified_dna_phred42 t43{'$'_phred42}; + [[maybe_unused]] constexpr gapped_qualified_dna_phred42 t44{seqan3::gap{}}; + [[maybe_unused]] constexpr gapped_qualified_dna_phred42 t45{qualified_dna_phred42{'C'_dna4, '!'_phred42}}; + + [[maybe_unused]] constexpr qualified_qualified_gapped_dna_phred42_phred42 t51{'C'_dna4}; + [[maybe_unused]] constexpr qualified_qualified_gapped_dna_phred42_phred42 t52{'C'_rna4}; + [[maybe_unused]] constexpr qualified_qualified_gapped_dna_phred42_phred42 t53{'$'_phred42}; + [[maybe_unused]] constexpr qualified_qualified_gapped_dna_phred42_phred42 t54{seqan3::gap{}}; + [[maybe_unused]] constexpr qualified_qualified_gapped_dna_phred42_phred42 t55{ + seqan3::gapped('C'_dna4)}; + [[maybe_unused]] constexpr qualified_qualified_gapped_dna_phred42_phred42 t56{ + seqan3::gapped(seqan3::gap{})}; + + [[maybe_unused]] constexpr gapped_alphabet_variant_dna_phred42 t61{'C'_dna4}; + [[maybe_unused]] constexpr gapped_alphabet_variant_dna_phred42 t62{'C'_rna4}; + [[maybe_unused]] constexpr gapped_alphabet_variant_dna_phred42 t63{'$'_phred42}; + [[maybe_unused]] constexpr gapped_alphabet_variant_dna_phred42 t64{seqan3::gap{}}; + [[maybe_unused]] constexpr gapped_alphabet_variant_dna_phred42 t65{qualified_dna_phred42{'C'_dna4, '!'_phred42}}; } TEST(composite, custom_assignment) @@ -191,7 +193,7 @@ TEST(composite, custom_assignment) gapped_qualified_dna_phred42 t41{}; gapped_qualified_dna_phred42 t42{'C'_dna4}; - gapped_qualified_dna_phred42 t43{qualified_dna_phred42{'C'_dna4, '$'_phred42}}; + // gapped_qualified_dna_phred42 t43{qualified_dna_phred42{'C'_dna4, '$'_phred42}}; gapped_qualified_dna_phred42 t44{seqan3::gap{}}; gapped_qualified_dna_phred42 t45{qualified_dna_phred42{'C'_dna4, '!'_phred42}}; t41 = 'C'_dna4; diff --git a/test/unit/alphabet/container/bitpacked_sequence_test.cpp b/test/unit/alphabet/container/bitpacked_sequence_test.cpp index 3fc748bb71..c3733ec473 100644 --- a/test/unit/alphabet/container/bitpacked_sequence_test.cpp +++ b/test/unit/alphabet/container/bitpacked_sequence_test.cpp @@ -52,5 +52,5 @@ TEST(bitpacked_sequence_test, issue371) seqan3::bitpacked_sequence source{}; auto it = source.begin(); auto end = source.end(); - it != end; // This line causes error. + [[maybe_unused]] bool result = it != end; // This line causes error. } diff --git a/test/unit/contrib/parallel/buffer_queue_parallel_test.cpp b/test/unit/contrib/parallel/buffer_queue_parallel_test.cpp index 1ad219818c..00a9179623 100644 --- a/test/unit/contrib/parallel/buffer_queue_parallel_test.cpp +++ b/test/unit/contrib/parallel/buffer_queue_parallel_test.cpp @@ -209,14 +209,14 @@ void test_buffer_queue_wait_throw(size_t initialCapacity) } // printf("start reader #%lu\n", (long unsigned)tid); - size_t chk_sum_local = 0, cnt = 0; + size_t chk_sum_local = 0; //, cnt = 0; for (;;) { try { size_t val = queue.value_pop(); chk_sum_local ^= val; - ++cnt; + // ++cnt; // if ((cnt & 0xff) == 0) // printf("%ld ", tid); } diff --git a/test/unit/core/configuration/pipeable_config_element_test.cpp b/test/unit/core/configuration/pipeable_config_element_test.cpp index 1c9333af7a..f4d35e4e10 100644 --- a/test/unit/core/configuration/pipeable_config_element_test.cpp +++ b/test/unit/core/configuration/pipeable_config_element_test.cpp @@ -198,7 +198,6 @@ TEST(pipeable_config_element, special_cases) TEST(pipeable_config_element, multiple_elements) { - seqan3::configuration tmp{}; bax b2{}; { auto cfg = foo{} | bar{} | bax{}; diff --git a/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp b/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp index 54bcb640cc..bba194407f 100644 --- a/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp +++ b/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp @@ -19,8 +19,8 @@ struct dummy_view TEST(adaptor_combination, constexpr_combine) { - constexpr auto adaptor1 = seqan3::detail::adaptor_for_view_without_args{}; - constexpr auto adaptor2 = seqan3::detail::adaptor_for_view_without_args{}; + [[maybe_unused]] constexpr auto adaptor1 = seqan3::detail::adaptor_for_view_without_args{}; + [[maybe_unused]] constexpr auto adaptor2 = seqan3::detail::adaptor_for_view_without_args{}; EXPECT_TRUE((SEQAN3_IS_CONSTEXPR(adaptor1 | adaptor2))); } diff --git a/test/unit/io/sam_file/format_bam_test.cpp b/test/unit/io/sam_file/format_bam_test.cpp index c693bcfe82..57f2430eea 100644 --- a/test/unit/io/sam_file/format_bam_test.cpp +++ b/test/unit/io/sam_file/format_bam_test.cpp @@ -700,5 +700,5 @@ TEST_F(bam_format, issue1201) std::istringstream stream{input}; seqan3::sam_file_input fin{stream, seqan3::format_bam{}}; - fin.header().format_version; + [[maybe_unused]] auto version = fin.header().format_version; } diff --git a/test/unit/io/sam_file/sam_file_format_test_template.hpp b/test/unit/io/sam_file/sam_file_format_test_template.hpp index 8cd712ddbe..aa3bd0a90e 100644 --- a/test/unit/io/sam_file/sam_file_format_test_template.hpp +++ b/test/unit/io/sam_file/sam_file_format_test_template.hpp @@ -296,7 +296,7 @@ TYPED_TEST_P(sam_file_read, read_mate_but_not_ref_id_with_ref) TYPED_TEST_P(sam_file_read, read_mate_but_not_ref_id_without_ref) { - std::tuple, std::optional, int32_t> mate; + [[maybe_unused]] std::tuple, std::optional, int32_t> mate; { /*no reference information*/ typename TestFixture::stream_type istream{this->simple_three_reads_input}; diff --git a/test/unit/io/views/detail/take_until_view_test.cpp b/test/unit/io/views/detail/take_until_view_test.cpp index 970a3a1b1d..c1d459a50d 100644 --- a/test/unit/io/views/detail/take_until_view_test.cpp +++ b/test/unit/io/views/detail/take_until_view_test.cpp @@ -132,9 +132,8 @@ TEST(view_take_until, concepts) // mutable adapters make the view lose const-iterability auto adapt2 = seqan3::detail::take_until( - [count = 0](char c) mutable + [](char c) mutable { - ++count; return c == '\n'; }); do_concepts(adapt2, false); diff --git a/test/unit/search/configuration/search_config_common_test.cpp b/test/unit/search/configuration/search_config_common_test.cpp index d5dd4abc71..3af238e079 100644 --- a/test/unit/search/configuration/search_config_common_test.cpp +++ b/test/unit/search/configuration/search_config_common_test.cpp @@ -23,7 +23,7 @@ using search_result_t = seqan3::search_result; using all_hit_configs_t = seqan3::type_list; // Needed for the on result config -auto on_result_callback = []([[maybe_unused]] auto && res) {}; +[[maybe_unused]] auto on_result_callback = []([[maybe_unused]] auto && res) {}; using callback_t = decltype(on_result_callback); // A list of config types to test, associated with their incompatible config classes defined as a taboo list. diff --git a/test/unit/search/search_scheme_algorithm_test.cpp b/test/unit/search/search_scheme_algorithm_test.cpp index 4b6ea68fb0..6af90c2cd3 100644 --- a/test/unit/search/search_scheme_algorithm_test.cpp +++ b/test/unit/search/search_scheme_algorithm_test.cpp @@ -146,7 +146,6 @@ inline void test_search_hamming(auto index, return true; uint64_t lb = 0, rb = 0; - uint8_t total_errors = 0; for (uint8_t block = 0; block < search.blocks(); ++block) { rb += ordered_blocks_length[block]; @@ -157,7 +156,6 @@ inline void test_search_hamming(auto index, ++errors; else errors += query[i] != text[hit + i]; - total_errors += errors; if (errors != error_distribution[block]) return true; lb += ordered_blocks_length[block]; diff --git a/test/unit/utility/detail/bits_of_test.cpp b/test/unit/utility/detail/bits_of_test.cpp index 750be03d70..3a53b381f9 100644 --- a/test/unit/utility/detail/bits_of_test.cpp +++ b/test/unit/utility/detail/bits_of_test.cpp @@ -9,8 +9,6 @@ #include -static constexpr size_t max_iterations = 1 << 15; - TEST(bits_of, bits_of) { EXPECT_EQ(seqan3::detail::bits_of, 8); diff --git a/test/unit/utility/simd/simd_algorithm_test.cpp b/test/unit/utility/simd/simd_algorithm_test.cpp index 14a03ffcf1..ae6d7eb724 100644 --- a/test/unit/utility/simd/simd_algorithm_test.cpp +++ b/test/unit/utility/simd/simd_algorithm_test.cpp @@ -211,7 +211,7 @@ TYPED_TEST(simd_algorithm_upcast, signed) using list = typename TestFixture::target_list_signed_t; seqan3::detail::for_each( - [this](auto type_id) + [](auto type_id) { using target_type = typename decltype(type_id)::type; using src_simd_t = seqan3::simd::simd_type_t; @@ -231,7 +231,7 @@ TYPED_TEST(simd_algorithm_upcast, unsigned) using list = typename TestFixture::target_list_unsigned_t; seqan3::detail::for_each( - [this](auto type_id) + [](auto type_id) { using target_type = typename decltype(type_id)::type; using src_simd_t = seqan3::simd::simd_type_t; From fcaeab2c0b6a75a16d2f2f01503d82ec7145c486 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:40:52 +0200 Subject: [PATCH 03/21] [FIX] Ambiguous function call --- include/seqan3/utility/container/small_string.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/seqan3/utility/container/small_string.hpp b/include/seqan3/utility/container/small_string.hpp index 43f91af037..9ebedfe2e0 100644 --- a/include/seqan3/utility/container/small_string.hpp +++ b/include/seqan3/utility/container/small_string.hpp @@ -149,7 +149,8 @@ class small_string : public small_vector { static_assert(N <= capacity_ + 1, "Length of string literal exceeds capacity of small_string."); assert(_lit[N - 1] == '\0'); - assign(&_lit[0], &_lit[N - 1]); + base_t::assign(&_lit[0], &_lit[N - 1]); + data_[sz] = '\0'; } /*!\brief Assign from pair of iterators. From 1dc6c27d5322651cd12bcbe7e9336b41770ecc4d Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:40:32 +0200 Subject: [PATCH 04/21] [FIX] explicit ctor/assign is implicitly deleted --- .../argument_parser/argument_parser.hpp | 10 +++++----- .../detail/execution_handler_parallel.hpp | 6 +++--- include/seqan3/io/sam_file/format_sam.hpp | 15 ++++++-------- include/seqan3/io/sam_file/header.hpp | 18 ++++++----------- .../parallel/detail/reader_writer_manager.hpp | 20 +++++++++---------- 5 files changed, 30 insertions(+), 39 deletions(-) diff --git a/include/seqan3/argument_parser/argument_parser.hpp b/include/seqan3/argument_parser/argument_parser.hpp index 7b0f7cb1da..23616ab9b0 100644 --- a/include/seqan3/argument_parser/argument_parser.hpp +++ b/include/seqan3/argument_parser/argument_parser.hpp @@ -150,11 +150,11 @@ class argument_parser /*!\name Constructors, destructor and assignment * \{ */ - argument_parser() = delete; //!< Deleted. - argument_parser(argument_parser const &) = default; //!< Defaulted. - argument_parser & operator=(argument_parser const &) = default; //!< Defaulted. - argument_parser(argument_parser &&) = default; //!< Defaulted. - argument_parser & operator=(argument_parser &&) = default; //!< Defaulted. + argument_parser() = delete; //!< Deleted. + argument_parser(argument_parser const &) = delete; //!< Deleted. Holds std::future. + argument_parser & operator=(argument_parser const &) = delete; //!< Deleted. Holds std::future. + argument_parser(argument_parser &&) = default; //!< Defaulted. + argument_parser & operator=(argument_parser &&) = default; //!< Defaulted. /*!\brief Initializes an seqan3::argument_parser object from the command line arguments. * diff --git a/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp b/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp index 8c666ad13c..1aec9aeb60 100644 --- a/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp +++ b/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp @@ -213,14 +213,14 @@ class execution_handler_parallel { public: /*!\name Constructors, destructor and assignment - * \brief Instances of this class are not copyable. + * \brief Instances of this class are not copyable and not movable. * \{ */ internal_state() = default; //!< Defaulted. internal_state(internal_state const &) = delete; //!< Deleted. - internal_state(internal_state &&) = default; //!< Defaulted. + internal_state(internal_state &&) = delete; //!< Deleted. internal_state & operator=(internal_state const &) = delete; //!< Deleted. - internal_state & operator=(internal_state &&) = default; //!< Defaulted. + internal_state & operator=(internal_state &&) = delete; //!< Deleted. //!\brief Waits for threads to finish. ~internal_state() diff --git a/include/seqan3/io/sam_file/format_sam.hpp b/include/seqan3/io/sam_file/format_sam.hpp index 12462b2589..0b0c7608c2 100644 --- a/include/seqan3/io/sam_file/format_sam.hpp +++ b/include/seqan3/io/sam_file/format_sam.hpp @@ -111,12 +111,12 @@ class format_sam : protected detail::format_sam_base * \{ */ // construction cannot be noexcept because this class has a std::string variable as a quality string buffer. - format_sam() = default; //!< Defaulted. - format_sam(format_sam const &) = default; //!< Defaulted. - format_sam & operator=(format_sam const &) = default; //!< Defaulted. - format_sam(format_sam &&) = default; //!< Defaulted. - format_sam & operator=(format_sam &&) = default; //!< Defaulted. - ~format_sam() = default; //!< Defaulted. + format_sam() = default; //!< Defaulted. + format_sam(format_sam const &) = delete; //!< Deleted. Header holds a unique_ptr. + format_sam & operator=(format_sam const &) = delete; //!< Deleted. Header holds a unique_ptr. + format_sam(format_sam &&) = default; //!< Defaulted. + format_sam & operator=(format_sam &&) = default; //!< Defaulted. + ~format_sam() = default; //!< Defaulted. //!\} @@ -224,9 +224,6 @@ class format_sam : protected detail::format_sam_base //!\brief The default header for the alignment format. sam_file_header<> default_header{}; - //!\brief Tracks whether reference information (\@SR tag) were found in the SAM header - bool ref_info_present_in_header{false}; - //!\brief A buffer to store a raw record pointing into the stream buffer of the input. std::array raw_record{}; diff --git a/include/seqan3/io/sam_file/header.hpp b/include/seqan3/io/sam_file/header.hpp index 0f9df27514..2efe5ebf15 100644 --- a/include/seqan3/io/sam_file/header.hpp +++ b/include/seqan3/io/sam_file/header.hpp @@ -51,18 +51,12 @@ class sam_file_header /*!\name Constructors, destructor and assignment * \{ */ - //!\brief Default constructor is defaulted. - sam_file_header() = default; - //!\brief Copy construction is defaulted. - sam_file_header(sam_file_header const &) = default; - //!\brief Copy assignment is defaulted. - sam_file_header & operator=(sam_file_header const &) = default; - //!\brief Move construction is defaulted. - sam_file_header(sam_file_header &&) = default; - //!\brief Move assignment is defaulted. - sam_file_header & operator=(sam_file_header &&) = default; - //!\brief Destructor is defaulted. - ~sam_file_header() = default; + sam_file_header() = default; //!< Defaulted. + sam_file_header(sam_file_header const &) = delete; //!< Deleted. Holds a unique_ptr. + sam_file_header & operator=(sam_file_header const &) = delete; //!< Deleted. Holds a unique_ptr. + sam_file_header(sam_file_header &&) = default; //!< Defaulted. + sam_file_header & operator=(sam_file_header &&) = default; //!< Defaulted. + ~sam_file_header() = default; //!< Defaulted. /*!\brief Construct from a range of reference ids which redirects the `ref_ids_ptr` member (non-owning). * \param[in] ref_ids The range over reference ids to redirect the pointer at. diff --git a/include/seqan3/utility/parallel/detail/reader_writer_manager.hpp b/include/seqan3/utility/parallel/detail/reader_writer_manager.hpp index 69ccad7bd7..0ef2d47d25 100644 --- a/include/seqan3/utility/parallel/detail/reader_writer_manager.hpp +++ b/include/seqan3/utility/parallel/detail/reader_writer_manager.hpp @@ -80,11 +80,11 @@ class reader_writer_manager * \brief Not default constructible nor copyable or movable. * \{ */ - scoped_writer_type() = delete; //!< Deleted. - scoped_writer_type(scoped_writer_type const &) = default; //!< Deleted. - scoped_writer_type(scoped_writer_type &&) = default; //!< Defaulted. - scoped_writer_type & operator=(scoped_writer_type const &) = default; //!< Deleted. - scoped_writer_type & operator=(scoped_writer_type &&) = default; //!< Defaulted. + scoped_writer_type() = delete; //!< Deleted. + scoped_writer_type(scoped_writer_type const &) = default; //!< Deleted. + scoped_writer_type(scoped_writer_type &&) = default; //!< Defaulted. + scoped_writer_type & operator=(scoped_writer_type const &) = delete; //!< Deleted. Class holds a reference. + scoped_writer_type & operator=(scoped_writer_type &&) = delete; //!< Deleted. Class holds a reference. /*!\brief Constructs the scoped writer with the associated manager. * \param _manager The seqan3::detail::reader_writer_manager. @@ -110,11 +110,11 @@ class reader_writer_manager /*!\name Constructors, destructor and assignment * \{ */ - scoped_reader_type() = delete; //!< Deleted. - scoped_reader_type(scoped_reader_type const &) = default; //!< Deleted. - scoped_reader_type(scoped_reader_type &&) = default; //!< Defaulted. - scoped_reader_type & operator=(scoped_reader_type const &) = default; //!< Deleted. - scoped_reader_type & operator=(scoped_reader_type &&) = default; //!< Defaulted. + scoped_reader_type() = delete; //!< Deleted. + scoped_reader_type(scoped_reader_type const &) = default; //!< Deleted. + scoped_reader_type(scoped_reader_type &&) = default; //!< Defaulted. + scoped_reader_type & operator=(scoped_reader_type const &) = delete; //!< Deleted. Class holds a reference. + scoped_reader_type & operator=(scoped_reader_type &&) = delete; //!< Deleted. Class holds a reference. /*!\brief Constructs the scoped reader with the associated manager. * \param _manager The seqan3::detail::reader_writer_manager. From 5ba6a5140bce3de1bae6d27098b89e5112400752 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:41:47 +0200 Subject: [PATCH 05/21] [FIX] Missing check for include --- include/seqan3/utility/simd/detail/builtin_simd_intrinsics.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/seqan3/utility/simd/detail/builtin_simd_intrinsics.hpp b/include/seqan3/utility/simd/detail/builtin_simd_intrinsics.hpp index 41ef966414..bf1e6b4917 100644 --- a/include/seqan3/utility/simd/detail/builtin_simd_intrinsics.hpp +++ b/include/seqan3/utility/simd/detail/builtin_simd_intrinsics.hpp @@ -24,7 +24,7 @@ # include // x86 intrinsics (linux) #endif -#if __has_include() +#if defined(_WIN32) && __has_include() # include // x86 intrinsics (windows) #endif From 19b2ff67252976f9c5c33fe780b30c22376bb3ff Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:42:42 +0200 Subject: [PATCH 06/21] [FIX] cvtsi64x is deprecated --- include/seqan3/utility/simd/detail/simd_algorithm_avx2.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/seqan3/utility/simd/detail/simd_algorithm_avx2.hpp b/include/seqan3/utility/simd/detail/simd_algorithm_avx2.hpp index 4027ca88e5..22e5db3e4c 100644 --- a/include/seqan3/utility/simd/detail/simd_algorithm_avx2.hpp +++ b/include/seqan3/utility/simd/detail/simd_algorithm_avx2.hpp @@ -210,8 +210,8 @@ constexpr simd_t extract_half_avx2(simd_t const & src) template constexpr simd_t extract_quarter_avx2(simd_t const & src) { - return reinterpret_cast(_mm256_castsi128_si256( - _mm_cvtsi64x_si128(_mm256_extract_epi64(reinterpret_cast<__m256i const &>(src), index)))); + return reinterpret_cast( + _mm256_castsi128_si256(_mm_cvtsi64_si128(_mm256_extract_epi64(reinterpret_cast<__m256i const &>(src), index)))); } template From 92380a1e10b4a5e22c12905aed050a66d60c0b1b Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:43:21 +0200 Subject: [PATCH 07/21] [FIX] Workaround clang __builtin_constant_p --- include/seqan3/utility/type_traits/basic.hpp | 6 +++++- test/unit/utility/type_traits/basic_test.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/seqan3/utility/type_traits/basic.hpp b/include/seqan3/utility/type_traits/basic.hpp index 0bd70ad2db..446df8f4e1 100644 --- a/include/seqan3/utility/type_traits/basic.hpp +++ b/include/seqan3/utility/type_traits/basic.hpp @@ -26,7 +26,11 @@ * \ingroup utility_type_traits * \returns true or false. */ -#define SEQAN3_IS_CONSTEXPR(...) std::integral_constant::value +#if defined(__clang__) // https://github.com/llvm/llvm-project/issues/58078 +# define SEQAN3_IS_CONSTEXPR(...) true +#else +# define SEQAN3_IS_CONSTEXPR(...) std::integral_constant::value +#endif //!\endcond namespace seqan3 diff --git a/test/unit/utility/type_traits/basic_test.cpp b/test/unit/utility/type_traits/basic_test.cpp index 6025d031e9..26ec360572 100644 --- a/test/unit/utility/type_traits/basic_test.cpp +++ b/test/unit/utility/type_traits/basic_test.cpp @@ -93,6 +93,9 @@ struct nonconstexpr_void_member_t TEST(type_trait, is_constexpr_invocable) { +#if defined(__clang__) + GTEST_SKIP() << "Skipping on clang: https://github.com/llvm/llvm-project/issues/58078"; +#else // Whole test is in else/endif block, because i/j would be unused on clang. int i = 32; constexpr int j = 42; @@ -115,4 +118,5 @@ TEST(type_trait, is_constexpr_invocable) EXPECT_TRUE((SEQAN3_IS_CONSTEXPR(constexpr_void_member_t{}.get_i(3)))); EXPECT_TRUE((!SEQAN3_IS_CONSTEXPR(nonconstexpr_nonvoid_member_t{}.get_i(3)))); EXPECT_TRUE((!SEQAN3_IS_CONSTEXPR(nonconstexpr_void_member_t{}.get_i(3)))); +#endif } From fe386b24aeaea1efcafb7cf90c111d9f2b335a3e Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 10:43:41 +0200 Subject: [PATCH 08/21] [FIX] Constraint/template differs in redeclaration --- include/seqan3/alignment/pairwise/alignment_result.hpp | 4 ++-- .../pairwise/detail/policy_alignment_result_builder.hpp | 2 +- include/seqan3/alphabet/views/translate_join.hpp | 2 +- include/seqan3/search/detail/policy_search_result_builder.hpp | 2 +- include/seqan3/search/search_result.hpp | 4 ++-- include/seqan3/utility/views/interleave.hpp | 2 +- include/seqan3/utility/views/repeat.hpp | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/seqan3/alignment/pairwise/alignment_result.hpp b/include/seqan3/alignment/pairwise/alignment_result.hpp index 798d7737f9..2bff956ea3 100644 --- a/include/seqan3/alignment/pairwise/alignment_result.hpp +++ b/include/seqan3/alignment/pairwise/alignment_result.hpp @@ -24,7 +24,7 @@ namespace seqan3::detail // forward declaration for friend declaration in alignment_result. template - requires is_type_specialisation_of_v + requires seqan3::detail::is_type_specialisation_of_v class policy_alignment_result_builder; /*!\brief A struct that contains the actual alignment result data. @@ -170,7 +170,7 @@ class alignment_result //!\brief Befriend alignment result builder. template - requires detail::is_type_specialisation_of_v + requires seqan3::detail::is_type_specialisation_of_v friend class detail::policy_alignment_result_builder; public: diff --git a/include/seqan3/alignment/pairwise/detail/policy_alignment_result_builder.hpp b/include/seqan3/alignment/pairwise/detail/policy_alignment_result_builder.hpp index 35d15ef503..bb69512716 100644 --- a/include/seqan3/alignment/pairwise/detail/policy_alignment_result_builder.hpp +++ b/include/seqan3/alignment/pairwise/detail/policy_alignment_result_builder.hpp @@ -32,7 +32,7 @@ namespace seqan3::detail * Implements the interfaces to build the alignment result based on the previously selected output configurations. */ template - requires is_type_specialisation_of_v + requires seqan3::detail::is_type_specialisation_of_v class policy_alignment_result_builder { protected: diff --git a/include/seqan3/alphabet/views/translate_join.hpp b/include/seqan3/alphabet/views/translate_join.hpp index 333c7732a1..4d6b2f15ae 100644 --- a/include/seqan3/alphabet/views/translate_join.hpp +++ b/include/seqan3/alphabet/views/translate_join.hpp @@ -68,7 +68,7 @@ class view_translate_join : public std::ranges::view_base //!\} //!\brief Befriend the following class s.t. iterator and const_iterator can be defined for this type. - template typename> + template typename derived_t_template, typename... args_t> friend class detail::random_access_iterator_base; public: diff --git a/include/seqan3/search/detail/policy_search_result_builder.hpp b/include/seqan3/search/detail/policy_search_result_builder.hpp index 9bea8cd771..43310c7970 100644 --- a/include/seqan3/search/detail/policy_search_result_builder.hpp +++ b/include/seqan3/search/detail/policy_search_result_builder.hpp @@ -23,7 +23,7 @@ namespace seqan3::detail //!\brief Provides the function `make_results` if inherited by a search algorithm. //!\ingroup search template - requires is_type_specialisation_of_v + requires seqan3::detail::is_type_specialisation_of_v struct policy_search_result_builder { protected: diff --git a/include/seqan3/search/search_result.hpp b/include/seqan3/search/search_result.hpp index c9a8202259..a55c546f73 100644 --- a/include/seqan3/search/search_result.hpp +++ b/include/seqan3/search/search_result.hpp @@ -28,7 +28,7 @@ namespace seqan3::detail { // forward declaration template - requires is_type_specialisation_of_v + requires seqan3::detail::is_type_specialisation_of_v struct policy_search_result_builder; } // namespace seqan3::detail @@ -89,7 +89,7 @@ class search_result // Grant the policy access to private constructors. template - requires detail::is_type_specialisation_of_v + requires seqan3::detail::is_type_specialisation_of_v friend struct detail::policy_search_result_builder; public: diff --git a/include/seqan3/utility/views/interleave.hpp b/include/seqan3/utility/views/interleave.hpp index 2e36b6612b..1fed9be139 100644 --- a/include/seqan3/utility/views/interleave.hpp +++ b/include/seqan3/utility/views/interleave.hpp @@ -83,7 +83,7 @@ class view_interleave : public std::ranges::view_interface typename derived_t_template> + template typename derived_t_template, typename... args_t> friend class detail::random_access_iterator_base; public: diff --git a/include/seqan3/utility/views/repeat.hpp b/include/seqan3/utility/views/repeat.hpp index 6fc6f159e5..0f86637cc2 100644 --- a/include/seqan3/utility/views/repeat.hpp +++ b/include/seqan3/utility/views/repeat.hpp @@ -81,7 +81,7 @@ class repeat_view : public std::ranges::view_interface> //!\} //!\brief Befriend the following class s.t. iterator and const_iterator can be defined for this type. - template + template typename derived_t_template, typename... args_t> friend class detail::random_access_iterator_base; public: From a3304ab75c4da20b3c8fc3c83438eae4d7abe354 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 11:11:51 +0200 Subject: [PATCH 09/21] [FIX] Mismatched tags (class/struct) --- include/seqan3/search/fm_index/fm_index.hpp | 2 +- include/seqan3/utility/simd/views/to_simd.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/seqan3/search/fm_index/fm_index.hpp b/include/seqan3/search/fm_index/fm_index.hpp index f9853832c9..bfdc3174f3 100644 --- a/include/seqan3/search/fm_index/fm_index.hpp +++ b/include/seqan3/search/fm_index/fm_index.hpp @@ -399,7 +399,7 @@ class fm_index friend class fm_index_cursor; template - friend class detail::fm_index_cursor_node; + friend struct detail::fm_index_cursor_node; /*!\name Constructors, destructor and assignment * \{ diff --git a/include/seqan3/utility/simd/views/to_simd.hpp b/include/seqan3/utility/simd/views/to_simd.hpp index 38d0422b11..5746a5ce49 100644 --- a/include/seqan3/utility/simd/views/to_simd.hpp +++ b/include/seqan3/utility/simd/views/to_simd.hpp @@ -99,7 +99,7 @@ class view_to_simd : public std::ranges::view_interface Date: Thu, 28 Sep 2023 11:35:27 +0200 Subject: [PATCH 10/21] [FIX] Member might not be default initializable --- .../seqan3/alignment/configuration/align_config_on_result.hpp | 2 +- include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp | 2 +- include/seqan3/search/configuration/on_result.hpp | 2 +- include/seqan3/utility/views/pairwise_combine.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/seqan3/alignment/configuration/align_config_on_result.hpp b/include/seqan3/alignment/configuration/align_config_on_result.hpp index 6623a1fcb3..36f938ee19 100644 --- a/include/seqan3/alignment/configuration/align_config_on_result.hpp +++ b/include/seqan3/alignment/configuration/align_config_on_result.hpp @@ -54,7 +54,7 @@ class on_result : private seqan3::pipeable_config_element { public: //!\brief The stored callable which will be invoked with the alignment result. - seqan3::detail::copyable_wrapper_t callback{}; // Allows lambdas with capture blocks. + seqan3::detail::copyable_wrapper_t callback; // Allows lambdas with capture blocks. /*!\name Constructors, destructor and assignment * \{ diff --git a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp index aac99bd70c..5f2718e036 100644 --- a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp +++ b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp @@ -289,7 +289,7 @@ class trace_matrix_full::iterator::column_proxy : public std::ranges::v { private: //!\brief The represented column. - matrix_column_type column{}; + matrix_column_type column; public: /*!\name Constructor, assignment and destructor diff --git a/include/seqan3/search/configuration/on_result.hpp b/include/seqan3/search/configuration/on_result.hpp index 2f1d0e4678..f176e89aa6 100644 --- a/include/seqan3/search/configuration/on_result.hpp +++ b/include/seqan3/search/configuration/on_result.hpp @@ -55,7 +55,7 @@ class on_result : private seqan3::pipeable_config_element { public: //!\brief The stored callable which will be invoked with the search result. - seqan3::detail::copyable_wrapper_t callback{}; // Allows lambdas with capture blocks. + seqan3::detail::copyable_wrapper_t callback; // Allows lambdas with capture blocks. /*!\name Constructors, destructor and assignment * \{ diff --git a/include/seqan3/utility/views/pairwise_combine.hpp b/include/seqan3/utility/views/pairwise_combine.hpp index 84bc7a0a2c..50e76fc9ea 100644 --- a/include/seqan3/utility/views/pairwise_combine.hpp +++ b/include/seqan3/utility/views/pairwise_combine.hpp @@ -218,7 +218,7 @@ class pairwise_combine_view : public std::ranges::view_interface back_iterator{}; }; From 5040fc5399b6d2a359ac842fcedd9cb1f797fa02 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 14:37:25 +0200 Subject: [PATCH 11/21] [FIX] Workaround clang span alphabet_variant --- .../alphabet/composite/alphabet_variant.hpp | 43 +++++++++++++------ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/include/seqan3/alphabet/composite/alphabet_variant.hpp b/include/seqan3/alphabet/composite/alphabet_variant.hpp index 3f1642d02b..fd7444d055 100644 --- a/include/seqan3/alphabet/composite/alphabet_variant.hpp +++ b/include/seqan3/alphabet/composite/alphabet_variant.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -28,6 +29,17 @@ namespace seqan3::detail { +//!\brief Helper to determine whether a type is a std::span. +template +struct is_span : std::false_type +{}; + +//!\cond +template +struct is_span> : std::true_type +{}; +//!\endcond + //!\brief Prevents wrong instantiations of std::alphabet_variant's constructors. template inline constexpr bool variant_general_guard = @@ -193,7 +205,7 @@ class alphabet_variant : * \stableapi{Since version 3.1.} */ template - requires (!std::same_as) + requires (!std::same_as) && (!detail::is_span::value) && (!std::is_base_of_v) && (!list_traits::contains< alphabet_variant, @@ -223,10 +235,11 @@ class alphabet_variant : * \experimentalapi{Experimental since version 3.1.} */ template - requires ( - (detail::instantiate_if_v, - detail::variant_general_guard> - || ...)) + requires (!detail::is_span::value) + && (( + detail::instantiate_if_v, + detail::variant_general_guard> + || ...)) constexpr alphabet_variant(indirect_alternative_t const rhs) noexcept { using alternative_predicate = detail::implicitly_convertible_from; @@ -403,10 +416,12 @@ class alphabet_variant : * \stableapi{Since version 3.1.} */ template - friend constexpr auto - operator==(alphabet_variant_t const lhs, indirect_alternative_type const rhs) noexcept -> std::enable_if_t< - detail::variant_comparison_guard, - bool> + requires (!detail::is_span::value) + && (detail::variant_comparison_guard) + friend constexpr bool operator==(alphabet_variant_t const lhs, indirect_alternative_type const rhs) noexcept { using alternative_predicate = detail::weakly_equality_comparable_with_; constexpr auto alternative_position = @@ -428,10 +443,12 @@ class alphabet_variant : //!\copydoc operator==(alphabet_variant_t const lhs, indirect_alternative_type const rhs) template - friend constexpr auto operator==(indirect_alternative_type const lhs, alphabet_variant_t const rhs) noexcept - -> std::enable_if_t< - detail::variant_comparison_guard, - bool> + requires (!detail::is_span::value) + && (detail::variant_comparison_guard) + friend constexpr bool operator==(indirect_alternative_type const lhs, alphabet_variant_t const rhs) noexcept { return rhs == lhs; } From 9fa8e3991057b550d4d42360e08976fc8129e231 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 15:02:19 +0200 Subject: [PATCH 12/21] [FIX] Parentheses in requires --- include/seqan3/alignment/pairwise/detail/concept.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/seqan3/alignment/pairwise/detail/concept.hpp b/include/seqan3/alignment/pairwise/detail/concept.hpp index b8c946a331..37392ca1a8 100644 --- a/include/seqan3/alignment/pairwise/detail/concept.hpp +++ b/include/seqan3/alignment/pairwise/detail/concept.hpp @@ -105,7 +105,7 @@ concept indexed_sequence_pair_range = //!\cond template concept align_pairwise_single_input = - sequence_pair> && std::is_lvalue_reference_v + (sequence_pair> && std::is_lvalue_reference_v) || (std::ranges::viewable_range>> && std::ranges::viewable_range>>); //!\endcond From 362ee37f152afd4f1b3cd6c65d54fa0f0dbad088 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 16:08:04 +0200 Subject: [PATCH 13/21] [FIX] Comparison of repeat_view --- include/seqan3/utility/views/repeat.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/seqan3/utility/views/repeat.hpp b/include/seqan3/utility/views/repeat.hpp index 0f86637cc2..0acaf93daa 100644 --- a/include/seqan3/utility/views/repeat.hpp +++ b/include/seqan3/utility/views/repeat.hpp @@ -248,10 +248,15 @@ class repeat_view::basic_iterator : public detail::random_access_iterat /*!\name Comparison operators * \{ */ - //!\brief Inherit the equality comparison (same type) from base type. - using base_t::operator==; - //!\brief Inherit the inequality comparison (same type) from base type. - using base_t::operator!=; + constexpr bool operator==(basic_iterator const & rhs) const noexcept + { + return base_t::operator==(rhs); + } + + constexpr bool operator!=(basic_iterator const & rhs) const noexcept + { + return !(*this == rhs); + } //!\brief Equality comparison to the sentinel always returns false on an infinite view. constexpr bool operator==(std::default_sentinel_t const &) const noexcept From 87fec13850d03a27ef8e1f9ff9893e37f06aaa3a Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 16:43:05 +0200 Subject: [PATCH 14/21] [FIX] Cyclic requires --- include/seqan3/alphabet/composite/semialphabet_any.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/seqan3/alphabet/composite/semialphabet_any.hpp b/include/seqan3/alphabet/composite/semialphabet_any.hpp index 79f1834e6e..2bb2f1f1f8 100644 --- a/include/seqan3/alphabet/composite/semialphabet_any.hpp +++ b/include/seqan3/alphabet/composite/semialphabet_any.hpp @@ -71,8 +71,9 @@ class semialphabet_any : public alphabet_base, size, void * \details * \stableapi{Since version 3.1.} */ - template - requires (alphabet_size == size) + template + requires (!std::same_as) + && semialphabet && (alphabet_size == size) explicit semialphabet_any(other_alph_t const other) { assign_rank(seqan3::to_rank(other)); @@ -83,8 +84,9 @@ class semialphabet_any : public alphabet_base, size, void * \details * \stableapi{Since version 3.1.} */ - template - requires ((alphabet_size == size) && std::regular) + template + requires (!std::same_as) + && semialphabet && (alphabet_size == size) && std::regular explicit operator other_alph_t() const { other_alph_t other{}; From 24a3fa1932524eb50b54cfbc898d63578ec15314 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 17:26:56 +0200 Subject: [PATCH 15/21] [FIX] Workaround cpp23+clang tuple weirdness --- test/unit/io/sam_file/sam_file_format_test_template.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit/io/sam_file/sam_file_format_test_template.hpp b/test/unit/io/sam_file/sam_file_format_test_template.hpp index aa3bd0a90e..516b04021d 100644 --- a/test/unit/io/sam_file/sam_file_format_test_template.hpp +++ b/test/unit/io/sam_file/sam_file_format_test_template.hpp @@ -280,6 +280,9 @@ TYPED_TEST_P(sam_file_read, read_in_almost_nothing) TYPED_TEST_P(sam_file_read, read_mate_but_not_ref_id_with_ref) { +#if __cplusplus > 202002L && defined(__clang__) + GTEST_SKIP() << "Weird error with clang and CPP23 tuples"; +#else { /*with reference information*/ typename TestFixture::stream_type istream{this->simple_three_reads_input}; seqan3::sam_file_input fin{istream, @@ -292,10 +295,14 @@ TYPED_TEST_P(sam_file_read, read_mate_but_not_ref_id_with_ref) for (auto & [mate] : fin) EXPECT_EQ(mate, this->mates[i++]); } +#endif } TYPED_TEST_P(sam_file_read, read_mate_but_not_ref_id_without_ref) { +#if __cplusplus > 202002L && defined(__clang__) + GTEST_SKIP() << "Weird error with clang and CPP23 tuples"; +#else [[maybe_unused]] std::tuple, std::optional, int32_t> mate; { /*no reference information*/ @@ -306,6 +313,7 @@ TYPED_TEST_P(sam_file_read, read_mate_but_not_ref_id_without_ref) for (auto & [mate] : fin) EXPECT_EQ(mate, this->mates[i++]); } +#endif } TYPED_TEST_P(sam_file_read, cigar_vector) From 13c900dcc625ccc66d55169c56f7aca676e86350 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 17:55:35 +0200 Subject: [PATCH 16/21] [FIX] Braces around scalar initializer Clang in CPP20 mode emits bogus warnings for seqan3::pod_tuple --- .../argument_parser/argument_parser.hpp | 2 +- include/seqan3/utility/tuple/split.hpp | 13 +- .../detail/format_help_test.cpp | 2 +- .../sequence_file_format_fastq_test.cpp | 100 +++++++-------- .../io/structure_file/format_vienna_test.cpp | 114 +++++++++--------- test/unit/utility/tuple/pod_tuple_test.cpp | 5 + test/unit/utility/tuple/pop_front_test.cpp | 6 + test/unit/utility/tuple/split_test.cpp | 6 + 8 files changed, 138 insertions(+), 110 deletions(-) diff --git a/include/seqan3/argument_parser/argument_parser.hpp b/include/seqan3/argument_parser/argument_parser.hpp index 23616ab9b0..fa2c05c1f0 100644 --- a/include/seqan3/argument_parser/argument_parser.hpp +++ b/include/seqan3/argument_parser/argument_parser.hpp @@ -773,7 +773,7 @@ class argument_parser { if (argv_len <= i + 1) throw too_few_arguments{"Option --export-help must be followed by a value."}; - export_format = {argv[i + 1]}; + export_format = argv[i + 1]; } if (export_format == "html") diff --git a/include/seqan3/utility/tuple/split.hpp b/include/seqan3/utility/tuple/split.hpp index ec8f39f1ef..9ad99a163c 100644 --- a/include/seqan3/utility/tuple/split.hpp +++ b/include/seqan3/utility/tuple/split.hpp @@ -37,7 +37,10 @@ template typename tuple_t, size_t... Is, typ requires tuple_like> && tuple_like> constexpr auto tuple_split(tuple_t const & t, std::index_sequence const & SEQAN3_DOXYGEN_ONLY(idx)) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" return tuple_t>...>{std::get(t)...}; +#pragma GCC diagnostic pop } //!\copydoc seqan3::detail::tuple_split @@ -45,7 +48,10 @@ template typename tuple_t, size_t... Is, typ requires tuple_like> && tuple_like> constexpr auto tuple_split(tuple_t && t, std::index_sequence const & SEQAN3_DOXYGEN_ONLY(idx)) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" return tuple_t>...>{std::move(std::get(t))...}; +#pragma GCC diagnostic pop } } // namespace seqan3::detail @@ -85,8 +91,11 @@ constexpr auto tuple_split(tuple_t const & t) { static_assert(pivot_c <= sizeof...(ts)); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" return tuple_t{detail::tuple_split<0>(t, std::make_index_sequence{}), detail::tuple_split(t, std::make_index_sequence{})}; +#pragma GCC diagnostic pop } //!\copydoc seqan3::tuple_split @@ -95,9 +104,11 @@ template typename tuple_t, typename... t constexpr auto tuple_split(tuple_t && t) { static_assert(pivot_c <= sizeof...(ts)); - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" return tuple_t{detail::tuple_split<0>(std::move(t), std::make_index_sequence{}), detail::tuple_split(std::move(t), std::make_index_sequence{})}; +#pragma GCC diagnostic pop } /*!\brief Splits a tuple like data structure at the first position of the given type. diff --git a/test/unit/argument_parser/detail/format_help_test.cpp b/test/unit/argument_parser/detail/format_help_test.cpp index 651ac53509..1cdcc6c0a3 100644 --- a/test/unit/argument_parser/detail/format_help_test.cpp +++ b/test/unit/argument_parser/detail/format_help_test.cpp @@ -48,7 +48,7 @@ std::string const basic_version_str = "VERSION\n" std::string license_text() { - std::ifstream license_file{std::string{{SEQAN3_TEST_LICENSE_DIR}} + "/LICENSE.md"}; + std::ifstream license_file{std::string{SEQAN3_TEST_LICENSE_DIR} + "/LICENSE.md"}; EXPECT_TRUE(license_file) << "Could not open file '" SEQAN3_TEST_LICENSE_DIR "/LICENSE.md'"; std::stringstream buffer; buffer << license_file.rdbuf(); diff --git a/test/unit/io/sequence_file/sequence_file_format_fastq_test.cpp b/test/unit/io/sequence_file/sequence_file_format_fastq_test.cpp index d8a7ad0ab0..4bec7f732f 100644 --- a/test/unit/io/sequence_file/sequence_file_format_fastq_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_format_fastq_test.cpp @@ -109,69 +109,69 @@ struct read : public sequence_file_data TEST_F(read, newline_before_eof) { - input = {"@ID1\n" - "ACGTTTTTTTTTTTTTTT\n" - "+\n" - "!##$%&'()*+,-./++-\n" - "@ID2\n" - "ACGTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\n" - "+\n" - "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" - "@ID3 lala\n" - "ACGTTTA\n" - "+\n" - "!!!!!!!"}; + input = "@ID1\n" + "ACGTTTTTTTTTTTTTTT\n" + "+\n" + "!##$%&'()*+,-./++-\n" + "@ID2\n" + "ACGTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\n" + "+\n" + "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" + "@ID3 lala\n" + "ACGTTTA\n" + "+\n" + "!!!!!!!"; do_read_test(input); } TEST_F(read, whitespace_in_seq_qual) { - input = {"@ID1\n" - "ACGTTTTTTTT\nTTTTTTT\n" - "+\n" - "!##$\n%&'()*+,-./++-\n" - "@ID2\n" - "ACGTTTTTTTTTT\r\nTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTT\n" - "+\n" - "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBD\nEBDEB\nDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" - "@ID3 lala\n" - "ACGTT\nTA\n" - "+\n" - "!!!!!\n!!\n"}; + input = "@ID1\n" + "ACGTTTTTTTT\nTTTTTTT\n" + "+\n" + "!##$\n%&'()*+,-./++-\n" + "@ID2\n" + "ACGTTTTTTTTTT\r\nTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTT\n" + "+\n" + "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBD\nEBDEB\nDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" + "@ID3 lala\n" + "ACGTT\nTA\n" + "+\n" + "!!!!!\n!!\n"; do_read_test(input); } TEST_F(read, double_id_style) { - input = {"@ID1\n" - "ACGTTTTTTTTTTTTTTT\n" - "+ID1\n" - "!##$%&'()*+,-./++-\n" - "@ID2\n" - "ACGTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\n" - "+ID2\n" - "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" - "@ID3 lala\n" - "ACGTTTA\n" - "+ID3 lala\n" - "!!!!!!!\n"}; + input = "@ID1\n" + "ACGTTTTTTTTTTTTTTT\n" + "+ID1\n" + "!##$%&'()*+,-./++-\n" + "@ID2\n" + "ACGTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\n" + "+ID2\n" + "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" + "@ID3 lala\n" + "ACGTTTA\n" + "+ID3 lala\n" + "!!!!!!!\n"; do_read_test(input); } TEST_F(read, mixed_issues) { - input = {"@ID1\n" - "ACGTTTTTTTT\nTTTTTTT\n" - "+\n" - "!##$\n%&'()*+,-./++-\n" - "@ID2\n" - "ACGTTTTTTTTTT\r\nTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTT\n" - "+\n" - "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBD\nEBDEB\nDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" - "@ID3 lala\n" - "ACGTT\nTA\n" - "+ID3 lala\n" - "!!!!!\n!!"}; + input = "@ID1\n" + "ACGTTTTTTTT\nTTTTTTT\n" + "+\n" + "!##$\n%&'()*+,-./++-\n" + "@ID2\n" + "ACGTTTTTTTTTT\r\nTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\r\nTTTTTTTTTTTTTTTTTTTTTTT\n" + "+\n" + "!##$&'()*+,-./+)*+,-)*+,-)*+,-)*+,BDEBDEBD\nEBDEB\nDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDEBDE\n" + "@ID3 lala\n" + "ACGTT\nTA\n" + "+ID3 lala\n" + "!!!!!\n!!"; do_read_test(input); } @@ -188,8 +188,8 @@ TEST_F(read, only_qual) //TODO fail_no_2nd_id TEST_F(read, fail_no_seq_after_id) { - std::stringstream istream{input = {"@ID1\n" - "ACGTTTTTTTTTTTTTTT"}}; + std::stringstream istream{input = "@ID1\n" + "ACGTTTTTTTTTTTTTTT"}; seqan3::sequence_file_input fin{istream, seqan3::format_fastq{}}; EXPECT_THROW(fin.begin(), seqan3::unexpected_end_of_input); diff --git a/test/unit/io/structure_file/format_vienna_test.cpp b/test/unit/io/structure_file/format_vienna_test.cpp index 3f79815265..9c9529f512 100644 --- a/test/unit/io/structure_file/format_vienna_test.cpp +++ b/test/unit/io/structure_file/format_vienna_test.cpp @@ -140,68 +140,68 @@ TEST_F(read, standard) TEST_F(read, newline_before_eof) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" - "> example 2\n" - "UUGGAGUACACAACCUGUACACUCUUUC\n" - "..(((((..(((...)))..)))))... (-3.71)"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" + "> example 2\n" + "UUGGAGUACACAACCUGUACACUCUUUC\n" + "..(((((..(((...)))..)))))... (-3.71)"; do_read_test(input); } TEST_F(read, whitespace_in_seq) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCU CAGUUGGGAGAGCGCCAGACU GAAGAUUUGGAGGUC CUGUGUUCGAUCCACA GAAUU CGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" - "> example 2\n" - "UUGGAGUAC ACAACCUGUACAC UCUUUC \n" - "..(((((..(((...)))..)))))... (-3.71)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCU CAGUUGGGAGAGCGCCAGACU GAAGAUUUGGAGGUC CUGUGUUCGAUCCACA GAAUU CGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" + "> example 2\n" + "UUGGAGUAC ACAACCUGUACAC UCUUUC \n" + "..(((((..(((...)))..)))))... (-3.71)\n"; do_read_test(input); } TEST_F(read, no_energies) { check_energy = false; - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))).\n" - "> example 2\n" - "UUGGAGUACACAACCUGUACACUCUUUC\n" - "..(((((..(((...)))..)))))...\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))).\n" + "> example 2\n" + "UUGGAGUACACAACCUGUACACUCUUUC\n" + "..(((((..(((...)))..)))))...\n"; do_read_test(input); } TEST_F(read, no_ids) { check_id = false; - input = {"GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" - "UUGGAGUACACAACCUGUACACUCUUUC\n" - "..(((((..(((...)))..)))))... (-3.71)\n"}; + input = "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" + "UUGGAGUACACAACCUGUACACUCUUUC\n" + "..(((((..(((...)))..)))))... (-3.71)\n"; do_read_test(input); } TEST_F(read, spaces_and_carriage_return) { check_id = false; - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\r\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\r\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.5)\r\n" - ">example 2\r\n" - "UUGGAGUA CACAACCUGUACA CUCU UUC \r\n" - "..(((((..(((...)))..)))))... ( -3.71 )\r\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\r\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\r\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.5)\r\n" + ">example 2\r\n" + "UUGGAGUA CACAACCUGUACA CUCU UUC \r\n" + "..(((((..(((...)))..)))))... ( -3.71 )\r\n"; do_read_test(input); } TEST_F(read, options_truncate_ids) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" - "> example 2\n" - "UUGGAGUACACAACCUGUACACUCUUUC\n" - "..(((((..(((...)))..)))))... (-3.71)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n" + "> example 2\n" + "UUGGAGUACACAACCUGUACACUCUUUC\n" + "..(((((..(((...)))..)))))... (-3.71)\n"; options.truncate_ids = true; expected_id = {"S.cerevisiae_tRNA-PHE", "example"}; @@ -280,8 +280,8 @@ TEST_F(read_fail, wrong_id) TEST_F(read_fail, missing_seq) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); @@ -289,10 +289,10 @@ TEST_F(read_fail, missing_seq) TEST_F(read_fail, missing_structure) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "> example 2\n" - "UUGGAGUACACAACCUGUACACUCUUUC\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "> example 2\n" + "UUGGAGUACACAACCUGUACACUCUUUC\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); @@ -300,8 +300,8 @@ TEST_F(read_fail, missing_structure) TEST_F(read_fail, missing_structure_and_id) { - input = {"GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "UUGGAGUACACAACCUGUACACUCUUUC\n"}; + input = "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "UUGGAGUACACAACCUGUACACUCUUUC\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); @@ -309,9 +309,9 @@ TEST_F(read_fail, missing_structure_and_id) TEST_F(read_fail, structure_too_long) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))).. (-17.50)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))).. (-17.50)\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); @@ -319,9 +319,9 @@ TEST_F(read_fail, structure_too_long) TEST_F(read_fail, structure_too_short) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))) (-17.50)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))) (-17.50)\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); @@ -329,9 +329,9 @@ TEST_F(read_fail, structure_too_short) TEST_F(read_fail, structure_too_long_structured_seq) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))).. (-17.50)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))).. (-17.50)\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}, seqan3::fields{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); @@ -339,9 +339,9 @@ TEST_F(read_fail, structure_too_long_structured_seq) TEST_F(read_fail, structure_too_short_structured_seq) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))) (-17.50)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))) (-17.50)\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}, seqan3::fields{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); @@ -349,9 +349,9 @@ TEST_F(read_fail, structure_too_short_structured_seq) TEST_F(read_fail, wrong_char) { - input = {"> S.cerevisiae_tRNA-PHE M10740/1-73\n" - "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUICUGUGUUCGAUCCACAGAAUUCGCA\n" - "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n"}; + input = "> S.cerevisiae_tRNA-PHE M10740/1-73\n" + "GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUICUGUGUUCGAUCCACAGAAUUCGCA\n" + "(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))). (-17.50)\n"; std::stringstream istream{input}; seqan3::structure_file_input fin{istream, seqan3::format_vienna{}}; EXPECT_THROW(fin.begin(), seqan3::parse_error); diff --git a/test/unit/utility/tuple/pod_tuple_test.cpp b/test/unit/utility/tuple/pod_tuple_test.cpp index 623a4824ec..13d0dc7574 100644 --- a/test/unit/utility/tuple/pod_tuple_test.cpp +++ b/test/unit/utility/tuple/pod_tuple_test.cpp @@ -11,6 +11,9 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" + // default/zero construction TEST(pod_tuple_ctr, ctr) { @@ -248,3 +251,5 @@ TEST(pod_tuple_cmp, cmp) EXPECT_GE(t2, t1); EXPECT_GT(t2, t1); } + +#pragma GCC diagnostic pop diff --git a/test/unit/utility/tuple/pop_front_test.cpp b/test/unit/utility/tuple/pop_front_test.cpp index 30eaf28c65..7cb9924801 100644 --- a/test/unit/utility/tuple/pop_front_test.cpp +++ b/test/unit/utility/tuple/pop_front_test.cpp @@ -17,6 +17,10 @@ #include #include "my_tuple.hpp" + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" + struct bar : public seqan3::detail::strong_type { using seqan3::detail::strong_type::strong_type; @@ -109,3 +113,5 @@ TYPED_TEST(tuple_pop_front, tuple_split_and_pop) EXPECT_TRUE((std::is_same_v, std::tuple>)); } } + +#pragma GCC diagnostic pop diff --git a/test/unit/utility/tuple/split_test.cpp b/test/unit/utility/tuple/split_test.cpp index 9e40cac2f5..21c52f057c 100644 --- a/test/unit/utility/tuple/split_test.cpp +++ b/test/unit/utility/tuple/split_test.cpp @@ -16,6 +16,10 @@ #include #include "my_tuple.hpp" + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-braces" + struct bar : public seqan3::detail::strong_type { using seqan3::detail::strong_type::strong_type; @@ -260,3 +264,5 @@ TYPED_TEST(tuple_split, by_type_const_rvalue) EXPECT_FLOAT_EQ(std::get<3>(std::get<1>(res)), 2.1); } } + +#pragma GCC diagnostic pop From 923fc7db94d9b2eccd9a67c4ab2934493902ccef Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 18:00:05 +0200 Subject: [PATCH 17/21] [FIX] Operator precedence overloaded <> has higher precedence than == --- test/unit/utility/container/dynamic_bitset_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/utility/container/dynamic_bitset_test.cpp b/test/unit/utility/container/dynamic_bitset_test.cpp index 6ac32eb9a8..36c3a500a3 100644 --- a/test/unit/utility/container/dynamic_bitset_test.cpp +++ b/test/unit/utility/container/dynamic_bitset_test.cpp @@ -423,7 +423,7 @@ constexpr bool shift_left_test() { seqan3::dynamic_bitset t1{0b1111'0001'0000'1100}; - bool res = t1 << 3 == seqan3::dynamic_bitset{0b1000'1000'0110'0000}; + bool res = (t1 << 3) == seqan3::dynamic_bitset{0b1000'1000'0110'0000}; t1 <<= 4; res &= t1 == seqan3::dynamic_bitset{"0001000011000000"}; @@ -441,7 +441,7 @@ constexpr bool shift_right_test() { seqan3::dynamic_bitset t1{0b1111'0001'0000'1100}; - bool res = t1 >> 3 == seqan3::dynamic_bitset{"0001111000100001"}; + bool res = (t1 >> 3) == seqan3::dynamic_bitset{"0001111000100001"}; t1 >>= 4; res &= t1 == seqan3::dynamic_bitset{"0000111100010000"}; From ea9956bfb26e9f25c8778558105e334dbf570baa Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 18:57:30 +0200 Subject: [PATCH 18/21] [INFRA] CMake --- build_system/seqan3-config.cmake | 12 ++---------- include/seqan3/core/platform.hpp | 12 ++++++++++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build_system/seqan3-config.cmake b/build_system/seqan3-config.cmake index 8849ea386b..37f24a6c0d 100644 --- a/build_system/seqan3-config.cmake +++ b/build_system/seqan3-config.cmake @@ -196,16 +196,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VER message (FATAL_ERROR "GCC < 10 is not supported. The detected compiler version is ${CMAKE_CXX_COMPILER_VERSION}.") endif () -option (SEQAN3_DISABLE_COMPILER_CHECK "Skips the check for supported compilers." OFF) - -if (NOT SEQAN3_DISABLE_COMPILER_CHECK) - if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - message (FATAL_ERROR "Only GCC is supported. " - "The detected compiler version is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}. " - "You can disable this error by passing -DSEQAN3_DISABLE_COMPILER_CHECK=ON to CMake.") - endif () -else () - set (SEQAN3_DEFINITIONS ${SEQAN3_DEFINITIONS} "-DSEQAN3_DISABLE_COMPILER_CHECK") +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17) + message (FATAL_ERROR "Clang < 17 is not supported. The detected compiler version is ${CMAKE_CXX_COMPILER_VERSION}.") endif () # ---------------------------------------------------------------------------- diff --git a/include/seqan3/core/platform.hpp b/include/seqan3/core/platform.hpp index 1fd92faa79..79417e795b 100644 --- a/include/seqan3/core/platform.hpp +++ b/include/seqan3/core/platform.hpp @@ -86,13 +86,21 @@ # endif // (__GNUC__ > 13) # endif // SEQAN3_DISABLE_NEWER_COMPILER_DIAGNOSTIC +// ============================================================================ +// Compiler support Clang +// ============================================================================ + +#elif defined(__clang__) +# if __clang_major__ < 17 +# error "Only Clang >= 17 is supported." +# endif + // ============================================================================ // Compiler support other // ============================================================================ #elif !defined(SEQAN3_DISABLE_COMPILER_CHECK) -# error \ - "Your compiler is not supported. Currently, only GCC is known to work. You can disable this error by setting -DSEQAN3_DISABLE_COMPILER_CHECK." +# error "Your compiler is not supported. You can disable this error by setting -DSEQAN3_DISABLE_COMPILER_CHECK." #endif // SEQAN3_COMPILER_IS_GCC // ============================================================================ From dfba50bd4f31232b2cae6c164b916935cc32d89e Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 19:30:46 +0200 Subject: [PATCH 19/21] [INFRA] CI --- .github/workflows/ci_linux.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 5df96d8d22..1e0c04e3fe 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -31,6 +31,11 @@ jobs: fail-fast: true matrix: include: + - name: "clang17" + compiler: "clang-17" + build: unit + build_type: Release + - name: "gcc13" compiler: "gcc-13" build: unit From 64dc64b58f53df7d3da2c09e94259e89c7ccfb8c Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 19:35:57 +0200 Subject: [PATCH 20/21] [FIX] Change constexpr test gcc11 complains suddenly --- .../range/detail/adaptor_for_view_without_args_test.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp b/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp index bba194407f..460fab223c 100644 --- a/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp +++ b/test/unit/core/range/detail/adaptor_for_view_without_args_test.cpp @@ -19,8 +19,7 @@ struct dummy_view TEST(adaptor_combination, constexpr_combine) { - [[maybe_unused]] constexpr auto adaptor1 = seqan3::detail::adaptor_for_view_without_args{}; - [[maybe_unused]] constexpr auto adaptor2 = seqan3::detail::adaptor_for_view_without_args{}; - - EXPECT_TRUE((SEQAN3_IS_CONSTEXPR(adaptor1 | adaptor2))); + constexpr auto adaptor1 = seqan3::detail::adaptor_for_view_without_args{}; + constexpr auto adaptor2 = seqan3::detail::adaptor_for_view_without_args{}; + [[maybe_unused]] static constinit auto combined = adaptor1 | adaptor2; } From 62392a1c7ba5413d4983c1742425bd83a05b526d Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 21:28:37 +0200 Subject: [PATCH 21/21] [FIX] take_until_view_test mutable refers to the capture --- test/unit/io/views/detail/take_until_view_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/io/views/detail/take_until_view_test.cpp b/test/unit/io/views/detail/take_until_view_test.cpp index c1d459a50d..8f34f70146 100644 --- a/test/unit/io/views/detail/take_until_view_test.cpp +++ b/test/unit/io/views/detail/take_until_view_test.cpp @@ -131,9 +131,11 @@ TEST(view_take_until, concepts) do_concepts(adapt, true); // mutable adapters make the view lose const-iterability + char c2 = 'a'; auto adapt2 = seqan3::detail::take_until( - [](char c) mutable + [c2](char c) mutable { + c2 = 'b'; return c == '\n'; }); do_concepts(adapt2, false);