diff --git a/include/seqan3/io/sam_file/format_bam.hpp b/include/seqan3/io/sam_file/format_bam.hpp index 7502bedd20..fd79b318c4 100644 --- a/include/seqan3/io/sam_file/format_bam.hpp +++ b/include/seqan3/io/sam_file/format_bam.hpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp b/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp index 4792e1de47..7604c76120 100644 --- a/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp +++ b/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp @@ -189,7 +189,7 @@ class interleaved_bloom_filter class membership_agent_type; // documented upon definition below - template + template class counting_agent_type; // documented upon definition below /*!\name Constructors, destructor and assignment @@ -960,10 +960,12 @@ class counting_vector : public std::vector * \include test/snippet/search/dream_index/counting_agent.cpp */ template -template +template class interleaved_bloom_filter::counting_agent_type { private: + static_assert(std::integral, "The value type must model std::integral."); + //!\brief The type of the augmented seqan3::interleaved_bloom_filter. using ibf_t = interleaved_bloom_filter; diff --git a/test/unit/io/sam_file/CMakeLists.txt b/test/unit/io/sam_file/CMakeLists.txt index 0f30ac75ad..3fae746eb4 100644 --- a/test/unit/io/sam_file/CMakeLists.txt +++ b/test/unit/io/sam_file/CMakeLists.txt @@ -5,6 +5,7 @@ seqan3_test (format_bam_test.cpp CYCLIC_DEPENDING_INCLUDES include-seqan3-io-sam_file-format_sam.hpp) seqan3_test (format_sam_test.cpp CYCLIC_DEPENDING_INCLUDES include-seqan3-io-sam_file-format_bam.hpp) seqan3_test (sam_file_input_test.cpp) +seqan3_test (sam_file_output_include_test.cpp) seqan3_test (sam_file_output_test.cpp) seqan3_test (sam_file_record_test.cpp) seqan3_test (sam_file_seek_test.cpp) diff --git a/test/unit/io/sam_file/sam_file_output_include_test.cpp b/test/unit/io/sam_file/sam_file_output_include_test.cpp new file mode 100644 index 0000000000..7b800cae53 --- /dev/null +++ b/test/unit/io/sam_file/sam_file_output_include_test.cpp @@ -0,0 +1,26 @@ +// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin +// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik +// SPDX-License-Identifier: BSD-3-Clause + +#include + +// seqan3/io/sam_file/format_bam.hpp did not include core/debug_stream/tuple.hpp +// having only the following include leads to a compile error +#include + +TEST(sam_file_output, include) +{ + using sam_file_output_t = seqan3::sam_file_output, + seqan3::type_list, + std::vector>; + std::string buffer{}; + std::ostringstream stream{buffer}; + { + sam_file_output_t out{stream, std::vector{}, std::vector{}, seqan3::format_sam{}}; + out.emplace_back(std::string{}); + } + { + sam_file_output_t out{stream, std::vector{}, std::vector{}, seqan3::format_bam{}}; + out.emplace_back(std::string{}); + } +}