From 9076e34c72dd3fc2bbb36a442899fb882865cae7 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 13:36:27 +0100 Subject: [PATCH 01/22] [INFRA] Drop gcc9 from CI --- .github/workflows/api.yml | 2 +- .github/workflows/avx2.yml | 2 +- .github/workflows/ci_linux.yml | 7 ------- .github/workflows/ci_macos.yml | 8 -------- .github/workflows/ci_misc.yml | 26 +++++++++++++------------- .github/workflows/latest_libraries.yml | 2 +- 6 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 61eea225bd..ff3f7f65d9 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [9, 10, 11] + compiler: [10, 11] steps: - name: Checkout SeqAn3 diff --git a/.github/workflows/avx2.yml b/.github/workflows/avx2.yml index d7998bb587..6036d9e120 100644 --- a/.github/workflows/avx2.yml +++ b/.github/workflows/avx2.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [9, 10, 11] + compiler: [10, 11] build: [unit, snippet, performance, header] steps: diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index feefa00dfe..f2e3471969 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -52,13 +52,6 @@ jobs: build: unit build_type: Release - - name: "Unit gcc9 (c++2a)" - cxx: "g++-9" - cc: "gcc-9" - build: unit - build_type: Release - cxx_flags: "-std=c++2a" - steps: - name: Checkout SeqAn3 uses: actions/checkout@v2 diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 8eb2695437..b582a73b28 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -48,14 +48,6 @@ jobs: build: unit build_type: Release - - name: "Unit gcc9 (c++2a)" - os: macos-10.15 - cxx: "g++-9" - cc: "gcc-9" - build: unit - build_type: Release - cxx_flags: "-std=c++2a" - steps: - name: Checkout SeqAn3 uses: actions/checkout@v2 diff --git a/.github/workflows/ci_misc.yml b/.github/workflows/ci_misc.yml index 0a0817d000..b6b8b38964 100644 --- a/.github/workflows/ci_misc.yml +++ b/.github/workflows/ci_misc.yml @@ -33,9 +33,9 @@ jobs: fail-fast: false matrix: include: - - name: "Snippet gcc9" - cxx: "g++-9" - cc: "gcc-9" + - name: "Snippet gcc10" + cxx: "g++-10" + cc: "gcc-10" build: snippet build_type: Release build_threads: 2 @@ -48,9 +48,9 @@ jobs: skip_run_tests: false use_include_dependencies: "OFF" - - name: "Performance gcc9" - cxx: "g++-9" - cc: "gcc-9" + - name: "Performance gcc10" + cxx: "g++-10" + cc: "gcc-10" build: performance build_type: Release build_threads: 2 @@ -77,9 +77,9 @@ jobs: skip_run_tests: false use_include_dependencies: "OFF" - - name: "Header gcc9" - cxx: "g++-9" - cc: "gcc-9" + - name: "Header gcc10" + cxx: "g++-10" + cc: "gcc-10" build: header build_type: Release build_threads: 2 @@ -93,8 +93,8 @@ jobs: use_include_dependencies: "OFF" - name: "Non-cyclic tests" - cxx: "g++-9" - cc: "gcc-9" + cxx: "g++-10" + cc: "gcc-10" build: unit build_type: Debug build_threads: 2 @@ -108,8 +108,8 @@ jobs: use_include_dependencies: "ON" - name: "CMake external project" - cxx: "g++-9" - cc: "gcc-9" + cxx: "g++-10" + cc: "gcc-10" build: external_project build_type: Debug build_threads: 1 # output is important to be in sequential order diff --git a/.github/workflows/latest_libraries.yml b/.github/workflows/latest_libraries.yml index a4d795fbbd..42f67241e9 100644 --- a/.github/workflows/latest_libraries.yml +++ b/.github/workflows/latest_libraries.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [9, 10, 11] + compiler: [10, 11] build: [unit, snippet, performance, header] steps: From 9e6a48b7461de50c440df5054cbc7b85f8ea3d0e Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 13:36:50 +0100 Subject: [PATCH 02/22] [MISC] Drop gcc9 workaround in sequence_file_output --- include/seqan3/io/sequence_file/output.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/seqan3/io/sequence_file/output.hpp b/include/seqan3/io/sequence_file/output.hpp index 44e6204ecc..678112c23c 100644 --- a/include/seqan3/io/sequence_file/output.hpp +++ b/include/seqan3/io/sequence_file/output.hpp @@ -426,12 +426,7 @@ class sequence_file_output requires tuple_like> //!\endcond { - #if defined(__GNUC__) && (__GNUC__ == 9) // an unreported build problem of GCC9 - for (auto && record : range) - f.push_back(std::forward(record)); - #else // ^^^ workaround | regular solution ↓↓↓ f = range; - #endif return std::move(f); } //!\} From 6b1042cab7d256cb9f24390d2b8cd791456eb868 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 13:37:37 +0100 Subject: [PATCH 03/22] [MISC] Remove SEQAN3_WORKAROUND_ISSUE_286 --- .../detail/pairwise_alignment_concept.hpp | 38 ------------------- include/seqan3/core/platform.hpp | 9 ----- 2 files changed, 47 deletions(-) diff --git a/include/seqan3/alignment/detail/pairwise_alignment_concept.hpp b/include/seqan3/alignment/detail/pairwise_alignment_concept.hpp index a6fba426d6..c9326f1d2b 100644 --- a/include/seqan3/alignment/detail/pairwise_alignment_concept.hpp +++ b/include/seqan3/alignment/detail/pairwise_alignment_concept.hpp @@ -15,9 +15,6 @@ #include #include -#if SEQAN3_WORKAROUND_ISSUE_286 -#include -#endif // SEQAN3_WORKAROUND_ISSUE_286 #include namespace seqan3::detail @@ -36,26 +33,8 @@ namespace seqan3::detail template concept pairwise_alignment = pair_like && -#if SEQAN3_WORKAROUND_ISSUE_286 - aligned_sequence< - // simulate that tuple_element transfers const over to it's inner members. - transfer_type_modifier_onto_t< - std::remove_reference_t, - std::tuple_element_t<0, std::remove_cvref_t> - > - > && - aligned_sequence< - // simulate that tuple_element transfers const over to it's inner members. - transfer_type_modifier_onto_t< - std::remove_reference_t, - std::tuple_element_t<1, std::remove_cvref_t> - > - >; -#else // ^^^ workaround / no workaround vvv aligned_sequence>> && aligned_sequence>>; -#endif // SEQAN3_WORKAROUND_ISSUE_286 - //!\endcond /*!\interface seqan3::detail::writable_pairwise_alignment < > @@ -71,25 +50,8 @@ concept pairwise_alignment = template concept writable_pairwise_alignment = pairwise_alignment && -#if SEQAN3_WORKAROUND_ISSUE_286 - writable_aligned_sequence< - // simulate that tuple_element transfers const over to it's inner members. - transfer_type_modifier_onto_t< - std::remove_reference_t, - std::tuple_element_t<0, std::remove_cvref_t> - > - > && - writable_aligned_sequence< - // simulate that tuple_element transfers const over to it's inner members. - transfer_type_modifier_onto_t< - std::remove_reference_t, - std::tuple_element_t<1, std::remove_cvref_t> - > - >; -#else // ^^^ workaround / no workaround vvv writable_aligned_sequence>> && writable_aligned_sequence>>; -#endif // SEQAN3_WORKAROUND_ISSUE_286 //!\endcond } // namespace seqan3::detail diff --git a/include/seqan3/core/platform.hpp b/include/seqan3/core/platform.hpp index 59b831a9f6..064fce8423 100644 --- a/include/seqan3/core/platform.hpp +++ b/include/seqan3/core/platform.hpp @@ -227,15 +227,6 @@ # define SEQAN3_WORKAROUND_VIEW_PERFORMANCE 1 #endif -//!\brief See https://github.com/seqan/product_backlog/issues/286 -#ifndef SEQAN3_WORKAROUND_ISSUE_286 -# if defined(__GNUC__) && (__GNUC__ <= 9) -# define SEQAN3_WORKAROUND_ISSUE_286 1 -# else -# define SEQAN3_WORKAROUND_ISSUE_286 0 -# endif -#endif - //!\brief See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89953 #ifndef SEQAN3_WORKAROUND_GCC_89953 # if defined(__GNUC_MINOR__) && (__GNUC__ == 9 && __GNUC_MINOR__ < 3) From 030a1f2e1462a835369a2ad48a2c5e49410df65e Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 13:38:25 +0100 Subject: [PATCH 04/22] [MISC] Remove SEQAN3_WORKAROUND_GCC_89953 --- include/seqan3/alphabet/concept.hpp | 15 --------------- include/seqan3/alphabet/structure/concept.hpp | 15 --------------- include/seqan3/core/platform.hpp | 9 --------- 3 files changed, 39 deletions(-) diff --git a/include/seqan3/alphabet/concept.hpp b/include/seqan3/alphabet/concept.hpp index bcbe0cde54..2d05db9937 100644 --- a/include/seqan3/alphabet/concept.hpp +++ b/include/seqan3/alphabet/concept.hpp @@ -849,12 +849,6 @@ struct alphabet_size_cpo : public detail::customisation_point_object - requires requires { { alphabet_size_cpo{} }; } -inline constexpr auto alphabet_size_obj = alphabet_size_cpo{}; -#endif // SEQAN3_WORKAROUND_GCC_89953 - } // namespace seqan3::detail::adl_only namespace seqan3 @@ -903,20 +897,11 @@ namespace seqan3 * \stableapi{Since version 3.1. The name seqan3::alphabet_size, Implementation 1, * and Implementation 3 are stable and will not change.} */ -#if SEQAN3_WORKAROUND_GCC_89953 -template -//!\cond - requires requires { { detail::adl_only::alphabet_size_cpo{} }; } && - requires { { detail::adl_only::alphabet_size_obj() }; } // ICE workarounds -//!\endcond -inline constexpr auto alphabet_size = detail::adl_only::alphabet_size_obj(); -#else // ^^^ workaround / no workaround vvv template //!\cond requires requires { { detail::adl_only::alphabet_size_cpo{}() }; } //!\endcond inline constexpr auto alphabet_size = detail::adl_only::alphabet_size_cpo{}(); -#endif // SEQAN3_WORKAROUND_GCC_89953 // ============================================================================ // semialphabet diff --git a/include/seqan3/alphabet/structure/concept.hpp b/include/seqan3/alphabet/structure/concept.hpp index 62d06bb839..34d488c131 100644 --- a/include/seqan3/alphabet/structure/concept.hpp +++ b/include/seqan3/alphabet/structure/concept.hpp @@ -359,12 +359,6 @@ struct max_pseudoknot_depth_cpo : public detail::customisation_point_object - requires requires { { max_pseudoknot_depth_cpo{} }; } -inline constexpr auto max_pseudoknot_depth_obj = max_pseudoknot_depth_cpo{}; -#endif // SEQAN3_WORKAROUND_GCC_89953 - } // namespace seqan3::detail::adl_only namespace seqan3 @@ -409,20 +403,11 @@ namespace seqan3 * * \experimentalapi{Experimental since version 3.1.} */ -#if SEQAN3_WORKAROUND_GCC_89953 -template -//!\cond - requires requires { { detail::adl_only::max_pseudoknot_depth_cpo{} }; } && - requires { { detail::adl_only::max_pseudoknot_depth_obj() }; } -//!\endcond -inline constexpr auto max_pseudoknot_depth = detail::adl_only::max_pseudoknot_depth_obj(); -#else // ^^^ workaround / no workaround vvv template //!\cond requires requires { { detail::adl_only::max_pseudoknot_depth_cpo{}() }; } //!\endcond inline constexpr auto max_pseudoknot_depth = detail::adl_only::max_pseudoknot_depth_cpo{}(); -#endif // SEQAN3_WORKAROUND_GCC_89953 } // namespace seqan3 diff --git a/include/seqan3/core/platform.hpp b/include/seqan3/core/platform.hpp index 064fce8423..e03c5b93cd 100644 --- a/include/seqan3/core/platform.hpp +++ b/include/seqan3/core/platform.hpp @@ -227,15 +227,6 @@ # define SEQAN3_WORKAROUND_VIEW_PERFORMANCE 1 #endif -//!\brief See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89953 -#ifndef SEQAN3_WORKAROUND_GCC_89953 -# if defined(__GNUC_MINOR__) && (__GNUC__ == 9 && __GNUC_MINOR__ < 3) -# define SEQAN3_WORKAROUND_GCC_89953 1 -# else -# define SEQAN3_WORKAROUND_GCC_89953 0 -# endif -#endif - //!\brief See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93467 #ifndef SEQAN3_WORKAROUND_GCC_93467 // fixed since gcc10.2 # if defined(__GNUC__) && ((__GNUC__ <= 9) || (__GNUC__ == 10 && __GNUC_MINOR__ < 2)) From 7e63848aa586fcae9274a8efd704112296e797ef Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 13:40:09 +0100 Subject: [PATCH 05/22] [MISC] Drop gcc9 workaround in std/memory --- include/seqan3/std/memory | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/seqan3/std/memory b/include/seqan3/std/memory index 96c14c39db..6d924fea20 100644 --- a/include/seqan3/std/memory +++ b/include/seqan3/std/memory @@ -49,15 +49,6 @@ namespace std { -// prior to gcc-10; requires statements weren't allowed within constexpr if's -#if defined(__GNUC__) && (__GNUC__ < 10) -template -concept bool _pointer_traits_has_to_address = requires(T const & p) -{ - { std::pointer_traits::to_address(p) }; -}; -#endif // defined(__GNUC__) && (__GNUC__ < 10) - /*!\brief Obtain the address represented by p without forming a reference to the object pointed to by p. * \sa https://en.cppreference.com/w/cpp/memory/to_address * \ingroup std_memory @@ -76,11 +67,7 @@ constexpr T * to_address(T * p) noexcept template constexpr auto to_address(const T & p) noexcept { -#if defined(__GNUC__) && (__GNUC__ < 10) - if constexpr (_pointer_traits_has_to_address) -#else // ^^^ workaround / no workaround vvv if constexpr (requires { std::pointer_traits::to_address(p); }) -#endif // defined(__GNUC__) && (__GNUC__ < 10) return std::pointer_traits::to_address(p); else return std::to_address(p.operator->()); From c57dba80e81e5a337476db5852afadd3a6adff4f Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 14:08:21 +0100 Subject: [PATCH 06/22] [MISC] Remove SEQAN3_RETURN_TYPE_CONSTRAINT --- .../aligned_sequence_concept.hpp | 12 +-- .../matrix/detail/matrix_concept.hpp | 7 +- ...wo_dimensional_matrix_iterator_concept.hpp | 16 ++-- include/seqan3/alphabet/concept.hpp | 5 +- .../argument_parser/detail/format_parse.hpp | 4 +- include/seqan3/argument_parser/validators.hpp | 4 +- include/seqan3/core/platform.hpp | 9 -- .../range/detail/inherited_iterator_base.hpp | 2 +- .../io/sam_file/output_format_concept.hpp | 37 ++++---- .../io/sequence_file/input_format_concept.hpp | 14 +-- .../sequence_file/output_format_concept.hpp | 8 +- include/seqan3/io/stream/concept.hpp | 12 +-- .../structure_file/input_format_concept.hpp | 95 +++++++++---------- .../structure_file/output_format_concept.hpp | 95 +++++++++---------- include/seqan3/search/fm_index/concept.hpp | 6 +- .../char_operations/predicate_detail.hpp | 4 +- include/seqan3/utility/container/concept.hpp | 92 +++++++++--------- include/seqan3/utility/simd/concept.hpp | 37 +++----- include/seqan3/utility/tuple/concept.hpp | 12 +-- test/unit/range/iterator_test_template.hpp | 4 +- test/unit/test/seqan2_test.cpp | 4 +- 21 files changed, 216 insertions(+), 263 deletions(-) diff --git a/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp b/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp index b2069102d0..02136851d3 100644 --- a/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp +++ b/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp @@ -228,13 +228,11 @@ concept writable_aligned_sequence = requires (t v, detail::unaligned_seq_t unaligned) { // global functions for generic usability - SEQAN3_RETURN_TYPE_CONSTRAINT(insert_gap(v, std::ranges::begin(v)), std::same_as, std::ranges::iterator_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(insert_gap(v, std::ranges::begin(v), 2), - std::same_as, std::ranges::iterator_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(erase_gap(v, std::ranges::begin(v)), std::same_as, std::ranges::iterator_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(erase_gap(v, std::ranges::begin(v), std::ranges::end(v)), - std::same_as, std::ranges::iterator_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(assign_unaligned(v, unaligned), std::same_as, void); + {insert_gap(v, std::ranges::begin(v))} -> std::same_as>; + {insert_gap(v, std::ranges::begin(v), 2)} -> std::same_as>; + {erase_gap(v, std::ranges::begin(v))} -> std::same_as>; + {erase_gap(v, std::ranges::begin(v), std::ranges::end(v))} -> std::same_as>; + {assign_unaligned(v, unaligned)} -> std::same_as; }; //!\endcond diff --git a/include/seqan3/alignment/matrix/detail/matrix_concept.hpp b/include/seqan3/alignment/matrix/detail/matrix_concept.hpp index 3f1c05285e..c24d0147e5 100644 --- a/include/seqan3/alignment/matrix/detail/matrix_concept.hpp +++ b/include/seqan3/alignment/matrix/detail/matrix_concept.hpp @@ -59,22 +59,21 @@ concept matrix = requires(std::remove_cvref_t m) * \brief The number of columns in the matrix. */ //!\cond - SEQAN3_RETURN_TYPE_CONSTRAINT(m.cols(), std::same_as, typename std::remove_cvref_t::size_type); + {m.cols()} -> std::same_as::size_type>; //!\endcond /*!\fn size_type rows() const noexcept; * \brief The number of rows in the matrix. */ //!\cond - SEQAN3_RETURN_TYPE_CONSTRAINT(m.rows(), std::same_as, typename std::remove_cvref_t::size_type); + {m.rows()} -> std::same_as::size_type>; //!\endcond /*!\fn reference at(matrix_coordinate coordinate) noexcept; * \brief A reference to the entry of the matrix at the given coordinate. */ //!\cond - SEQAN3_RETURN_TYPE_CONSTRAINT(m.at(matrix_coordinate{}), - std::same_as, typename std::remove_cvref_t::reference); + {m.at(matrix_coordinate{})} -> std::same_as::reference>; //!\endcond //!\cond diff --git a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp index 06183f0088..9c29983ba3 100644 --- a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp +++ b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp @@ -106,14 +106,14 @@ concept two_dimensional_matrix_iterator = { it.coordinate() }; { cit.coordinate() }; - SEQAN3_RETURN_TYPE_CONSTRAINT(it += offset, std::same_as, std::remove_reference_t &); - SEQAN3_RETURN_TYPE_CONSTRAINT(it + offset, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(offset + it, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(it -= offset, std::same_as, std::remove_reference_t &); - SEQAN3_RETURN_TYPE_CONSTRAINT(it - offset, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(cit - offset, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(it.coordinate(), std::same_as, matrix_coordinate); - SEQAN3_RETURN_TYPE_CONSTRAINT(cit.coordinate(), std::same_as, matrix_coordinate); + {it += offset} -> std::same_as &>; + {it + offset} -> std::same_as>; + {offset + it} -> std::same_as>; + {it -= offset} -> std::same_as &>; + {it - offset} -> std::same_as>; + {cit - offset} -> std::same_as>; + {it.coordinate()} -> std::same_as; + {cit.coordinate()} -> std::same_as; }; //!\endcond } // namespace seqan3::detail diff --git a/include/seqan3/alphabet/concept.hpp b/include/seqan3/alphabet/concept.hpp index 2d05db9937..631ce1031c 100644 --- a/include/seqan3/alphabet/concept.hpp +++ b/include/seqan3/alphabet/concept.hpp @@ -736,9 +736,8 @@ struct assign_char_strictly_to_fn //!\cond requires requires () { - SEQAN3_RETURN_TYPE_CONSTRAINT(seqan3::assign_char_to(chr, std::forward(alphabet)), - std::convertible_to, alphabet_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(seqan3::char_is_valid_for(chr), std::same_as, bool); + {seqan3::assign_char_to(chr, std::forward(alphabet))} -> std::convertible_to; + {seqan3::char_is_valid_for(chr)} -> std::same_as; } //!\endcond { diff --git a/include/seqan3/argument_parser/detail/format_parse.hpp b/include/seqan3/argument_parser/detail/format_parse.hpp index 7cb1f1b986..810bbc178f 100644 --- a/include/seqan3/argument_parser/detail/format_parse.hpp +++ b/include/seqan3/argument_parser/detail/format_parse.hpp @@ -371,9 +371,7 @@ class format_parse : public format_base typename container_option_t::value_type & container_value, std::string const & in) { - SEQAN3_RETURN_TYPE_CONSTRAINT(fp.parse_option_value(container_value, in), - std::same_as, - option_parse_result); + {fp.parse_option_value(container_value, in)} -> std::same_as; } //!\endcond option_parse_result parse_option_value(container_option_t & value, std::string const & in) diff --git a/include/seqan3/argument_parser/validators.hpp b/include/seqan3/argument_parser/validators.hpp index 94f32f0dd3..c9b53699c3 100644 --- a/include/seqan3/argument_parser/validators.hpp +++ b/include/seqan3/argument_parser/validators.hpp @@ -100,8 +100,8 @@ concept validator = std::copyable> && { typename std::remove_reference_t::option_value_type; - SEQAN3_RETURN_TYPE_CONSTRAINT(validator(value), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(validator.get_help_page_message(), std::same_as, std::string); + {validator(value)} -> std::same_as; + {validator.get_help_page_message()} -> std::same_as; }; //!\endcond diff --git a/include/seqan3/core/platform.hpp b/include/seqan3/core/platform.hpp index e03c5b93cd..d180eeab59 100644 --- a/include/seqan3/core/platform.hpp +++ b/include/seqan3/core/platform.hpp @@ -69,15 +69,6 @@ # include #endif -//!\brief Same as writing `{expression} -> concept_name` in a concept definition. -#if defined(__GNUC__) && (__GNUC__ < 10) -# define SEQAN3_RETURN_TYPE_CONSTRAINT(expression, concept_name, ...) \ - {expression}; requires concept_name -#else -# define SEQAN3_RETURN_TYPE_CONSTRAINT(expression, concept_name, ...) \ - {expression} -> concept_name<__VA_ARGS__> -#endif - // ============================================================================ // Dependencies // ============================================================================ diff --git a/include/seqan3/core/range/detail/inherited_iterator_base.hpp b/include/seqan3/core/range/detail/inherited_iterator_base.hpp index e61369ad87..d568e6ed6a 100644 --- a/include/seqan3/core/range/detail/inherited_iterator_base.hpp +++ b/include/seqan3/core/range/detail/inherited_iterator_base.hpp @@ -230,7 +230,7 @@ class inherited_iterator_base : public std::conditional_t()++) && noexcept(derived_t(std::declval()))) //!\cond - requires requires (base_t_ i) { i++; SEQAN3_RETURN_TYPE_CONSTRAINT(i++, std::same_as, base_t_); } && + requires requires (base_t_ i) { i++; {i++} -> std::same_as; } && std::constructible_from //!\endcond { diff --git a/include/seqan3/io/sam_file/output_format_concept.hpp b/include/seqan3/io/sam_file/output_format_concept.hpp index e92e11c39e..6425702258 100644 --- a/include/seqan3/io/sam_file/output_format_concept.hpp +++ b/include/seqan3/io/sam_file/output_format_concept.hpp @@ -98,25 +98,24 @@ concept sam_file_output_format = { t::file_extensions; - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_alignment_record(stream, - options, - header, - seq, - qual, - id, - offset, - ref_seq, - ref_id, - ref_offset, - align, - cigar, - flag, - mapq, - mate, - tag_dict, - e_value, - bit_score), - std::same_as, void); + {v.write_alignment_record(stream, + options, + header, + seq, + qual, + id, + offset, + ref_seq, + ref_id, + ref_offset, + align, + cigar, + flag, + mapq, + mate, + tag_dict, + e_value, + bit_score)} -> std::same_as; }; //!\endcond diff --git a/include/seqan3/io/sequence_file/input_format_concept.hpp b/include/seqan3/io/sequence_file/input_format_concept.hpp index 27f2b7a874..b61337e01d 100644 --- a/include/seqan3/io/sequence_file/input_format_concept.hpp +++ b/include/seqan3/io/sequence_file/input_format_concept.hpp @@ -81,17 +81,9 @@ concept sequence_file_input_format = requires (detail::sequence_file_input_forma { t::file_extensions; - SEQAN3_RETURN_TYPE_CONSTRAINT(v.read_sequence_record(f, options, position_buffer, seq, id, qual), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.read_sequence_record(f, options, position_buffer, seq_qual, id, seq_qual), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.read_sequence_record(f, - options, - position_buffer, - std::ignore, - std::ignore, - std::ignore), - std::same_as, void); + {v.read_sequence_record(f, options, position_buffer, seq, id, qual)} -> std::same_as; + {v.read_sequence_record(f, options, position_buffer, seq_qual, id, seq_qual)} -> std::same_as; + {v.read_sequence_record(f, options, position_buffer, std::ignore, std::ignore, std::ignore)} -> std::same_as; }; //!\endcond diff --git a/include/seqan3/io/sequence_file/output_format_concept.hpp b/include/seqan3/io/sequence_file/output_format_concept.hpp index 6b912c8def..9f5a49a2a8 100644 --- a/include/seqan3/io/sequence_file/output_format_concept.hpp +++ b/include/seqan3/io/sequence_file/output_format_concept.hpp @@ -79,11 +79,9 @@ concept sequence_file_output_format = requires (detail::sequence_file_output_for { t::file_extensions; - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_sequence_record(f, options, seq, id, qual), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_sequence_record(f, options, std::ignore, id, std::ignore), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_sequence_record(f, options, std::ignore, std::ignore, std::ignore), - std::same_as, void); + {v.write_sequence_record(f, options, seq, id, qual)} -> std::same_as; + {v.write_sequence_record(f, options, std::ignore, id, std::ignore)} -> std::same_as; + {v.write_sequence_record(f, options, std::ignore, std::ignore, std::ignore)} -> std::same_as; // the last is required to be compile time valid, but should always throw at run-time. }; //!\endcond diff --git a/include/seqan3/io/stream/concept.hpp b/include/seqan3/io/stream/concept.hpp index 7390ff99c4..fb6f7b3ff7 100644 --- a/include/seqan3/io/stream/concept.hpp +++ b/include/seqan3/io/stream/concept.hpp @@ -39,10 +39,8 @@ concept output_stream_over = std::is_base_of_v::pos_type; typename std::remove_reference_t::off_type; - SEQAN3_RETURN_TYPE_CONSTRAINT(os << val, - std::same_as, - std::basic_ostream::char_type, - typename std::remove_reference_t::traits_type> &); + {os << val} -> std::same_as::char_type, + typename std::remove_reference_t::traits_type> &>; }; template @@ -109,10 +107,8 @@ concept input_stream_over = std::is_base_of_v::off_type; - SEQAN3_RETURN_TYPE_CONSTRAINT(is >> val, - std::same_as, - std::basic_istream::char_type, - typename std::remove_reference_t::traits_type> &); + {is >> val} -> std::same_as::char_type, + typename std::remove_reference_t::traits_type> &>; }; template diff --git a/include/seqan3/io/structure_file/input_format_concept.hpp b/include/seqan3/io/structure_file/input_format_concept.hpp index 0b88c2f585..de4ebb079e 100644 --- a/include/seqan3/io/structure_file/input_format_concept.hpp +++ b/include/seqan3/io/structure_file/input_format_concept.hpp @@ -86,54 +86,53 @@ concept structure_file_input_format = requires(detail::structure_file_input_form { t::file_extensions; - SEQAN3_RETURN_TYPE_CONSTRAINT(v.read_structure_record(f, - options, - seq, - id, - bpp, - structure, - energy, - react, - react_err, - comment, - offset), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.read_structure_record(f, - options, - seq, - id, - bpp, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.read_structure_record(f, - options, - structured_seq, - id, - std::ignore, - structured_seq, - energy, - std::ignore, - std::ignore, - std::ignore, - std::ignore), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.read_structure_record(f, - options, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore), - std::same_as, void); + {v.read_structure_record(f, + options, + seq, + id, + bpp, + structure, + energy, + react, + react_err, + comment, + offset)} -> std::same_as; + + {v.read_structure_record(f, + options, + seq, + id, + bpp, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore)} -> std::same_as; + + {v.read_structure_record(f, + options, + structured_seq, + id, + std::ignore, + structured_seq, + energy, + std::ignore, + std::ignore, + std::ignore, + std::ignore)} -> std::same_as; + + {v.read_structure_record(f, + options, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore)} -> std::same_as; // the last is required to be compile time valid, but should always throw at run-time. }; //!\endcond diff --git a/include/seqan3/io/structure_file/output_format_concept.hpp b/include/seqan3/io/structure_file/output_format_concept.hpp index cabd46e365..2e9042e14b 100644 --- a/include/seqan3/io/structure_file/output_format_concept.hpp +++ b/include/seqan3/io/structure_file/output_format_concept.hpp @@ -85,54 +85,53 @@ concept structure_file_output_format = requires(detail::structure_file_output_fo { t::file_extensions; - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_structure_record(f, - options, - seq, - id, - bpp, - structure, - energy, - react, - react_err, - comment, - offset), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_structure_record(f, - options, - seq, - id, - bpp, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_structure_record(f, - options, - structured_seq, - id, - std::ignore, - structured_seq, - energy, - std::ignore, - std::ignore, - std::ignore, - std::ignore), - std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(v.write_structure_record(f, - options, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore, - std::ignore), - std::same_as, void); + {v.write_structure_record(f, + options, + seq, + id, + bpp, + structure, + energy, + react, + react_err, + comment, + offset)} -> std::same_as; + + {v.write_structure_record(f, + options, + seq, + id, + bpp, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore)} -> std::same_as; + + {v.write_structure_record(f, + options, + structured_seq, + id, + std::ignore, + structured_seq, + energy, + std::ignore, + std::ignore, + std::ignore, + std::ignore)} -> std::same_as; + + {v.write_structure_record(f, + options, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore, + std::ignore)} -> std::same_as; // the last is required to be compile time valid, but should always throw at run-time. }; //!\endcond diff --git a/include/seqan3/search/fm_index/concept.hpp b/include/seqan3/search/fm_index/concept.hpp index 6a8a003121..5a78a63510 100644 --- a/include/seqan3/search/fm_index/concept.hpp +++ b/include/seqan3/search/fm_index/concept.hpp @@ -36,10 +36,10 @@ concept sdsl_index = requires (t sdsl_index) { typename t::size_type; - SEQAN3_RETURN_TYPE_CONSTRAINT(sdsl_index.size(), std::same_as, typename t::size_type); + {sdsl_index.size()} -> std::same_as; { sdsl_index[0] }; // suffix array access - SEQAN3_RETURN_TYPE_CONSTRAINT(sdsl_index.comp2char[0], std::same_as, uint8_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(sdsl_index.char2comp[0], std::same_as, uint8_t); + {sdsl_index.comp2char[0]} -> std::same_as; + {sdsl_index.char2comp[0]} -> std::same_as; { sdsl_index.sigma }; { sdsl_index.C[0] }; diff --git a/include/seqan3/utility/char_operations/predicate_detail.hpp b/include/seqan3/utility/char_operations/predicate_detail.hpp index 5ad1451e07..5d682e17d1 100644 --- a/include/seqan3/utility/char_operations/predicate_detail.hpp +++ b/include/seqan3/utility/char_operations/predicate_detail.hpp @@ -112,8 +112,8 @@ concept char_predicate = requires std::remove_reference_t::msg; //The msg type can be added with a std::string. - SEQAN3_RETURN_TYPE_CONSTRAINT(std::string{} + std::remove_reference_t::msg, - std::convertible_to, decltype(std::remove_reference_t::msg)); + {std::string{} + std::remove_reference_t::msg} + -> std::convertible_to::msg)>; }; //!\endcond diff --git a/include/seqan3/utility/container/concept.hpp b/include/seqan3/utility/container/concept.hpp index 2d95e42f9f..88bcbd0f11 100644 --- a/include/seqan3/utility/container/concept.hpp +++ b/include/seqan3/utility/container/concept.hpp @@ -80,7 +80,7 @@ concept container = requires (type val, type val2, type const cval, typename typ typename type::iterator; requires std::forward_iterator; // NOTE check whether iterator is const convertible - SEQAN3_RETURN_TYPE_CONSTRAINT(it, std::same_as, typename type::const_iterator); + {it} -> std::same_as; typename type::const_iterator; requires std::forward_iterator; @@ -97,27 +97,27 @@ concept container = requires (type val, type val2, type const cval, typename typ >; */ // methods and operator - SEQAN3_RETURN_TYPE_CONSTRAINT(type{}, std::same_as, type); // default constructor - SEQAN3_RETURN_TYPE_CONSTRAINT(type{type{}}, std::same_as, type); // copy/move constructor - SEQAN3_RETURN_TYPE_CONSTRAINT(val = val2, std::same_as, type &); // assignment + {type{}} -> std::same_as; // default constructor + {type{type{}}} -> std::same_as; // copy/move constructor + {val = val2} -> std::same_as; // assignment { (&val)->~type() }; // destructor - SEQAN3_RETURN_TYPE_CONSTRAINT(val.begin(), std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.end(), std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(cval.begin(), std::same_as, typename type::const_iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(cval.end(), std::same_as, typename type::const_iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.cbegin(), std::same_as, typename type::const_iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.cend(), std::same_as, typename type::const_iterator); + {val.begin()} -> std::same_as; + {val.end()} -> std::same_as; + {cval.begin()} -> std::same_as; + {cval.end()} -> std::same_as; + {val.cbegin()} -> std::same_as; + {val.cend()} -> std::same_as; requires !std::equality_comparable || std::equality_comparable; - SEQAN3_RETURN_TYPE_CONSTRAINT(val.swap(val2), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(swap(val, val2), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(std::swap(val, val2), std::same_as, void); + {val.swap(val2)} -> std::same_as; + {swap(val, val2)} -> std::same_as; + {std::swap(val, val2)} -> std::same_as; - SEQAN3_RETURN_TYPE_CONSTRAINT(val.size(), std::same_as, typename type::size_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.max_size(), std::same_as, typename type::size_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.empty(), std::same_as, bool); + {val.size()} -> std::same_as; + {val.max_size()} -> std::same_as; + {val.empty()} -> std::same_as; }; //!\endcond @@ -146,7 +146,7 @@ concept sequence_container = requires (type val, type val2, type const cval) { type(typename type::size_type{}, typename type::value_type{}) }; { type{val2.begin(), val2.end()} }; // NOTE that this could be any input iterator: { type{std::initializer_list{}} }; - SEQAN3_RETURN_TYPE_CONSTRAINT(val = std::initializer_list{}, std::same_as, type &); + {val = std::initializer_list{}} -> std::same_as; // assignment NOTE return type is type & for std::string and void for other stl containers: { val.assign(val2.begin(), val2.end()) }; @@ -155,12 +155,10 @@ concept sequence_container = requires (type val, type val2, type const cval) // modify container // TODO: how do you model this? - // SEQAN3_RETURN_TYPE_CONSTRAINT(val.emplace(typename type::const_iterator{}, ?), - // std::same_as, typename type::iterator); + // {val.emplace(typename type::const_iterator{}, ?)} -> std::same_as; #if SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI - SEQAN3_RETURN_TYPE_CONSTRAINT(val.insert(val.begin(), val2.front()), std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.insert(val.begin(), typename type::value_type{}), - std::same_as, typename type::iterator); + {val.insert(val.begin(), val2.front())} -> std::same_as; + {val.insert(val.begin(), typename type::value_type{})} -> std::same_as; // std::string is missing the const_iterator versions for insert in pre-C++11 ABI requires detail::is_basic_string_v || requires(type val, type val2) @@ -168,15 +166,13 @@ concept sequence_container = requires (type val, type val2, type const cval) requires requires(type val, type val2) #endif // SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI { - SEQAN3_RETURN_TYPE_CONSTRAINT(val.insert(val.cbegin(), val2.front()), std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.insert(val.cbegin(), typename type::value_type{}), - std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.insert(val.cbegin(), typename type::size_type{}, typename type::value_type{}), - std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.insert(val.cbegin(), val2.begin(), val2.end()), - std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.insert(val.cbegin(), std::initializer_list{}), - std::same_as, typename type::iterator); + {val.insert(val.cbegin(), val2.front())} -> std::same_as; + {val.insert(val.cbegin(), typename type::value_type{})} -> std::same_as; + {val.insert(val.cbegin(), typename type::size_type{}, typename type::value_type{})} + -> std::same_as; + {val.insert(val.cbegin(), val2.begin(), val2.end())} -> std::same_as; + {val.insert(val.cbegin(), std::initializer_list{})} + -> std::same_as; }; #if SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI @@ -186,20 +182,20 @@ concept sequence_container = requires (type val, type val2, type const cval) requires requires(type val) #endif // SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI { - SEQAN3_RETURN_TYPE_CONSTRAINT(val.erase(val.cbegin()), std::same_as, typename type::iterator); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.erase(val.cbegin(), val.cend()), std::same_as, typename type::iterator); + {val.erase(val.cbegin())} -> std::same_as; + {val.erase(val.cbegin(), val.cend())} -> std::same_as; }; - SEQAN3_RETURN_TYPE_CONSTRAINT(val.push_back(val.front()), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.push_back(typename type::value_type{}), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.pop_back(), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.clear(), std::same_as, void); + {val.push_back(val.front())} -> std::same_as; + {val.push_back(typename type::value_type{})} -> std::same_as; + {val.pop_back()} -> std::same_as; + {val.clear()} -> std::same_as; // access container - SEQAN3_RETURN_TYPE_CONSTRAINT(val.front(), std::same_as, typename type::reference); - SEQAN3_RETURN_TYPE_CONSTRAINT(cval.front(), std::same_as, typename type::const_reference); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.back(), std::same_as, typename type::reference); - SEQAN3_RETURN_TYPE_CONSTRAINT(cval.back(), std::same_as, typename type::const_reference); + {val.front()} -> std::same_as; + {cval.front()} -> std::same_as; + {val.back()} -> std::same_as; + {cval.back()} -> std::same_as; }; //!\endcond @@ -225,12 +221,12 @@ concept random_access_container = requires (type val) requires sequence_container; // access container - SEQAN3_RETURN_TYPE_CONSTRAINT(val[0], std::same_as, typename type::reference); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.at(0), std::same_as, typename type::reference); + {val[0]} -> std::same_as; + {val.at(0)} -> std::same_as; // modify container - SEQAN3_RETURN_TYPE_CONSTRAINT(val.resize(0), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.resize(0, typename type::value_type{}), std::same_as, void); + {val.resize(0)} -> std::same_as; + {val.resize(0, typename type::value_type{})} -> std::same_as; }; //!\endcond @@ -253,9 +249,9 @@ concept reservible_container = requires (type val) { requires random_access_container; - SEQAN3_RETURN_TYPE_CONSTRAINT(val.capacity(), std::same_as, typename type::size_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.reserve(0), std::same_as, void); - SEQAN3_RETURN_TYPE_CONSTRAINT(val.shrink_to_fit(), std::same_as, void); + {val.capacity()} -> std::same_as; + {val.reserve(0)} -> std::same_as; + {val.shrink_to_fit()} -> std::same_as; }; //!\endcond diff --git a/include/seqan3/utility/simd/concept.hpp b/include/seqan3/utility/simd/concept.hpp index a13081d4db..90b6ac62d0 100644 --- a/include/seqan3/utility/simd/concept.hpp +++ b/include/seqan3/utility/simd/concept.hpp @@ -43,32 +43,25 @@ concept simd_concept = requires (simd_t a, simd_t b) requires std::integral>::max_length)>; // assume array access that returns a scalar_type type - SEQAN3_RETURN_TYPE_CONSTRAINT(a[0], std::convertible_to, - typename simd_traits>::scalar_type); + {a[0]} -> std::convertible_to>::scalar_type>; // require comparison operators - SEQAN3_RETURN_TYPE_CONSTRAINT(a == b, - std::same_as, typename simd_traits>::mask_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(a != b, - std::same_as, typename simd_traits>::mask_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(a < b, - std::same_as, typename simd_traits>::mask_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(a > b, - std::same_as, typename simd_traits>::mask_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(a <= b, - std::same_as, typename simd_traits>::mask_type); - SEQAN3_RETURN_TYPE_CONSTRAINT(a >= b, - std::same_as, typename simd_traits>::mask_type); + {a == b} -> std::same_as>::mask_type>; + {a != b} -> std::same_as>::mask_type>; + {a < b} -> std::same_as>::mask_type>; + {a > b} -> std::same_as>::mask_type>; + {a <= b} -> std::same_as>::mask_type>; + {a >= b} -> std::same_as>::mask_type>; // require arithmetic operators - SEQAN3_RETURN_TYPE_CONSTRAINT(a + b, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(a - b, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(a * b, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(a / b, std::same_as, std::remove_reference_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(a += b, std::same_as, std::remove_reference_t &); - SEQAN3_RETURN_TYPE_CONSTRAINT(a -= b, std::same_as, std::remove_reference_t &); - SEQAN3_RETURN_TYPE_CONSTRAINT(a *= b, std::same_as, std::remove_reference_t &); - SEQAN3_RETURN_TYPE_CONSTRAINT(a /= b, std::same_as, std::remove_reference_t &); + {a + b} -> std::same_as>; + {a - b} -> std::same_as>; + {a * b} -> std::same_as>; + {a / b} -> std::same_as>; + {a += b} -> std::same_as &>; + {a -= b} -> std::same_as &>; + {a *= b} -> std::same_as &>; + {a /= b} -> std::same_as &>; }; //!\endcond diff --git a/include/seqan3/utility/tuple/concept.hpp b/include/seqan3/utility/tuple/concept.hpp index a673c208a6..d59d9814da 100644 --- a/include/seqan3/utility/tuple/concept.hpp +++ b/include/seqan3/utility/tuple/concept.hpp @@ -33,7 +33,7 @@ namespace seqan3::detail template concept tuple_size = requires (tuple_t v) { - SEQAN3_RETURN_TYPE_CONSTRAINT(std::tuple_size::value, std::convertible_to, size_t); + {std::tuple_size::value} -> std::convertible_to; }; //!\endcond @@ -50,16 +50,14 @@ concept tuple_get = requires (tuple_t & v, tuple_t const & v_c) typename std::tuple_element<0, tuple_t>::type; - SEQAN3_RETURN_TYPE_CONSTRAINT(get<0>(v), std::convertible_to, typename std::tuple_element<0, tuple_t>::type); + {get<0>(v)} -> std::convertible_to::type>; // requires weakly_assignable_from(v)), typename std::tuple_element<0, tuple_t>::type>; //TODO check that the previous returns something that can be assigned to // unfortunately std::assignable_from requires lvalue-reference, but we want to accept xvalues too (returned // proxies) - SEQAN3_RETURN_TYPE_CONSTRAINT(get<0>(v_c), std::convertible_to, typename std::tuple_element<0, tuple_t>::type); - SEQAN3_RETURN_TYPE_CONSTRAINT(get<0>(std::move(v)), - std::convertible_to, typename std::tuple_element<0, tuple_t>::type); - SEQAN3_RETURN_TYPE_CONSTRAINT(get<0>(std::move(v_c)), - std::convertible_to, typename std::tuple_element<0, tuple_t>::type const &&); + {get<0>(v_c)} -> std::convertible_to::type>; + {get<0>(std::move(v))} -> std::convertible_to::type>; + {get<0>(std::move(v_c))} -> std::convertible_to::type const &&>; }; //!\endcond diff --git a/test/unit/range/iterator_test_template.hpp b/test/unit/range/iterator_test_template.hpp index 66c4eb3f70..1a420b302e 100644 --- a/test/unit/range/iterator_test_template.hpp +++ b/test/unit/range/iterator_test_template.hpp @@ -49,9 +49,7 @@ struct iterator_fixture : public ::testing::Test template concept has_expect_equal_member_function = requires(t & a) { - SEQAN3_RETURN_TYPE_CONSTRAINT(t::expect_eq(*std::ranges::begin(a.test_range), - *std::ranges::begin(a.expected_range)), - std::same_as, void); + {t::expect_eq(*std::ranges::begin(a.test_range), *std::ranges::begin(a.expected_range))} -> std::same_as; }; // Delegates to the test fixture member function `expect_eq` if available and falls back to EXPECT_EQ otherwise. diff --git a/test/unit/test/seqan2_test.cpp b/test/unit/test/seqan2_test.cpp index 4f7f7080f1..e4ab46e7e6 100644 --- a/test/unit/test/seqan2_test.cpp +++ b/test/unit/test/seqan2_test.cpp @@ -91,8 +91,8 @@ TYPED_TEST(seqan2_container, std_iterator) template concept SeqAn2Range = requires(range_t range) { - SEQAN3_RETURN_TYPE_CONSTRAINT(seqan::begin(range), std::same_as, std::ranges::iterator_t); - SEQAN3_RETURN_TYPE_CONSTRAINT(seqan::end(range), std::same_as, std::ranges::iterator_t); + {seqan::begin(range)} -> std::same_as>; + {seqan::end(range)} -> std::same_as>; }; TYPED_TEST(seqan2_container, seqan_range_concept) From 64b90c9feef2da0cd1429f425934c1d991c3e119 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:26:52 +0100 Subject: [PATCH 07/22] [DOC] Adapt documentation --- README.md | 10 +++++----- doc/tutorial/concepts/index.md | 2 -- include/seqan3/core/platform.hpp | 20 ++++--------------- .../detail/two_dimensional_matrix_test.cpp | 2 +- 4 files changed, 10 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index fe7e256956..7592241110 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Please see the [online documentation](https://docs.seqan.de/seqan/3-master-user/ | | requirement | version | comment | |-------------------|------------------------------------------------------|----------|---------------------------------------------| -|**compiler** | [GCC](https://gcc.gnu.org) | ≥ 7 | no other compiler is currently supported! | +|**compiler** | [GCC](https://gcc.gnu.org) | ≥ 10 | no other compiler is currently supported! | |**build system** | [CMake](https://cmake.org) | ≥ 3.4 | optional, but recommended | |**required libs** | [SDSL](https://github.com/xxsds/sdsl-lite) | ≥ 3 | | | | [Range-V3](https://github.com/ericniebler/range-v3) | ≥ 0.11.0 | | @@ -86,18 +86,18 @@ Quick-Setup without CMake: * Clone the repository with submodules: `git clone --recurse-submodules https://github.com/seqan/seqan3.git` * Add the following to your compiler invocation: * the include directories of SeqAn and its dependencies - * C++17 mode with concepts support + * C++20 mode * Macros indicating the presence of zlib and bzip2 (set only if actually available in your paths!) * The command could look like this: ```sh -g++-7 -O3 -DNDEBUG -Wall -Wextra \ - -std=c++17 -fconcepts \ +g++-11 -O3 -DNDEBUG -Wall -Wextra \ + -std=c++20 \ -I /path/to/seqan3/include \ -isystem /path/to/seqan3/submodules/range-v3/include \ -isystem /path/to/seqan3/submodules/sdsl-lite/include \ -isystem /path/to/seqan3/submodules/cereal/include \ -DSEQAN3_HAS_ZLIB=1 -DSEQAN3_HAS_BZIP2=1 \ - -lz -lbz2 -lstdc++fs -pthread \ + -lz -lbz2 -pthread \ your_file.cpp ``` diff --git a/doc/tutorial/concepts/index.md b/doc/tutorial/concepts/index.md index 43b1366dd4..6a7aca3235 100644 --- a/doc/tutorial/concepts/index.md +++ b/doc/tutorial/concepts/index.md @@ -118,8 +118,6 @@ auto add(std::integral auto const v1, std::integral auto const v2) // one const } ``` -\attention The terse syntax in this form is not yet available in GCC7, GCC8 and GCC9. - Different constraints can be applied to different template parameters and a single template parameter can be constrained by multiple concepts. Syntaxes can also be combined: diff --git a/include/seqan3/core/platform.hpp b/include/seqan3/core/platform.hpp index d180eeab59..fead734fb9 100644 --- a/include/seqan3/core/platform.hpp +++ b/include/seqan3/core/platform.hpp @@ -36,35 +36,23 @@ // Compiler support // ============================================================================ -#if defined(__GNUC__) && (__GNUC__ == 7 || __GNUC__ == 8) -# error "SeqAn 3.1.x is the last version that supports GCC 7 and 8. Please upgrade your compiler or use 3.1.x." +#if defined(__GNUC__) && (__GNUC__ == 7 || __GNUC__ == 8 || __GNUC__ == 9) +# error "SeqAn 3.1.x is the last version that supports GCC 7, 8, and 9. Please upgrade your compiler or use 3.1.x." #endif // defined(__GNUC__) && (__GNUC__ == 7 || __GNUC__ == 8) // ============================================================================ // C++ standard and features // ============================================================================ -#if SEQAN3_DOXYGEN_ONLY(1)0 -//!\brief This disables the warning you would get if you compile with `-std=c++17`. -#define SEQAN3_DISABLE_CPP17_DIAGNOSTIC -#endif // SEQAN3_DOXYGEN_ONLY(1)0 - // C++ standard [required] #ifdef __cplusplus -# if (__cplusplus < 201703) -# error "SeqAn3 requires C++20, make sure that you have set -std=c++2a (gcc9) or -std=c++20 (gcc10 and higher)." -# elif not defined(SEQAN3_DISABLE_CPP17_DIAGNOSTIC) && (__cplusplus >= 201703) && (__cplusplus < 201709) -# pragma GCC warning "SeqAn 3.1.x is the last version that supports C++17. Newer SeqAn versions, including this one, might not compile with -std=c++17. To disable this warning, use -std=c++2a (gcc9), -std=c++20 (gcc10 and higher), or -DSEQAN3_DISABLE_CPP17_DIAGNOSTIC." +# if (__cplusplus < 201709) +# error "SeqAn3 requires C++20, make sure that you have set -std=c++20." # endif #else # error "This is not a C++ compiler." #endif -// C++ Concepts [required] -#ifndef __cpp_concepts -# error "SeqAn3 requires C++ Concepts, either via -fconcepts (gcc9), or -std=c++20 (gcc10 and higher)." -#endif - #if __has_include() # include #endif diff --git a/test/unit/alignment/matrix/detail/two_dimensional_matrix_test.cpp b/test/unit/alignment/matrix/detail/two_dimensional_matrix_test.cpp index 55fe0a511a..2b9853988c 100644 --- a/test/unit/alignment/matrix/detail/two_dimensional_matrix_test.cpp +++ b/test/unit/alignment/matrix/detail/two_dimensional_matrix_test.cpp @@ -28,7 +28,7 @@ using test_matrix_t = seqan3::detail::two_dimensional_matrix std::vector> create_matrix_storage() { - // this is a small hack to allow simd types in an initialiser list on gcc 7 and gcc 10; + // this is a small hack to allow simd types in an initialiser list on gcc 10; using storage_t = std::array; // note: we represent the same matrix in one case with a row-wise data layout and in the other case with a From bd80301609032ec08a75034113609aa82c8d191f Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:39:07 +0100 Subject: [PATCH 08/22] [MISC] deprecate std/algorithm --- include/seqan3/std/algorithm | 248 +---------------------------------- 1 file changed, 3 insertions(+), 245 deletions(-) diff --git a/include/seqan3/std/algorithm b/include/seqan3/std/algorithm index a269ec16e0..b2e5f2a6c9 100644 --- a/include/seqan3/std/algorithm +++ b/include/seqan3/std/algorithm @@ -13,251 +13,9 @@ #pragma once -/*!\defgroup std_algorithm algorithm - * \ingroup std - * \brief The [\ header](https://en.cppreference.com/w/cpp/header/algorithm) from C++20's standard library. - */ - #include -#ifndef __cpp_lib_ranges // If not C++20 ranges available, implement via range-v3. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace std::ranges -{ - -namespace -{ -// https://eel.is/c++draft/algorithm.syn - -// [algorithms.results], algorithm result types -// using ::ranges::cpp20::in_fun_result; -// using ::ranges::cpp20::in_in_result; -// using ::ranges::cpp20::in_out_result; -// using ::ranges::cpp20::in_in_out_result; -// using ::ranges::cpp20::in_out_out_result; -// using ::ranges::cpp20::min_max_result; -// using ::ranges::cpp20::in_found_result; - -// ===================================================== -// [alg.nonmodifying], non-modifying sequence operations -// ===================================================== - -// [alg.all.of], all of -using ::ranges::cpp20::all_of; - -// [alg.any.of], any of -// using ::ranges::cpp20::any_of; - -// [alg.none.of], none of -// using ::ranges::cpp20::none_of; - -// [alg.foreach], for each -// using ::ranges::cpp20::for_each_result; -using ::ranges::cpp20::for_each; -// using ::ranges::cpp20::for_each_n_result; -// using ::ranges::cpp20::for_each_n; - -// [alg.find], find -using ::ranges::cpp20::find; -using ::ranges::cpp20::find_if; -using ::ranges::cpp20::find_if_not; - -// [alg.find.end], find end -// using ::ranges::cpp20::find_end; - -// [alg.find.first.of], find first -// using ::ranges::cpp20::find_first_of; - -// [alg.adjacent.find], adjacent find -// using ::ranges::cpp20::adjacent_find; - -// [alg.count], count -using ::ranges::cpp20::count; -// using ::ranges::cpp20::count_if; - -// [mismatch], mismatch -// using ::ranges::cpp20::mismatch; - -// [alg.equal], equal -using ::ranges::cpp20::equal; - -// [alg.is.permutation], is permutation -// using ::ranges::cpp20::is_permutation; - -// [alg.search], search -// using ::ranges::cpp20::search; -// using ::ranges::cpp20::search_n; - -// ======================================================== -// [alg.modifying.operations], mutating sequence operations -// ======================================================== - -// [alg.copy], copy -// using ::ranges::cpp20::copy_result; -using ::ranges::cpp20::copy; -// using ::ranges::cpp20::copy_n_result; -using ::ranges::cpp20::copy_n; -// using ::ranges::cpp20::copy_if_result; -// using ::ranges::cpp20::copy_if; -// using ::ranges::cpp20::copy_backward_result; -// using ::ranges::cpp20::copy_backward; - -// [alg.move], move -// using ::ranges::cpp20::move_result; -using ::ranges::cpp20::move; -// using ::ranges::cpp20::move_backward_result; -using ::ranges::cpp20::move_backward; - -// [alg.swap], swap -// using ::ranges::cpp20::swap_ranges_result; -// using ::ranges::cpp20::swap_ranges; - -// [alg.transform], transform -// using ::ranges::cpp20::unary_transform_result; -// using ::ranges::cpp20::binary_transform_result; -using ::ranges::cpp20::transform; - -// [alg.replace], replace -// using ::ranges::cpp20::replace; -// using ::ranges::cpp20::replace_if; -// using ::ranges::cpp20::replace_copy_result; -// using ::ranges::cpp20::replace_copy; -// using ::ranges::cpp20::replace_copy_if_result; -// using ::ranges::cpp20::replace_copy_if; - -// [alg.fill], fill -using ::ranges::cpp20::fill; -// using ::ranges::cpp20::fill_n; - -// [alg.generate], generate -using ::ranges::cpp20::generate; - -// [alg.remove], remove -// using ::ranges::cpp20::remove; -// using ::ranges::cpp20::remove_if; -// using ::ranges::cpp20::remove_copy_result; -// using ::ranges::cpp20::remove_copy; -// using ::ranges::cpp20::remove_copy_if_result; -// using ::ranges::cpp20::remove_copy_if; - -// [alg.unique], unique -// using ::ranges::cpp20::unique; -// using ::ranges::cpp20::unique_copy_result; -// using ::ranges::cpp20::unique_copy; - -// [alg.reverse], reverse -using ::ranges::cpp20::reverse; -// using ::ranges::cpp20::reverse_copy_result; -// using ::ranges::cpp20::reverse_copy; - -// [alg.rotate], rotate -// using ::ranges::cpp20::rotate; -// using ::ranges::cpp20::rotate_copy_result; -// using ::ranges::cpp20::rotate_copy; - -// [alg.random.sample], sample -// using ::ranges::cpp20::sample; - -// [alg.random.shuffle], shuffle -// using ::ranges::cpp20::shuffle; - -// ============================================= -// [alg.sorting], sorting and related operations -// ============================================= - -// [alg.sort], sorting -using ::ranges::cpp20::sort; -// using ::ranges::cpp20::stable_sort; -// using ::ranges::cpp20::partial_sort; -// using ::ranges::cpp20::partial_sort_copy; -// using ::ranges::cpp20::is_sorted; -// using ::ranges::cpp20::is_sorted_until; - -// [alg.nth.element], Nth element -// using ::ranges::cpp20::nth_element; - -// [alg.binary.search], binary search -// using ::ranges::cpp20::lower_bound; -// using ::ranges::cpp20::upper_bound; -// using ::ranges::cpp20::equal_range; -// using ::ranges::cpp20::binary_search; - -// [alg.partitions], partitions -// using ::ranges::cpp20::is_partitioned; -// using ::ranges::cpp20::partition; -// using ::ranges::cpp20::stable_partition; -// using ::ranges::cpp20::partition_copy_result; -// using ::ranges::cpp20::partition_copy; -// using ::ranges::cpp20::partition_point; - -// [alg.merge], merge -// using ::ranges::cpp20::merge_result; -// using ::ranges::cpp20::merge; -// using ::ranges::cpp20::inplace_merge; - -// [alg.set.operations], set operations -// using ::ranges::cpp20::includes; -// using ::ranges::cpp20::set_union_result; -// using ::ranges::cpp20::set_union; -// using ::ranges::cpp20::set_intersection_result; -// using ::ranges::cpp20::set_intersection; -// using ::ranges::cpp20::set_difference_result; -// using ::ranges::cpp20::set_difference; -// using ::ranges::cpp20::set_symmetric_difference_result; -// using ::ranges::cpp20::set_symmetric_difference; - -// [alg.heap.operations], heap operations -// using ::ranges::cpp20::push_heap; -// using ::ranges::cpp20::pop_heap; -// using ::ranges::cpp20::make_heap; -// using ::ranges::cpp20::sort_heap; -// using ::ranges::cpp20::is_heap; -// using ::ranges::cpp20::is_heap_until; - -// [alg.min.max], minimum and maximum -// using ::ranges::cpp20::min; -// using ::ranges::cpp20::max; -// using ::ranges::cpp20::minmax_result; -// using ::ranges::cpp20::minmax; -using ::ranges::cpp20::min_element; -using ::ranges::cpp20::max_element; -// using ::ranges::cpp20::minmax_element; - -// [alg.clamp], bounded value -// using ::ranges::cpp20::clamp; - -// [alg.lex.comparison], lexicographical comparison -// using ::ranges::cpp20::lexicographical_compare; - -// [alg.permutation.generators], permutations -// using ::ranges::cpp20::next_permutation_result; -// using ::ranges::cpp20::next_permutation; -// using ::ranges::cpp20::prev_permutation_result; -// using ::ranges::cpp20::prev_permutation; - -} // anonymous namespace - -} // namespace std::ranges +#include -#endif // __cpp_lib_ranges +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") From ef20871750c9414a14f6ae467f3a05044af5d35d Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:39:22 +0100 Subject: [PATCH 09/22] [MISC] deprecate std/concepts --- include/seqan3/std/concepts | 141 +----------------------------------- 1 file changed, 3 insertions(+), 138 deletions(-) diff --git a/include/seqan3/std/concepts b/include/seqan3/std/concepts index 09fd5d17e4..3c4c196739 100644 --- a/include/seqan3/std/concepts +++ b/include/seqan3/std/concepts @@ -13,144 +13,9 @@ #pragma once -#if __has_include() #include -#endif // __has_include() -#ifndef __cpp_lib_concepts // use range-v3 to emulate, if C++20 concepts are not available +#include -#include -#include - -/*!\defgroup std std - * \brief A subset of the C++20 standard library made available in pre-C++20 contexts. - * - * \details - * - * This module provides many parts of the C++20 standard library (and some parts of the C++17 standard library - * not available in GCC). They are only defined if not found in the compiler's standard library and are called exactly - * like the originals so they can be used interchangeably. The actual implementation is provided by us or aliased - * from the range-v3 library. - * - * \attention All of this sub-module is subject to change! - * - * In particular: - * - * * We do not provide all C++20 library features, only those that are used by SeqAn. - * * All of these might change or be removed once C++20 is published. - * * The documentation of this module will likely be removed entirely in favour of links to - * https://en.cppreference.com - * - * It is best you consider every entity in this module as: - * - * \noapi - * - */ - -/*!\defgroup std_concepts concepts - * \ingroup std - * \brief The [\ header](https://en.cppreference.com/w/cpp/header/concepts) from C++20's standard library. - */ - -namespace std -{ - -// ========================================== -// [concepts.lang], language-related concepts -// ========================================== - -// [concept.same], concept same_as -using ::concepts::same_as; - -// [concept.derived], concept derived_from -using ::concepts::derived_from; - -// [concept.convertible], concept convertible_to -using ::concepts::convertible_to; - -// [concept.commonref], concept common_reference_with -using ::concepts::common_reference_with; - -// [concept.common], concept common_with -using ::concepts::common_with; - -// [concept.arithmetic], arithmetic concepts -using ::concepts::integral; -using ::concepts::signed_integral; -using ::concepts::unsigned_integral; -// using ::concepts::floating_point; -//!\cond -template -META_CONCEPT floating_point = std::is_floating_point_v; -//!\endcond - -// [concept.assignable], concept assignable_from -using ::concepts::assignable_from; - -// [concept.swappable], concept swappable -// namespace ranges { inline namespace unspecified { using ::concepts::swap; } } -using ::concepts::swappable; -using ::concepts::swappable_with; - -// [concept.destructible], concept destructible -using ::concepts::destructible; - -// [concept.constructible], concept constructible_from -using ::concepts::constructible_from; - -// [concept.default.init], concept default_initializable -// using ::concepts::default_initializable; -//!\cond -template -META_CONCEPT default_initializable = ::concepts::default_constructible; -//!\endcond - -// [concept.moveconstructible], concept move_constructible -using ::concepts::move_constructible; - -// [concept.copyconstructible], concept copy_constructible -using ::concepts::copy_constructible; - -// ======================================= -// [concepts.compare], comparison concepts -// ======================================= - -// [concept.equalitycomparable], concept equality_comparable -using ::concepts::equality_comparable; -using ::concepts::equality_comparable_with; - -// [concept.totallyordered], concept totally_ordered -using ::concepts::totally_ordered; -using ::concepts::totally_ordered_with; - -// [concept.object], object concepts -using ::concepts::movable; -using ::concepts::copyable; -using ::concepts::semiregular; -using ::concepts::regular; - -// ====================================== -// [concepts.callable], callable concepts -// ====================================== - -// [concept.invocable], concept invocable -using ::ranges::invocable; - -// [concept.regularinvocable], concept regular_invocable -using ::ranges::regular_invocable; - -// [concept.predicate], concept predicate -using ::ranges::predicate; - -// [concept.relation], concept relation -using ::ranges::relation; - -// [concept.equiv], concept equivalence_relation -// using ::ranges::equivalence_relation; - -// [concept.strictweakorder], concept strict_weak_order -using ::ranges::strict_weak_order; - -} // namespace std - -#endif // not __has_include() +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") From 7cb9e0abcee6edbe861f00d0f60c66e1c2a38c94 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:39:29 +0100 Subject: [PATCH 10/22] [MISC] deprecate std/iterator --- doc/tutorial/argument_parser/solution3.cpp | 2 +- doc/tutorial/argument_parser/solution4.cpp | 2 +- doc/tutorial/argument_parser/solution5.cpp | 2 +- doc/tutorial/argument_parser/solution6.cpp | 2 +- .../sequence_file/sequence_file_solution2.cpp | 2 +- .../matrix/detail/trace_matrix_full.hpp | 2 +- .../detail/pairwise_alignment_algorithm.hpp | 2 +- .../argument_parser/detail/format_help.hpp | 4 +- include/seqan3/argument_parser/validators.hpp | 2 +- include/seqan3/io/detail/misc.hpp | 2 +- .../io/sam_file/detail/format_sam_base.hpp | 4 +- .../seqan3/io/sequence_file/format_embl.hpp | 12 +- .../seqan3/io/sequence_file/format_fasta.hpp | 6 +- .../seqan3/io/sequence_file/format_fastq.hpp | 8 +- .../io/sequence_file/format_genbank.hpp | 10 +- .../io/structure_file/format_vienna.hpp | 10 +- include/seqan3/std/iterator | 237 +----------------- test/include/seqan3/test/expect_range_eq.hpp | 2 +- test/performance/search/search_benchmark.cpp | 2 +- .../utility/simd/views/to_simd_benchmark.cpp | 6 +- .../unit/core/detail/iterator_traits_test.cpp | 4 +- test/unit/std/algorithm_test.cpp | 2 +- test/unit/std/concept/auxiliary_iterator.hpp | 4 +- test/unit/std/concept/iterator_test.cpp | 2 +- test/unit/utility/simd/views/to_simd_test.cpp | 4 +- 25 files changed, 52 insertions(+), 283 deletions(-) diff --git a/doc/tutorial/argument_parser/solution3.cpp b/doc/tutorial/argument_parser/solution3.cpp index 7c5d09a0df..b38849b99a 100644 --- a/doc/tutorial/argument_parser/solution3.cpp +++ b/doc/tutorial/argument_parser/solution3.cpp @@ -15,7 +15,7 @@ number_type to_number(range_type && range) { std::string str; number_type num; - std::ranges::copy(range, std::cpp20::back_inserter(str)); + std::ranges::copy(range, std::back_inserter(str)); auto res = std::from_chars(&str[0], &str[0] + str.size(), num); if (res.ec != std::errc{}) diff --git a/doc/tutorial/argument_parser/solution4.cpp b/doc/tutorial/argument_parser/solution4.cpp index d7fdd4242f..9df3232cc6 100644 --- a/doc/tutorial/argument_parser/solution4.cpp +++ b/doc/tutorial/argument_parser/solution4.cpp @@ -14,7 +14,7 @@ number_type to_number(range_type && range) { std::string str; number_type num; - std::ranges::copy(range, std::cpp20::back_inserter(str)); + std::ranges::copy(range, std::back_inserter(str)); auto res = std::from_chars(&str[0], &str[0] + str.size(), num); if (res.ec != std::errc{}) diff --git a/doc/tutorial/argument_parser/solution5.cpp b/doc/tutorial/argument_parser/solution5.cpp index a391779d8e..ed270c7f6c 100644 --- a/doc/tutorial/argument_parser/solution5.cpp +++ b/doc/tutorial/argument_parser/solution5.cpp @@ -14,7 +14,7 @@ number_type to_number(range_type && range) { std::string str; number_type num; - std::ranges::copy(range, std::cpp20::back_inserter(str)); + std::ranges::copy(range, std::back_inserter(str)); auto res = std::from_chars(&str[0], &str[0] + str.size(), num); if (res.ec != std::errc{}) diff --git a/doc/tutorial/argument_parser/solution6.cpp b/doc/tutorial/argument_parser/solution6.cpp index 4c72a0c74c..075ffe29a7 100644 --- a/doc/tutorial/argument_parser/solution6.cpp +++ b/doc/tutorial/argument_parser/solution6.cpp @@ -14,7 +14,7 @@ number_type to_number(range_type && range) { std::string str; number_type num; - std::ranges::copy(range, std::cpp20::back_inserter(str)); + std::ranges::copy(range, std::back_inserter(str)); auto res = std::from_chars(&str[0], &str[0] + str.size(), num); if (res.ec != std::errc{}) diff --git a/doc/tutorial/sequence_file/sequence_file_solution2.cpp b/doc/tutorial/sequence_file/sequence_file_solution2.cpp index ec80db701c..0ae49c7881 100644 --- a/doc/tutorial/sequence_file/sequence_file_solution2.cpp +++ b/doc/tutorial/sequence_file/sequence_file_solution2.cpp @@ -33,7 +33,7 @@ int main() } // But you can also do this: - std::ranges::copy(fin, std::cpp20::back_inserter(records)); + std::ranges::copy(fin, std::back_inserter(records)); seqan3::debug_stream << records << '\n'; } diff --git a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp index 5fe465062e..f1052f5cd5 100644 --- a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp +++ b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp @@ -344,7 +344,7 @@ class trace_matrix_full::iterator::column_proxy : public std::ranges::v constexpr operator matrix_column_value_t() const { matrix_column_value_t target{}; - std::ranges::copy(column, std::cpp20::back_inserter(target)); + std::ranges::copy(column, std::back_inserter(target)); return target; } }; diff --git a/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp b/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp index fe20b49cb4..bfcfe41289 100644 --- a/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp +++ b/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp @@ -235,7 +235,7 @@ class pairwise_alignment_algorithm : protected policies_t... simd_sequence.clear(); for (auto && simd_vector_chunk : sequences | views::to_simd(padding_symbol)) - std::ranges::move(simd_vector_chunk, std::cpp20::back_inserter(simd_sequence)); + std::ranges::move(simd_vector_chunk, std::back_inserter(simd_sequence)); } /*!\brief Compute the actual alignment. diff --git a/include/seqan3/argument_parser/detail/format_help.hpp b/include/seqan3/argument_parser/detail/format_help.hpp index 0dfdc4cdfd..1f23f8b012 100644 --- a/include/seqan3/argument_parser/detail/format_help.hpp +++ b/include/seqan3/argument_parser/detail/format_help.hpp @@ -322,7 +322,7 @@ class format_help : public format_help_base std::istringstream iss(text.c_str()); std::vector tokens; std::ranges::copy(std::istream_iterator(iss), std::istream_iterator(), - std::cpp20::back_inserter(tokens)); + std::back_inserter(tokens)); // Print the text. assert(pos <= tab); @@ -453,7 +453,7 @@ class format_version : public format_help * meta information (e.g. long_copyright) on construction of the parser. Thus the meta information is collected * and only evaluated when calling seqan3::detail::format_version::parse. * - * \remark For a complete overview, take a look at \ref argument_parser + * \remark For a complete overview, take a look at \ref argument_parser */ class format_copyright : public format_help { diff --git a/include/seqan3/argument_parser/validators.hpp b/include/seqan3/argument_parser/validators.hpp index c9b53699c3..7f87a7d970 100644 --- a/include/seqan3/argument_parser/validators.hpp +++ b/include/seqan3/argument_parser/validators.hpp @@ -222,7 +222,7 @@ class value_list_validator value_list_validator(range_type rng) { values.clear(); - std::ranges::move(std::move(rng), std::cpp20::back_inserter(values)); + std::ranges::move(std::move(rng), std::back_inserter(values)); } /*!\brief Constructing from a parameter pack. diff --git a/include/seqan3/io/detail/misc.hpp b/include/seqan3/io/detail/misc.hpp index cf282edbd6..b0ed8f3f9a 100644 --- a/include/seqan3/io/detail/misc.hpp +++ b/include/seqan3/io/detail/misc.hpp @@ -152,7 +152,7 @@ inline std::vector valid_file_extensions() detail::for_each([&extensions] (auto t_identity) { using format_t = typename decltype(t_identity)::type; - std::ranges::copy(format_t::file_extensions, std::cpp20::back_inserter(extensions)); + std::ranges::copy(format_t::file_extensions, std::back_inserter(extensions)); }); return extensions; 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 b2ca068a83..8500636244 100644 --- a/include/seqan3/io/sam_file/detail/format_sam_base.hpp +++ b/include/seqan3/io/sam_file/detail/format_sam_base.hpp @@ -309,7 +309,7 @@ inline void format_sam_base::read_forward_range_field(stream_view_type && stream target.push_back(seqan3::assign_char_to(c, target_range_value_t{})); std::ranges::copy(std::ranges::subrange{it, std::ranges::end(stream_view)} | views::char_to, - std::cpp20::back_inserter(target)); + std::back_inserter(target)); } } } @@ -732,7 +732,7 @@ inline void format_sam_base::write_header(stream_t & stream, // ----------------------------------------------------------------- // Write Header // ----------------------------------------------------------------- - std::cpp20::ostreambuf_iterator stream_it{stream}; + std::ostreambuf_iterator stream_it{stream}; // (@HD) Write header line [required]. stream << "@HD\tVN:"; diff --git a/include/seqan3/io/sequence_file/format_embl.hpp b/include/seqan3/io/sequence_file/format_embl.hpp index 879f121c70..d778a52594 100644 --- a/include/seqan3/io/sequence_file/format_embl.hpp +++ b/include/seqan3/io/sequence_file/format_embl.hpp @@ -114,7 +114,7 @@ class format_embl std::string idbuffer; std::ranges::copy(stream_view | detail::take_until_or_throw(is_cntrl || is_blank), - std::cpp20::back_inserter(idbuffer)); + std::back_inserter(idbuffer)); if (idbuffer != "ID") throw parse_error{"An entry has to start with the code word ID."}; @@ -122,12 +122,12 @@ class format_embl { if (options.embl_genbank_complete_header) { - std::ranges::copy(idbuffer | views::char_to>, std::cpp20::back_inserter(id)); + std::ranges::copy(idbuffer | views::char_to>, std::back_inserter(id)); do { std::ranges::copy(stream_view | detail::take_until_or_throw(is_char<'S'>) | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); id.push_back(*stream_it); ++stream_it; } while (*stream_it != 'Q'); @@ -144,13 +144,13 @@ class format_embl { std::ranges::copy(stream_view | detail::take_until_or_throw(is_blank || is_char<';'> || is_cntrl) | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); } else { std::ranges::copy(stream_view | detail::take_until_or_throw(is_char<';'>) | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); } } } @@ -187,7 +187,7 @@ class format_embl return c; }) | views::char_to>, // convert to actual target alphabet - std::cpp20::back_inserter(sequence)); + std::back_inserter(sequence)); } else { diff --git a/include/seqan3/io/sequence_file/format_fasta.hpp b/include/seqan3/io/sequence_file/format_fasta.hpp index c5a48c2955..1e912574ac 100644 --- a/include/seqan3/io/sequence_file/format_fasta.hpp +++ b/include/seqan3/io/sequence_file/format_fasta.hpp @@ -222,7 +222,7 @@ class format_fasta | std::views::drop_while(is_blank) // skip leading ' ' | detail::take_until_or_throw(is_cntrl || is_blank) // read ID until delimiter… | views::char_to>, - std::cpp20::back_inserter(id)); // … ^A is old delimiter + std::back_inserter(id)); // … ^A is old delimiter // consume rest of line detail::consume(stream_view | detail::take_line_or_throw); @@ -259,7 +259,7 @@ class format_fasta | std::views::drop(1) // skip leading '>' or ';' | std::views::drop_while(is_blank) // skip leading ' ' | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); #endif // SEQAN3_WORKAROUND_VIEW_PERFORMANCE } } @@ -326,7 +326,7 @@ class format_fasta return c; }) // enforce legal alphabet | views::char_to>, // convert to actual target alphabet - std::cpp20::back_inserter(seq)); + std::back_inserter(seq)); #endif // SEQAN3_WORKAROUND_VIEW_PERFORMANCE } else diff --git a/include/seqan3/io/sequence_file/format_fastq.hpp b/include/seqan3/io/sequence_file/format_fastq.hpp index 8a38755fd5..887dc4bc12 100644 --- a/include/seqan3/io/sequence_file/format_fastq.hpp +++ b/include/seqan3/io/sequence_file/format_fastq.hpp @@ -136,14 +136,14 @@ class format_fastq { std::ranges::copy(stream_view | detail::take_until_or_throw(is_cntrl || is_blank) | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); detail::consume(stream_view | detail::take_line_or_throw); } else { std::ranges::copy(stream_view | detail::take_line_or_throw | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); } } else @@ -170,7 +170,7 @@ class format_fastq return c; }) | views::char_to>, // convert to actual target alphabet - std::cpp20::back_inserter(sequence)); + std::back_inserter(sequence)); sequence_size_after = size(sequence); } else // consume, but count @@ -192,7 +192,7 @@ class format_fastq if constexpr (!detail::decays_to_ignore_v) { std::ranges::copy(qview | views::char_to>, - std::cpp20::back_inserter(qualities)); + std::back_inserter(qualities)); } else { diff --git a/include/seqan3/io/sequence_file/format_genbank.hpp b/include/seqan3/io/sequence_file/format_genbank.hpp index 2f414f001d..31dd38f578 100644 --- a/include/seqan3/io/sequence_file/format_genbank.hpp +++ b/include/seqan3/io/sequence_file/format_genbank.hpp @@ -121,13 +121,13 @@ class format_genbank { if (options.embl_genbank_complete_header) { - std::ranges::copy(std::string_view{"LOCUS"}, std::cpp20::back_inserter(id)); + std::ranges::copy(std::string_view{"LOCUS"}, std::back_inserter(id)); while (!is_char<'O'>(*std::ranges::begin(stream_view))) { std::ranges::copy(stream_view | detail::take_line_or_throw | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); id.push_back('\n'); } } @@ -139,7 +139,7 @@ class format_genbank { std::ranges::copy(stream_view | detail::take_until_or_throw(predicate) | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); }; if (options.truncate_ids) @@ -176,7 +176,7 @@ class format_genbank return c; }) | views::char_to>, // convert to actual target alphabet - std::cpp20::back_inserter(sequence)); + std::back_inserter(sequence)); } else { @@ -196,7 +196,7 @@ class format_genbank id_type && id, qual_type && SEQAN3_DOXYGEN_ONLY(qualities)) { - std::cpp20::ostreambuf_iterator stream_it{stream}; + std::ostreambuf_iterator stream_it{stream}; size_t sequence_size{0}; [[maybe_unused]] char buffer[50]; if constexpr (!detail::decays_to_ignore_v) diff --git a/include/seqan3/io/structure_file/format_vienna.hpp b/include/seqan3/io/structure_file/format_vienna.hpp index 99cca956d1..efa237e4ca 100644 --- a/include/seqan3/io/structure_file/format_vienna.hpp +++ b/include/seqan3/io/structure_file/format_vienna.hpp @@ -143,7 +143,7 @@ class format_vienna std::ranges::copy(stream_view | std::views::drop_while(is_id || is_blank) // skip leading > | detail::take_until_or_throw(is_cntrl || is_blank) | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); detail::consume(stream_view | detail::take_line_or_throw); } else @@ -151,7 +151,7 @@ class format_vienna std::ranges::copy(stream_view | std::views::drop_while(is_id || is_blank) // skip leading > | detail::take_line_or_throw | views::char_to>, - std::cpp20::back_inserter(id)); + std::back_inserter(id)); } } else @@ -190,7 +190,7 @@ class format_vienna return c; }) | views::char_to>, // convert to actual target alphabet - std::cpp20::back_inserter(seq)); + std::back_inserter(seq)); } else { @@ -216,7 +216,7 @@ class format_vienna else { using alph_type = std::ranges::range_value_t; - std::ranges::copy(read_structure(stream_view), std::cpp20::back_inserter(structure)); + std::ranges::copy(read_structure(stream_view), std::back_inserter(structure)); structure_length = std::ranges::distance(structure); if constexpr (!detail::decays_to_ignore_v) @@ -285,7 +285,7 @@ class format_vienna comment_type && SEQAN3_DOXYGEN_ONLY(comment), offset_type && SEQAN3_DOXYGEN_ONLY(offset)) { - std::cpp20::ostreambuf_iterator stream_it{stream}; + std::ostreambuf_iterator stream_it{stream}; // WRITE ID (optional) if constexpr (!detail::decays_to_ignore_v) diff --git a/include/seqan3/std/iterator b/include/seqan3/std/iterator index 9c2aba8809..ab5190a5c3 100644 --- a/include/seqan3/std/iterator +++ b/include/seqan3/std/iterator @@ -15,238 +15,7 @@ #include -/*!\defgroup std_iterator iterator - * \ingroup std - * \brief The [\ header](https://en.cppreference.com/w/cpp/header/iterator) from C++20's standard library. - */ - -// import API that changed behaviour from C++-17 to C++20 into std::cpp20 -#ifdef __cpp_lib_ranges -namespace std -{ -namespace cpp20 -{ -// see https://github.com/orgs/seqan/projects/4#card-37029069 -using ::std::back_inserter; -// using ::std::front_inserter; -// using ::std::insert_iterator; -// using ::std::istream_iterator; -// using ::std::istreambuf_iterator; -using ::std::ostream_iterator; -using ::std::ostreambuf_iterator; -} // namespace cpp20 -} // namespace std -#endif // __cpp_lib_ranges - -#ifndef __cpp_lib_ranges // implement C++20 iterators via range-v3 - -//!\cond -#ifndef RANGES_DEEP_STL_INTEGRATION -#define RANGES_DEEP_STL_INTEGRATION 1 -#endif -//!\endcond - -#include -#include -#include -#include -#include -#include -#include - -#include - -// ============================================================================ -// namespace aliasing -// ============================================================================ - -namespace std -{ - -namespace -{ -// https://eel.is/c++draft/iterator.synopsis - -// ======================================== -// [iterator.assoc.types], associated types -// ======================================== - -// [incrementable.traits], incrementable traits -using ::ranges::cpp20::incrementable_traits; -using ::ranges::cpp20::iter_difference_t; - -// [readable.traits], indirectly readable traits -using ::ranges::cpp20::indirectly_readable_traits; -using ::ranges::cpp20::iter_value_t; - -// [iterator.traits], iterator traits -using ::ranges::cpp20::iter_reference_t; -using ::ranges::cpp20::iter_rvalue_reference_t; - -// ====================================== -// [iterator.concepts], iterator concepts -// ====================================== - -// [iterator.concept.readable], concept indirectly_readable -using ranges::cpp20::indirectly_readable; -// using ::ranges::cpp20::iter_common_reference_t; - -// [iterator.concept.writable], concept indirectly_writable -using ::ranges::cpp20::indirectly_writable; - -// [iterator.concept.winc], concept weakly_incrementable -using ::ranges::cpp20::weakly_incrementable; - -// [iterator.concept.inc], concept incrementable -using ::ranges::cpp20::incrementable; - -// [iterator.concept.iterator], concept input_or_output_iterator -using ::ranges::cpp20::input_or_output_iterator; - -// [iterator.concept.sentinel], concept sentinel_for -using ::ranges::cpp20::sentinel_for; - -// [iterator.concept.sizedsentinel], concept sized_sentinel_for -// using ::ranges::cpp20::disable_sized_sentinel_for; -using ::ranges::cpp20::sized_sentinel_for; - -// [iterator.concept.input], concept input_iterator -using ::ranges::cpp20::input_iterator; - -// [iterator.concept.output], concept output_iterator -using ::ranges::cpp20::output_iterator; - -// [iterator.concept.forward], concept forward_iterator -using ::ranges::cpp20::forward_iterator; - -// [iterator.concept.bidir], concept bidirectional_iterator -using ::ranges::cpp20::bidirectional_iterator; - -// [iterator.concept.random.access], concept random_access_iterator -using ::ranges::cpp20::random_access_iterator; - -// [iterator.concept.contiguous], concept contiguous_iterator -using ::ranges::cpp20::contiguous_iterator; - -// ================================================== -// [indirectcallable], indirect callable requirements -// ================================================== - -// [indirectcallable.indirectinvocable], indirect callables -using ::ranges::cpp20::indirectly_unary_invocable; -using ::ranges::cpp20::indirectly_regular_unary_invocable; -using ::ranges::cpp20::indirect_unary_predicate; -// using ::ranges::cpp20::indirect_binary_predicate; -// using ::ranges::cpp20::indirect_equivalence_relation; -using ::ranges::cpp20::indirect_strict_weak_order; -using ::ranges::cpp20::indirect_result_t; - -// [projected], projected -using ::ranges::cpp20::projected; - -// ======================================== -// [alg.req], common algorithm requirements -// ======================================== - -// [alg.req.ind.move], concept indirectly_movable -using ::ranges::cpp20::indirectly_movable; -using ::ranges::cpp20::indirectly_movable_storable; - -// [alg.req.ind.copy], concept indirectly_copyable -using ::ranges::cpp20::indirectly_copyable; -using ::ranges::cpp20::indirectly_copyable_storable; - -// [alg.req.ind.swap], concept indirectly_swappable -using ::ranges::cpp20::indirectly_swappable; - -// [alg.req.ind.cmp], concept indirectly_comparable -// using ::ranges::cpp20::indirectly_comparable; - -// [alg.req.permutable], concept permutable -using ::ranges::cpp20::permutable; - -// [alg.req.mergeable], concept mergeable -using ::ranges::cpp20::mergeable; - -// [alg.req.sortable], concept sortable -using ::ranges::cpp20::sortable; - -// ================================= -// [iterator.primitives], primitives -// ================================= - -// [std.iterator.tags], iterator tags -using ::ranges::contiguous_iterator_tag; - -// ====================================================== -// [predef.iterators], predefined iterators and sentinels -// ====================================================== - -// [insert.iterators], insert iterators -namespace cpp20 -{ -// see https://github.com/orgs/seqan/projects/4#card-37029069 -using ::ranges::cpp20::back_inserter; -// using ::ranges::cpp20::front_inserter; -// using ::ranges::cpp20::insert_iterator; -// using ::ranges::cpp20::istream_iterator; -// using ::ranges::cpp20::istreambuf_iterator; -using ::ranges::cpp20::ostream_iterator; -using ::ranges::cpp20::ostreambuf_iterator; -} // namespace cpp20 - -// [iterators.common], common iterators -// using ::ranges::cpp20::common_iterator; - -// [default.sentinels], default sentinels -using ::ranges::cpp20::default_sentinel_t; -using ::ranges::cpp20::default_sentinel; - -// [iterators.counted], counted iterators -// using ::ranges::cpp20::counted_iterator; - -// [unreachable.sentinels], unreachable sentinels -// using ::ranges::cpp20::unreachable_sentinel_t; -// using ::ranges::cpp20::unreachable_sentinel; - -// [iterator.range], range access -// using ::ranges::cpp20::ssize; -} // anonymous namespace - -} // namespace std - -namespace std::ranges -{ - -namespace -{ -// ============================================= -// [iterator.cust], customization points -// ============================================= - -// [iterator.cust.move], ranges::iter_move -using ::ranges::cpp20::iter_move; - -// [iterator.cust.swap], ranges::iter_swap -// using ::ranges::cpp20::iter_swap; - -// ============================================= -// [range.iter.ops], range iterator operations -// ============================================= - -// [range.iter.op.advance], ranges::advance -using ::ranges::cpp20::advance; - -// [range.iter.op.distance], ranges::distance -using ::ranges::cpp20::distance; - -// [range.iter.op.next], ranges::next -using ::ranges::cpp20::next; - -// [range.iter.op.prev], ranges::prev -using ::ranges::cpp20::prev; -} // anonymous namespace - -} // namespace std::ranges +#include -#endif // __cpp_lib_ranges +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") diff --git a/test/include/seqan3/test/expect_range_eq.hpp b/test/include/seqan3/test/expect_range_eq.hpp index 9c83ea8671..619035f2a2 100644 --- a/test/include/seqan3/test/expect_range_eq.hpp +++ b/test/include/seqan3/test/expect_range_eq.hpp @@ -33,7 +33,7 @@ struct expect_range_eq { using value_t = std::ranges::range_value_t; std::vector rng_copy{}; - std::ranges::copy(rng, std::cpp20::back_inserter(rng_copy)); + std::ranges::copy(rng, std::back_inserter(rng_copy)); return rng_copy; } diff --git a/test/performance/search/search_benchmark.cpp b/test/performance/search/search_benchmark.cpp index 8250efa1b5..c54377eb00 100644 --- a/test/performance/search/search_benchmark.cpp +++ b/test/performance/search/search_benchmark.cpp @@ -167,7 +167,7 @@ void unidirectional_search_all_collection(benchmark::State & state, options && o o.read_length, o.simulated_errors, o.prob_insertion, o.prob_deletion, o.stddev, i); - std::ranges::move(seq_reads, std::cpp20::back_inserter(reads)); + std::ranges::move(seq_reads, std::back_inserter(reads)); } seqan3::fm_index index{collection}; diff --git a/test/performance/utility/simd/views/to_simd_benchmark.cpp b/test/performance/utility/simd/views/to_simd_benchmark.cpp index 611ee2129f..3530a5ddeb 100644 --- a/test/performance/utility/simd/views/to_simd_benchmark.cpp +++ b/test/performance/utility/simd/views/to_simd_benchmark.cpp @@ -39,7 +39,7 @@ void to_simd_naive_wo_condition(benchmark::State& state) for (size_t i = 0; i < simd_length; ++i) std::ranges::copy(seqan3::test::generate_sequence(500, 10), - std::cpp20::back_inserter(sequences[i])); + std::back_inserter(sequences[i])); size_t value = 0; for (auto _ : state) @@ -100,7 +100,7 @@ void to_simd_naive_w_condition(benchmark::State& state) for (size_t i = 0; i < simd_length; ++i) std::ranges::copy(seqan3::test::generate_sequence(500, 10), - std::cpp20::back_inserter(sequences[i])); + std::back_inserter(sequences[i])); size_t value = 0; for (auto _ : state) @@ -149,7 +149,7 @@ void to_simd(benchmark::State& state) for (size_t i = 0; i < seqan3::simd::simd_traits::length; ++i) std::ranges::copy(seqan3::test::generate_sequence(500, 10), - std::cpp20::back_inserter(sequences[i])); + std::back_inserter(sequences[i])); size_t value = 0; for (auto _ : state) diff --git a/test/unit/core/detail/iterator_traits_test.cpp b/test/unit/core/detail/iterator_traits_test.cpp index 0d6de2e0b3..385b628a94 100644 --- a/test/unit/core/detail/iterator_traits_test.cpp +++ b/test/unit/core/detail/iterator_traits_test.cpp @@ -87,7 +87,7 @@ TEST(maybe_iterator_category, output_iterator_tag) } { - using iterator_t = std::cpp20::ostream_iterator; + using iterator_t = std::ostream_iterator; EXPECT_SAME_TYPE(std::iterator_traits::iterator_category, std::output_iterator_tag); #if defined(__cpp_lib_ranges) EXPECT_SAME_TYPE(iterator_t::iterator_category, std::output_iterator_tag); @@ -188,7 +188,7 @@ concept has_iterator_concept = requires() TEST(iterator_concept_tag_t, output_iterator_tag) { - using iterator_t = std::cpp20::ostream_iterator; + using iterator_t = std::ostream_iterator; EXPECT_SAME_TYPE(seqan3::detail::iterator_concept_tag_t, std::output_iterator_tag); EXPECT_FALSE(has_iterator_concept); } diff --git a/test/unit/std/algorithm_test.cpp b/test/unit/std/algorithm_test.cpp index 53c7432fdd..a227d29ec0 100644 --- a/test/unit/std/algorithm_test.cpp +++ b/test/unit/std/algorithm_test.cpp @@ -21,5 +21,5 @@ TEST(algorithm_test, gcc95578) auto && rng = v | std::views::take_while([](auto &&){return true;}); std::vector rng_copy{}; - std::ranges::copy(rng, std::cpp20::back_inserter(rng_copy)); + std::ranges::copy(rng, std::back_inserter(rng_copy)); } diff --git a/test/unit/std/concept/auxiliary_iterator.hpp b/test/unit/std/concept/auxiliary_iterator.hpp index 3b584e9ee2..e311d65648 100644 --- a/test/unit/std/concept/auxiliary_iterator.hpp +++ b/test/unit/std/concept/auxiliary_iterator.hpp @@ -13,7 +13,7 @@ #include using input_iterator = std::istream_iterator; -using output_iterator = std::cpp20::ostream_iterator; +using output_iterator = std::ostream_iterator; using forward_iterator = std::forward_list::iterator; using bidirectional_iterator = std::list::iterator; using random_access_iterator = std::vector::iterator; @@ -67,7 +67,7 @@ struct input_or_output_iter_value // ostream has std::iter_value_t void, but we want the output value type here. template -struct input_or_output_iter_value> +struct input_or_output_iter_value> { using type = value_t; }; diff --git a/test/unit/std/concept/iterator_test.cpp b/test/unit/std/concept/iterator_test.cpp index 54e619486b..7e1298b2cc 100644 --- a/test/unit/std/concept/iterator_test.cpp +++ b/test/unit/std/concept/iterator_test.cpp @@ -71,7 +71,7 @@ TEST(iterator_concepts, Iterator) TEST(iterator_concepts, sentinel_for) { - EXPECT_TRUE((std::is_same_v>>)); + EXPECT_TRUE((std::is_same_v>>)); EXPECT_TRUE((std::sentinel_for, input_iterator>)); diff --git a/test/unit/utility/simd/views/to_simd_test.cpp b/test/unit/utility/simd/views/to_simd_test.cpp index 5d46400de6..1617932955 100644 --- a/test/unit/utility/simd/views/to_simd_test.cpp +++ b/test/unit/utility/simd/views/to_simd_test.cpp @@ -50,7 +50,7 @@ class view_to_simd_test : public ::testing::Test // Generate sequences that end on different boundaries size_t l = max_sequence_length - (i * seqan3::simd::simd_traits::length) - i; std::ranges::copy(seqan3::test::generate_sequence>(l), - std::cpp20::back_inserter(sequences[i])); + std::back_inserter(sequences[i])); } transformed_simd_vec.resize(max_sequence_length, seqan3::simd::fill(padding_value_dna4)); @@ -286,7 +286,7 @@ TYPED_TEST(view_to_simd_test, too_many_sequences) { using seqan3::operator""_dna4; typename TestFixture::container_t cont; - std::ranges::copy("ACGTACGACT"_dna4, std::cpp20::back_inserter(cont)); + std::ranges::copy("ACGTACGACT"_dna4, std::back_inserter(cont)); this->sequences.push_back(cont); EXPECT_THROW(typename TestFixture::view_to_simd_type{this->sequences}, std::invalid_argument); From f2734faef0a944cbe9d41bb1966a67a27ae54344 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:39:37 +0100 Subject: [PATCH 11/22] [MISC] deprecate std/memory --- include/seqan3/std/memory | 63 ++------------------------------------- 1 file changed, 3 insertions(+), 60 deletions(-) diff --git a/include/seqan3/std/memory b/include/seqan3/std/memory index 6d924fea20..44ea509f18 100644 --- a/include/seqan3/std/memory +++ b/include/seqan3/std/memory @@ -13,66 +13,9 @@ #pragma once -#if __has_include() -#include // from C++20 all feature macros should be defined here -#endif - -/*!\defgroup std_memory memory - * \ingroup std - * \brief The [\ header](https://en.cppreference.com/w/cpp/header/memory) from C++20's standard library. - */ - -/*!\brief A workaround for __cpp_lib_to_address for gcc version >=8.0 and < 9.4 (in C++20 mode). - * Those versions implemented std::to_address, but did not define that feature detection macro. - * \ingroup std_memory - */ -#ifdef SEQAN3_DOXYGEN_ONLY // needed as seqan3/core/platform.hpp might not be included -#if SEQAN3_DOXYGEN_ONLY(1)0 -// documentation-only -#define SEQAN3_CPP_LIB_TO_ADDRESS IMPLEMENTATION_DEFINED -#undef SEQAN3_CPP_LIB_TO_ADDRESS -#endif // SEQAN3_DOXYGEN_ONLY(1)0 -#endif // SEQAN3_DOXYGEN_ONLY - -#ifndef SEQAN3_CPP_LIB_TO_ADDRESS -# if defined(__cpp_lib_to_address) -# define SEQAN3_CPP_LIB_TO_ADDRESS 1 -# elif defined(__GNUC__) && (_GLIBCXX_RELEASE == 8 || _GLIBCXX_RELEASE == 9) && __cplusplus > 201703L -# define SEQAN3_CPP_LIB_TO_ADDRESS 1 -# endif -#endif - #include -#ifndef SEQAN3_CPP_LIB_TO_ADDRESS - -namespace std -{ - -/*!\brief Obtain the address represented by p without forming a reference to the object pointed to by p. - * \sa https://en.cppreference.com/w/cpp/memory/to_address - * \ingroup std_memory - */ -template -constexpr T * to_address(T * p) noexcept -{ - static_assert(!std::is_function_v); - return p; -} - -/*!\brief Obtain the address represented by p without forming a reference to the object pointed to by p. - * \sa https://en.cppreference.com/w/cpp/memory/to_address - * \ingroup std_memory - */ -template -constexpr auto to_address(const T & p) noexcept -{ - if constexpr (requires { std::pointer_traits::to_address(p); }) - return std::pointer_traits::to_address(p); - else - return std::to_address(p.operator->()); -} - -} // namespace std +#include -#endif // SEQAN3_CPP_LIB_TO_ADDRESS +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") From 322fb935a56e36fa841384963fd803297c8ff994 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:39:46 +0100 Subject: [PATCH 12/22] [MISC] update std/ranges --- include/seqan3/std/ranges | 192 +------------------------------------- 1 file changed, 1 insertion(+), 191 deletions(-) diff --git a/include/seqan3/std/ranges b/include/seqan3/std/ranges index e38558fa47..1477de37cb 100644 --- a/include/seqan3/std/ranges +++ b/include/seqan3/std/ranges @@ -13,9 +13,8 @@ #pragma once -#if __has_include() +#include #include -#endif // __has_include() /*!\defgroup std_ranges ranges * \ingroup std @@ -39,9 +38,6 @@ #endif // RANGES_DEEP_STL_INTEGRATION //!\endcond -#if defined(__cpp_lib_ranges) // C++20 ranges available -#include - #include namespace ranges @@ -111,189 +107,3 @@ template //!\endcond inline constexpr bool enable_borrowed_range = true; } // namespace std::ranges - -#else // implement via range-v3 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -// ============================================================================ -// namespace aliasing -// ============================================================================ -namespace std::ranges -{ - -namespace -{ -// https://eel.is/c++draft/ranges.syn - -// [range.access], range access -using ::ranges::cpp20::begin; -using ::ranges::cpp20::end; -using ::ranges::cpp20::cbegin; -using ::ranges::cpp20::cend; -// using ::ranges::cpp20::rbegin; -// using ::ranges::cpp20::rend; -// using ::ranges::cpp20::crbegin; -// using ::ranges::cpp20::crend; -using ::ranges::cpp20::size; -// using ::ranges::cpp20::ssize; -using ::ranges::cpp20::empty; -using ::ranges::cpp20::data; -// using ::ranges::cpp20::cdata; - -// [range.range], ranges -using ::ranges::cpp20::range; -// using ::ranges::cpp20::enable_borrowed_range; -using ::ranges::cpp20::borrowed_range; - -using ::ranges::iterator_t; -using ::ranges::sentinel_t; -using ::ranges::range_difference_t; -using ::ranges::range_size_t; -using ::ranges::range_value_t; -using ::ranges::range_reference_t; -using ::ranges::range_rvalue_reference_t; - -// [range.sized], sized ranges -// using ::ranges::cpp20::disable_sized_range; -using ::ranges::cpp20::sized_range; - -// [range.view], views -using ::ranges::cpp20::enable_view; -using ::ranges::cpp20::view_base; -using ::ranges::cpp20::view; - -// [range.refinements], other range refinements -using ::ranges::cpp20::output_range; -using ::ranges::cpp20::input_range; -using ::ranges::cpp20::forward_range; -using ::ranges::cpp20::bidirectional_range; -using ::ranges::cpp20::random_access_range; -using ::ranges::cpp20::contiguous_range; -using ::ranges::cpp20::common_range; -using ::ranges::cpp20::viewable_range; - -// [view.interface], class template view_interface -using ::ranges::cpp20::view_interface; - -// [range.utility] -using ::ranges::cpp20::subrange_kind; -using ::ranges::cpp20::subrange; - -// [range.dangling], dangling iterator handling -// using ::ranges::cpp20::dangling; -// using ::ranges::cpp20::borrowed_iterator_t; -// using ::ranges::cpp20::borrowed_subrange_t; - -// [range.empty], empty view -using ::ranges::cpp20::empty_view; -namespace views { template inline constexpr empty_view empty{}; } - -// [range.single], single view -// using ::ranges::cpp20::single_view; -namespace views { using ::ranges::cpp20::views::single; } - -// [range.single], iota view -// using ::ranges::cpp20::iota_view; -namespace views { using ::ranges::cpp20::views::iota; } - -// [range.istream], istream view -template -using basic_istream_view = ::ranges::istream_view; - -// [range.all], all view -namespace views -{ -using ::ranges::cpp20::views::all; -using ::ranges::cpp20::views::all_t; -} // namespace views -using ::ranges::cpp20::ref_view; - -// [range.filter], filter view -// using ::ranges::cpp20::filter_view; -namespace views { using ::ranges::cpp20::views::filter; } - -// [range.transform], transform view -// using ::ranges::cpp20::transform_view; -namespace views { using ::ranges::cpp20::views::transform; } - -// [range.take], take view -// using ::ranges::cpp20::take_view; -namespace views { using ::ranges::cpp20::views::take; } - -// [range.take.while], take while view -// using ::ranges::cpp20::take_while_view; -namespace views { using ::ranges::cpp20::views::take_while; } - -// [range.drop], drop view -// using ::ranges::cpp20::drop_view; -namespace views { using ::ranges::cpp20::views::drop; } - -// [range.drop.while], drop while view -// using ::ranges::cpp20::drop_while; -namespace views { using ::ranges::cpp20::views::drop_while; } - -// [range.join], join view -// using ::ranges::cpp20::join_view; -namespace views { using ::ranges::cpp20::views::join; } - -// [range.split], split view -// using ::ranges::cpp20::split_view; -namespace views { using ::ranges::cpp20::views::split; } - -// [range.counted], counted view -// namespace views { using ::ranges::cpp20::views::counted; } - -// [range.common], common view -// using ::ranges::cpp20::common_view; -namespace views { using ::ranges::cpp20::views::common; } - -// [range.reverse], reverse view -// using ::ranges::cpp20::reverse_view; -namespace views { using ::ranges::cpp20::views::reverse; } - -// [range.elements], elements view -// using ::ranges::cpp20::elements_view; -// using ::ranges::cpp20::keys_view; -// using ::ranges::cpp20::values_view; -namespace views -{ -// using ::ranges::cpp20::views::elements; -using ::ranges::cpp20::views::keys; -using ::ranges::cpp20::views::values; -} // namespace views - -} // anonymous namespace - -} // namespace std::ranges - -namespace std -{ - -namespace views = ::std::ranges::views; - -} // namespace std:: - -#endif // standard header From 56405b1fb51e5329dd9bb6b988f70a9c205a85ba Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:39:54 +0100 Subject: [PATCH 13/22] [MISC] deprecate std/type_traits --- include/seqan3/std/type_traits | 106 +-------------------------------- 1 file changed, 3 insertions(+), 103 deletions(-) diff --git a/include/seqan3/std/type_traits b/include/seqan3/std/type_traits index 287e5ea7f4..6d360bf082 100644 --- a/include/seqan3/std/type_traits +++ b/include/seqan3/std/type_traits @@ -22,107 +22,7 @@ #include -//!\brief std::common_reference has no feature detection macro, but is available since gcc version >=10 (in C++2a mode). -#ifndef SEQAN3_CPP_LIB_COMMON_REFERENCE -# if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 10 && __cplusplus > 201703L -# define SEQAN3_CPP_LIB_COMMON_REFERENCE 1 -# endif -#endif +#include -/*!\brief A workaround for __cpp_lib_remove_cvref for gcc version >=9.0 and <9.4 (in C++17 mode). - * Those versions implemented std::remove_cvref_t, but did not define that feature detection macro. - * \ingroup std_type_traits - */ -#ifdef SEQAN3_DOXYGEN_ONLY // needed as seqan3/core/platform.hpp might not be included -#if SEQAN3_DOXYGEN_ONLY(1)0 -// documentation-only -#define SEQAN3_CPP_LIB_REMOVE_CVREF IMPLEMENTATION_DEFINED -#undef SEQAN3_CPP_LIB_REMOVE_CVREF -#endif // SEQAN3_DOXYGEN_ONLY(1)0 -#endif // SEQAN3_DOXYGEN_ONLY - -#ifndef SEQAN3_CPP_LIB_REMOVE_CVREF -# if defined(__cpp_lib_remove_cvref) -# define SEQAN3_CPP_LIB_REMOVE_CVREF 1 -# elif defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE == 9 && __cplusplus > 201703L -# define SEQAN3_CPP_LIB_REMOVE_CVREF 1 -# endif -#endif - -namespace std -{ - -// ---------------------------------------------------------------------------- -// remove_cvref_t -// ---------------------------------------------------------------------------- -#ifndef SEQAN3_CPP_LIB_REMOVE_CVREF -/*!\brief Return the input type with `const`, `volatile` and references removed. - * \tparam t The type to operate on. - * \ingroup std_type_traits - */ -template -struct remove_cvref; - -//!\cond -template - requires true -struct remove_cvref // needed for gcc-9, it defines std::remove_cvref but does not populate __cpp_lib_remove_cvref -{ - using type = std::remove_cv_t>; -}; -//!\endcond - -/*!\brief Return the input type with `const`, `volatile` and references removed (transformation_trait shortcut). - * \tparam t The type to operate on. - * \ingroup std_type_traits - */ -template -using remove_cvref_t = typename remove_cvref::type; -#endif // SEQAN3_CPP_LIB_REMOVE_CVREF - -// ---------------------------------------------------------------------------- -// type_identity -// ---------------------------------------------------------------------------- -#ifndef __cpp_lib_type_identity - -/*!\brief The identity transformation (a transformation_trait that returns the input). - * \tparam t The type to operate on. - * \see https://en.cppreference.com/w/cpp/types/type_identity - * \ingroup std_type_traits - */ -template -struct type_identity; - -//!\cond -template - requires true -struct type_identity -{ - //!\brief The return type (which is the argument). - using type = t; -}; -//!\endcond - -/*!\brief A shortcut for std::type_identity. - * \tparam t The type to operate on. - * \ingroup std_type_traits - */ -template -using type_identity_t = typename type_identity::type; -#endif // __cpp_lib_type_identity - -} // namespace std - -#ifndef SEQAN3_CPP_LIB_COMMON_REFERENCE -#include -//!\cond -namespace std -{ -template -using common_reference = ::ranges::common_reference; - -template -using common_reference_t = ::ranges::common_reference_t; -//!\endcond -} // namespace std -#endif +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") From 17b6475172db5985a69da6dc3f3792c0d552fafc Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 21:46:21 +0100 Subject: [PATCH 14/22] [MISC] deprecate std/algorithm --- doc/tutorial/sam_file/sam_file_solution2.cpp | 2 +- doc/tutorial/sequence_file/sequence_file_piping_in_out.cpp | 2 +- doc/tutorial/sequence_file/sequence_file_solution5.cpp | 2 +- .../alignment/aligned_sequence/aligned_sequence_concept.hpp | 2 +- include/seqan3/alignment/decorator/gap_decorator.hpp | 2 +- .../seqan3/alignment/matrix/detail/two_dimensional_matrix.hpp | 2 +- include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp | 2 +- include/seqan3/alignment/scoring/aminoacid_scoring_scheme.hpp | 2 +- include/seqan3/alignment/scoring/scoring_scheme_base.hpp | 2 +- include/seqan3/argument_parser/validators.hpp | 2 +- include/seqan3/contrib/parallel/buffer_queue.hpp | 2 +- include/seqan3/contrib/parallel/suspendable_queue.hpp | 2 +- include/seqan3/contrib/stream/bgzf_stream_util.hpp | 2 +- include/seqan3/core/detail/persist_view.hpp | 2 +- include/seqan3/io/detail/misc.hpp | 2 +- include/seqan3/io/detail/misc_input.hpp | 2 +- include/seqan3/io/sam_file/detail/cigar.hpp | 2 +- include/seqan3/io/sequence_file/format_embl.hpp | 2 +- include/seqan3/io/sequence_file/format_fasta.hpp | 2 +- include/seqan3/io/sequence_file/format_fastq.hpp | 2 +- include/seqan3/io/sequence_file/format_genbank.hpp | 2 +- include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp | 2 +- include/seqan3/io/structure_file/format_vienna.hpp | 2 +- include/seqan3/io/views/detail/take_exactly_view.hpp | 2 +- include/seqan3/io/views/detail/take_until_view.hpp | 2 +- include/seqan3/search/dream_index/interleaved_bloom_filter.hpp | 2 +- include/seqan3/search/fm_index/fm_index.hpp | 2 +- include/seqan3/search/search.hpp | 2 +- include/seqan3/search/views/minimiser.hpp | 2 +- include/seqan3/utility/simd/views/to_simd.hpp | 2 +- include/seqan3/utility/views/repeat.hpp | 2 +- test/include/seqan3/test/expect_range_eq.hpp | 2 +- test/include/seqan3/test/performance/sequence_generator.hpp | 2 +- test/include/seqan3/test/sandboxed_path.hpp | 2 +- test/performance/utility/simd/views/to_simd_benchmark.cpp | 2 +- test/snippet/range/views/range_view_all_notation.cpp | 2 +- .../alignment/matrix/detail/aligned_sequence_builder_test.cpp | 2 +- .../matrix/detail/simulated_alignment_test_template.hpp | 2 +- .../pairwise_alignment_collection_callback_test_template.hpp | 2 +- .../pairwise/pairwise_alignment_collection_test_template.hpp | 2 +- test/unit/alphabet/views/char_strictly_to_test.cpp | 2 +- test/unit/alphabet/views/char_to_test.cpp | 2 +- test/unit/alphabet/views/complement_test.cpp | 2 +- test/unit/alphabet/views/translate_test.cpp | 2 +- test/unit/alphabet/views/validate_char_for_test.cpp | 2 +- .../core/algorithm/detail/algorithm_executor_blocking_test.cpp | 2 +- test/unit/core/algorithm/detail/execution_handler_template.hpp | 2 +- test/unit/io/record_test.cpp | 2 +- test/unit/io/sam_file/sam_file_input_test.cpp | 2 +- test/unit/io/sequence_file/sequence_file_format_embl_test.cpp | 2 +- test/unit/io/sequence_file/sequence_file_format_fasta_test.cpp | 2 +- test/unit/io/sequence_file/sequence_file_format_fastq_test.cpp | 2 +- test/unit/io/sequence_file/sequence_file_format_sam_test.cpp | 2 +- test/unit/io/sequence_file/sequence_file_input_test.cpp | 2 +- test/unit/io/structure_file/format_vienna_test.cpp | 2 +- test/unit/io/structure_file/structure_file_input_test.cpp | 2 +- test/unit/io/views/detail/take_exactly_view_test.cpp | 2 +- test/unit/io/views/detail/take_until_view_test.cpp | 2 +- .../bi_fm_index_cursor_collection_test_template.hpp | 2 +- .../search/fm_index_cursor/bi_fm_index_cursor_test_template.hpp | 2 +- .../fm_index_cursor_collection_test_template.hpp | 2 +- .../search/fm_index_cursor/fm_index_cursor_test_template.hpp | 2 +- test/unit/search/kmer_index/shape_test.cpp | 2 +- test/unit/std/algorithm_test.cpp | 2 +- test/unit/std/ranges/find_test.cpp | 2 +- test/unit/std/ranges/move_and_move_backward_test.cpp | 2 +- test/unit/utility/simd/views/to_simd_test.cpp | 2 +- test/unit/utility/views/deep_test.cpp | 2 +- test/unit/utility/views/enforce_random_access_test.cpp | 2 +- test/unit/utility/views/repeat_n_test.cpp | 2 +- test/unit/utility/views/repeat_test.cpp | 2 +- test/unit/utility/views/slice_test.cpp | 2 +- test/unit/utility/views/type_reduce_test.cpp | 2 +- test/unit/utility/views/zip_test.cpp | 2 +- 74 files changed, 74 insertions(+), 74 deletions(-) diff --git a/doc/tutorial/sam_file/sam_file_solution2.cpp b/doc/tutorial/sam_file/sam_file_solution2.cpp index b795c91f5d..b6deb1c251 100644 --- a/doc/tutorial/sam_file/sam_file_solution2.cpp +++ b/doc/tutorial/sam_file/sam_file_solution2.cpp @@ -25,7 +25,7 @@ r003 2064 chr2 18 10 5M * 0 0 TAGGC * }; // std::filesystem::current_path() / "mapping.sam" will be deleted after the execution //![solution] -#include // std::ranges::count +#include // std::ranges::count #include #include #include diff --git a/doc/tutorial/sequence_file/sequence_file_piping_in_out.cpp b/doc/tutorial/sequence_file/sequence_file_piping_in_out.cpp index f5cf9ba8f4..7544ed9a40 100644 --- a/doc/tutorial/sequence_file/sequence_file_piping_in_out.cpp +++ b/doc/tutorial/sequence_file/sequence_file_piping_in_out.cpp @@ -22,7 +22,7 @@ IIIIHHGIIIIHHGIIIH seqan3::test::create_temporary_snippet_file output_fastq{"output.fastq", ""}; //![main] -#include +#include #include #include diff --git a/doc/tutorial/sequence_file/sequence_file_solution5.cpp b/doc/tutorial/sequence_file/sequence_file_solution5.cpp index c99e621b12..ac4d8f67a9 100644 --- a/doc/tutorial/sequence_file/sequence_file_solution5.cpp +++ b/doc/tutorial/sequence_file/sequence_file_solution5.cpp @@ -30,7 +30,7 @@ IIIIIHIIJJIIIII seqan3::test::create_temporary_snippet_file output{"output.fastq", ""}; //![solution] -#include +#include #include #include diff --git a/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp b/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp index 02136851d3..7cf5c2ece7 100644 --- a/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp +++ b/include/seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/decorator/gap_decorator.hpp b/include/seqan3/alignment/decorator/gap_decorator.hpp index a669de8eb1..fa03f1bec3 100644 --- a/include/seqan3/alignment/decorator/gap_decorator.hpp +++ b/include/seqan3/alignment/decorator/gap_decorator.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix.hpp b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix.hpp index adcf34502f..4533224617 100644 --- a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix.hpp +++ b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp b/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp index 19b5ee0d5d..f0a1e76e0d 100644 --- a/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp +++ b/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/alignment/scoring/aminoacid_scoring_scheme.hpp b/include/seqan3/alignment/scoring/aminoacid_scoring_scheme.hpp index 008d7418e3..49e908fc48 100644 --- a/include/seqan3/alignment/scoring/aminoacid_scoring_scheme.hpp +++ b/include/seqan3/alignment/scoring/aminoacid_scoring_scheme.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/scoring/scoring_scheme_base.hpp b/include/seqan3/alignment/scoring/scoring_scheme_base.hpp index 52c53c6244..ebe2dc5d1a 100644 --- a/include/seqan3/alignment/scoring/scoring_scheme_base.hpp +++ b/include/seqan3/alignment/scoring/scoring_scheme_base.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/argument_parser/validators.hpp b/include/seqan3/argument_parser/validators.hpp index 7f87a7d970..563786f3c0 100644 --- a/include/seqan3/argument_parser/validators.hpp +++ b/include/seqan3/argument_parser/validators.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/contrib/parallel/buffer_queue.hpp b/include/seqan3/contrib/parallel/buffer_queue.hpp index 527331e087..7b952d2b12 100644 --- a/include/seqan3/contrib/parallel/buffer_queue.hpp +++ b/include/seqan3/contrib/parallel/buffer_queue.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/contrib/parallel/suspendable_queue.hpp b/include/seqan3/contrib/parallel/suspendable_queue.hpp index 1cbf905704..ba38c2efd6 100644 --- a/include/seqan3/contrib/parallel/suspendable_queue.hpp +++ b/include/seqan3/contrib/parallel/suspendable_queue.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/seqan3/contrib/stream/bgzf_stream_util.hpp b/include/seqan3/contrib/stream/bgzf_stream_util.hpp index f010b60007..53841ecbdf 100644 --- a/include/seqan3/contrib/stream/bgzf_stream_util.hpp +++ b/include/seqan3/contrib/stream/bgzf_stream_util.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/core/detail/persist_view.hpp b/include/seqan3/core/detail/persist_view.hpp index 19ac9d387e..614ce423a5 100644 --- a/include/seqan3/core/detail/persist_view.hpp +++ b/include/seqan3/core/detail/persist_view.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/io/detail/misc.hpp b/include/seqan3/io/detail/misc.hpp index b0ed8f3f9a..da726dbc4b 100644 --- a/include/seqan3/io/detail/misc.hpp +++ b/include/seqan3/io/detail/misc.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/detail/misc_input.hpp b/include/seqan3/io/detail/misc_input.hpp index 6018812bfa..ca7f5db6ba 100644 --- a/include/seqan3/io/detail/misc_input.hpp +++ b/include/seqan3/io/detail/misc_input.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/sam_file/detail/cigar.hpp b/include/seqan3/io/sam_file/detail/cigar.hpp index 9b6449ce26..233d7dc331 100644 --- a/include/seqan3/io/sam_file/detail/cigar.hpp +++ b/include/seqan3/io/sam_file/detail/cigar.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/sequence_file/format_embl.hpp b/include/seqan3/io/sequence_file/format_embl.hpp index d778a52594..07e43e2b00 100644 --- a/include/seqan3/io/sequence_file/format_embl.hpp +++ b/include/seqan3/io/sequence_file/format_embl.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/sequence_file/format_fasta.hpp b/include/seqan3/io/sequence_file/format_fasta.hpp index 1e912574ac..90a1b46ed4 100644 --- a/include/seqan3/io/sequence_file/format_fasta.hpp +++ b/include/seqan3/io/sequence_file/format_fasta.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/sequence_file/format_fastq.hpp b/include/seqan3/io/sequence_file/format_fastq.hpp index 887dc4bc12..37115dca7b 100644 --- a/include/seqan3/io/sequence_file/format_fastq.hpp +++ b/include/seqan3/io/sequence_file/format_fastq.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/sequence_file/format_genbank.hpp b/include/seqan3/io/sequence_file/format_genbank.hpp index 31dd38f578..7f59f7b541 100644 --- a/include/seqan3/io/sequence_file/format_genbank.hpp +++ b/include/seqan3/io/sequence_file/format_genbank.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp b/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp index db92d47d0c..af719fbb25 100644 --- a/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp +++ b/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/structure_file/format_vienna.hpp b/include/seqan3/io/structure_file/format_vienna.hpp index efa237e4ca..a6f941d06c 100644 --- a/include/seqan3/io/structure_file/format_vienna.hpp +++ b/include/seqan3/io/structure_file/format_vienna.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/views/detail/take_exactly_view.hpp b/include/seqan3/io/views/detail/take_exactly_view.hpp index 054b9d265b..d2baba7533 100644 --- a/include/seqan3/io/views/detail/take_exactly_view.hpp +++ b/include/seqan3/io/views/detail/take_exactly_view.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/views/detail/take_until_view.hpp b/include/seqan3/io/views/detail/take_until_view.hpp index 66a15dc894..827f062a13 100644 --- a/include/seqan3/io/views/detail/take_until_view.hpp +++ b/include/seqan3/io/views/detail/take_until_view.hpp @@ -12,7 +12,7 @@ #pragma once -#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 51f65ede9d..1c966e2af9 100644 --- a/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp +++ b/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/search/fm_index/fm_index.hpp b/include/seqan3/search/fm_index/fm_index.hpp index 0442197a17..a936bb215b 100644 --- a/include/seqan3/search/fm_index/fm_index.hpp +++ b/include/seqan3/search/fm_index/fm_index.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/search/search.hpp b/include/seqan3/search/search.hpp index f82a63ed10..82ad9e802d 100644 --- a/include/seqan3/search/search.hpp +++ b/include/seqan3/search/search.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/search/views/minimiser.hpp b/include/seqan3/search/views/minimiser.hpp index e079a55193..902bfd6b92 100644 --- a/include/seqan3/search/views/minimiser.hpp +++ b/include/seqan3/search/views/minimiser.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/simd/views/to_simd.hpp b/include/seqan3/utility/simd/views/to_simd.hpp index 077ed5810a..ac2a5be408 100644 --- a/include/seqan3/utility/simd/views/to_simd.hpp +++ b/include/seqan3/utility/simd/views/to_simd.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/views/repeat.hpp b/include/seqan3/utility/views/repeat.hpp index a4d236a841..45c98a21eb 100644 --- a/include/seqan3/utility/views/repeat.hpp +++ b/include/seqan3/utility/views/repeat.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/test/include/seqan3/test/expect_range_eq.hpp b/test/include/seqan3/test/expect_range_eq.hpp index 619035f2a2..69df3357c9 100644 --- a/test/include/seqan3/test/expect_range_eq.hpp +++ b/test/include/seqan3/test/expect_range_eq.hpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include diff --git a/test/include/seqan3/test/performance/sequence_generator.hpp b/test/include/seqan3/test/performance/sequence_generator.hpp index feaf8e49f7..f6b0eddc35 100644 --- a/test/include/seqan3/test/performance/sequence_generator.hpp +++ b/test/include/seqan3/test/performance/sequence_generator.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/test/include/seqan3/test/sandboxed_path.hpp b/test/include/seqan3/test/sandboxed_path.hpp index b8624413b6..ca4d29e9c5 100644 --- a/test/include/seqan3/test/sandboxed_path.hpp +++ b/test/include/seqan3/test/sandboxed_path.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/test/performance/utility/simd/views/to_simd_benchmark.cpp b/test/performance/utility/simd/views/to_simd_benchmark.cpp index 3530a5ddeb..82be8fb83f 100644 --- a/test/performance/utility/simd/views/to_simd_benchmark.cpp +++ b/test/performance/utility/simd/views/to_simd_benchmark.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include #include diff --git a/test/snippet/range/views/range_view_all_notation.cpp b/test/snippet/range/views/range_view_all_notation.cpp index 1c73bd6908..82284021c0 100644 --- a/test/snippet/range/views/range_view_all_notation.cpp +++ b/test/snippet/range/views/range_view_all_notation.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/test/unit/alignment/matrix/detail/aligned_sequence_builder_test.cpp b/test/unit/alignment/matrix/detail/aligned_sequence_builder_test.cpp index 6c3205bf2a..97ec652a9c 100644 --- a/test/unit/alignment/matrix/detail/aligned_sequence_builder_test.cpp +++ b/test/unit/alignment/matrix/detail/aligned_sequence_builder_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alignment/matrix/detail/simulated_alignment_test_template.hpp b/test/unit/alignment/matrix/detail/simulated_alignment_test_template.hpp index 16a0443b9b..a8eaff2e28 100644 --- a/test/unit/alignment/matrix/detail/simulated_alignment_test_template.hpp +++ b/test/unit/alignment/matrix/detail/simulated_alignment_test_template.hpp @@ -7,7 +7,7 @@ #include -#include +#include template struct simulated_alignment_test : public ::testing::Test diff --git a/test/unit/alignment/pairwise/pairwise_alignment_collection_callback_test_template.hpp b/test/unit/alignment/pairwise/pairwise_alignment_collection_callback_test_template.hpp index ef376acd70..b92cc3c7a9 100644 --- a/test/unit/alignment/pairwise/pairwise_alignment_collection_callback_test_template.hpp +++ b/test/unit/alignment/pairwise/pairwise_alignment_collection_callback_test_template.hpp @@ -9,7 +9,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alignment/pairwise/pairwise_alignment_collection_test_template.hpp b/test/unit/alignment/pairwise/pairwise_alignment_collection_test_template.hpp index 99cdb12aa9..24bf9e5f0e 100644 --- a/test/unit/alignment/pairwise/pairwise_alignment_collection_test_template.hpp +++ b/test/unit/alignment/pairwise/pairwise_alignment_collection_test_template.hpp @@ -9,7 +9,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alphabet/views/char_strictly_to_test.cpp b/test/unit/alphabet/views/char_strictly_to_test.cpp index ec31556a93..0f69805a76 100644 --- a/test/unit/alphabet/views/char_strictly_to_test.cpp +++ b/test/unit/alphabet/views/char_strictly_to_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alphabet/views/char_to_test.cpp b/test/unit/alphabet/views/char_to_test.cpp index 7e1ca9eea3..b4d262130b 100644 --- a/test/unit/alphabet/views/char_to_test.cpp +++ b/test/unit/alphabet/views/char_to_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alphabet/views/complement_test.cpp b/test/unit/alphabet/views/complement_test.cpp index a66e9b056f..c554db3020 100644 --- a/test/unit/alphabet/views/complement_test.cpp +++ b/test/unit/alphabet/views/complement_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alphabet/views/translate_test.cpp b/test/unit/alphabet/views/translate_test.cpp index 9b45b41c4d..fe6732728f 100644 --- a/test/unit/alphabet/views/translate_test.cpp +++ b/test/unit/alphabet/views/translate_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/alphabet/views/validate_char_for_test.cpp b/test/unit/alphabet/views/validate_char_for_test.cpp index 57bfe5d5d1..84aaad6bfa 100644 --- a/test/unit/alphabet/views/validate_char_for_test.cpp +++ b/test/unit/alphabet/views/validate_char_for_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp b/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp index ce098e3bda..87d4ee7162 100644 --- a/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp +++ b/test/unit/core/algorithm/detail/algorithm_executor_blocking_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/core/algorithm/detail/execution_handler_template.hpp b/test/unit/core/algorithm/detail/execution_handler_template.hpp index 215b550c07..50cd54f8f3 100644 --- a/test/unit/core/algorithm/detail/execution_handler_template.hpp +++ b/test/unit/core/algorithm/detail/execution_handler_template.hpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include #include diff --git a/test/unit/io/record_test.cpp b/test/unit/io/record_test.cpp index 49f26cb2db..4357998954 100644 --- a/test/unit/io/record_test.cpp +++ b/test/unit/io/record_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include diff --git a/test/unit/io/sam_file/sam_file_input_test.cpp b/test/unit/io/sam_file/sam_file_input_test.cpp index 481c54df22..d56e0b37da 100644 --- a/test/unit/io/sam_file/sam_file_input_test.cpp +++ b/test/unit/io/sam_file/sam_file_input_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/io/sequence_file/sequence_file_format_embl_test.cpp b/test/unit/io/sequence_file/sequence_file_format_embl_test.cpp index c6e79e90ba..15c7957716 100644 --- a/test/unit/io/sequence_file/sequence_file_format_embl_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_format_embl_test.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include "sequence_file_format_test_template.hpp" diff --git a/test/unit/io/sequence_file/sequence_file_format_fasta_test.cpp b/test/unit/io/sequence_file/sequence_file_format_fasta_test.cpp index 776f55d8fe..aeace72950 100644 --- a/test/unit/io/sequence_file/sequence_file_format_fasta_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_format_fasta_test.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include "sequence_file_format_test_template.hpp" 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 8742c5fcc0..b764c7c27b 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 @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include #include diff --git a/test/unit/io/sequence_file/sequence_file_format_sam_test.cpp b/test/unit/io/sequence_file/sequence_file_format_sam_test.cpp index 22bb55cbbe..87effc7c31 100644 --- a/test/unit/io/sequence_file/sequence_file_format_sam_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_format_sam_test.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include "sequence_file_format_test_template.hpp" diff --git a/test/unit/io/sequence_file/sequence_file_input_test.cpp b/test/unit/io/sequence_file/sequence_file_input_test.cpp index 39ac7ad97f..3d6fa64da7 100644 --- a/test/unit/io/sequence_file/sequence_file_input_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_input_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/io/structure_file/format_vienna_test.cpp b/test/unit/io/structure_file/format_vienna_test.cpp index badab42d22..d2a59c0089 100644 --- a/test/unit/io/structure_file/format_vienna_test.cpp +++ b/test/unit/io/structure_file/format_vienna_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/io/structure_file/structure_file_input_test.cpp b/test/unit/io/structure_file/structure_file_input_test.cpp index 64c5e731e8..f6e783d194 100644 --- a/test/unit/io/structure_file/structure_file_input_test.cpp +++ b/test/unit/io/structure_file/structure_file_input_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/io/views/detail/take_exactly_view_test.cpp b/test/unit/io/views/detail/take_exactly_view_test.cpp index 3efc79e367..5e565f5557 100644 --- a/test/unit/io/views/detail/take_exactly_view_test.cpp +++ b/test/unit/io/views/detail/take_exactly_view_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include 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 cfa409d265..8daa013af4 100644 --- a/test/unit/io/views/detail/take_until_view_test.cpp +++ b/test/unit/io/views/detail/take_until_view_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/search/fm_index_cursor/bi_fm_index_cursor_collection_test_template.hpp b/test/unit/search/fm_index_cursor/bi_fm_index_cursor_collection_test_template.hpp index d21dad5be2..26c54a9340 100644 --- a/test/unit/search/fm_index_cursor/bi_fm_index_cursor_collection_test_template.hpp +++ b/test/unit/search/fm_index_cursor/bi_fm_index_cursor_collection_test_template.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/search/fm_index_cursor/bi_fm_index_cursor_test_template.hpp b/test/unit/search/fm_index_cursor/bi_fm_index_cursor_test_template.hpp index 068921a69e..923f26ae4b 100644 --- a/test/unit/search/fm_index_cursor/bi_fm_index_cursor_test_template.hpp +++ b/test/unit/search/fm_index_cursor/bi_fm_index_cursor_test_template.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/search/fm_index_cursor/fm_index_cursor_collection_test_template.hpp b/test/unit/search/fm_index_cursor/fm_index_cursor_collection_test_template.hpp index ac6c84c2a7..ee3d721e0b 100644 --- a/test/unit/search/fm_index_cursor/fm_index_cursor_collection_test_template.hpp +++ b/test/unit/search/fm_index_cursor/fm_index_cursor_collection_test_template.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/search/fm_index_cursor/fm_index_cursor_test_template.hpp b/test/unit/search/fm_index_cursor/fm_index_cursor_test_template.hpp index 6783e71c58..083476a313 100644 --- a/test/unit/search/fm_index_cursor/fm_index_cursor_test_template.hpp +++ b/test/unit/search/fm_index_cursor/fm_index_cursor_test_template.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/search/kmer_index/shape_test.cpp b/test/unit/search/kmer_index/shape_test.cpp index 9fe4a449fa..3cf15773c5 100644 --- a/test/unit/search/kmer_index/shape_test.cpp +++ b/test/unit/search/kmer_index/shape_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include using seqan3::operator""_shape; diff --git a/test/unit/std/algorithm_test.cpp b/test/unit/std/algorithm_test.cpp index a227d29ec0..e6e1c53b2d 100644 --- a/test/unit/std/algorithm_test.cpp +++ b/test/unit/std/algorithm_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/std/ranges/find_test.cpp b/test/unit/std/ranges/find_test.cpp index e6cab702c7..bcec68b0a7 100644 --- a/test/unit/std/ranges/find_test.cpp +++ b/test/unit/std/ranges/find_test.cpp @@ -9,7 +9,7 @@ #include -#include +#include TEST(general, find) { diff --git a/test/unit/std/ranges/move_and_move_backward_test.cpp b/test/unit/std/ranges/move_and_move_backward_test.cpp index 222a911fee..f913ab3c49 100644 --- a/test/unit/std/ranges/move_and_move_backward_test.cpp +++ b/test/unit/std/ranges/move_and_move_backward_test.cpp @@ -9,7 +9,7 @@ #include -#include +#include TEST(general, move) { diff --git a/test/unit/utility/simd/views/to_simd_test.cpp b/test/unit/utility/simd/views/to_simd_test.cpp index 1617932955..02837287a8 100644 --- a/test/unit/utility/simd/views/to_simd_test.cpp +++ b/test/unit/utility/simd/views/to_simd_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/utility/views/deep_test.cpp b/test/unit/utility/views/deep_test.cpp index eeaddf5110..c2c39dcba9 100644 --- a/test/unit/utility/views/deep_test.cpp +++ b/test/unit/utility/views/deep_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/utility/views/enforce_random_access_test.cpp b/test/unit/utility/views/enforce_random_access_test.cpp index 2b3cd54522..55e52f0968 100644 --- a/test/unit/utility/views/enforce_random_access_test.cpp +++ b/test/unit/utility/views/enforce_random_access_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/utility/views/repeat_n_test.cpp b/test/unit/utility/views/repeat_n_test.cpp index be3255537a..bed5953881 100644 --- a/test/unit/utility/views/repeat_n_test.cpp +++ b/test/unit/utility/views/repeat_n_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/utility/views/repeat_test.cpp b/test/unit/utility/views/repeat_test.cpp index acd29edaae..7e0e19bd59 100644 --- a/test/unit/utility/views/repeat_test.cpp +++ b/test/unit/utility/views/repeat_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/utility/views/slice_test.cpp b/test/unit/utility/views/slice_test.cpp index 11d1959689..df060666c2 100644 --- a/test/unit/utility/views/slice_test.cpp +++ b/test/unit/utility/views/slice_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/utility/views/type_reduce_test.cpp b/test/unit/utility/views/type_reduce_test.cpp index 1bee96c59c..b6d6ae43c2 100644 --- a/test/unit/utility/views/type_reduce_test.cpp +++ b/test/unit/utility/views/type_reduce_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/utility/views/zip_test.cpp b/test/unit/utility/views/zip_test.cpp index be4199e022..29db9af6f9 100644 --- a/test/unit/utility/views/zip_test.cpp +++ b/test/unit/utility/views/zip_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include #include From c5ccb4b2c669bc9ca03cf36f711b1bb0618552c3 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:44:07 +0100 Subject: [PATCH 15/22] [MISC] deprecate std/concepts --- doc/tutorial/concepts/overloading1.cpp | 10 ++++------ doc/tutorial/concepts/overloading2.cpp | 10 ++++------ doc/tutorial/concepts/specialisation.cpp | 4 ++-- .../configuration/align_config_scoring_scheme.hpp | 2 +- .../matrix/detail/advanceable_alignment_coordinate.hpp | 2 +- .../alignment/matrix/detail/affine_cell_proxy.hpp | 2 +- .../matrix/detail/aligned_sequence_builder.hpp | 2 +- .../alignment/matrix/detail/alignment_optimum.hpp | 2 +- .../matrix/detail/alignment_trace_matrix_proxy.hpp | 2 +- .../alignment/matrix/detail/coordinate_matrix.hpp | 2 +- .../seqan3/alignment/matrix/detail/matrix_concept.hpp | 2 +- .../alignment/matrix/detail/matrix_coordinate.hpp | 2 +- .../alignment/matrix/detail/trace_iterator_base.hpp | 2 +- .../detail/two_dimensional_matrix_iterator_base.hpp | 2 +- .../detail/two_dimensional_matrix_iterator_concept.hpp | 2 +- include/seqan3/alignment/pairwise/align_pairwise.hpp | 2 +- .../pairwise/detail/pairwise_alignment_algorithm.hpp | 2 +- .../detail/pairwise_alignment_algorithm_banded.hpp | 2 +- .../seqan3/alignment/pairwise/edit_distance_fwd.hpp | 2 +- .../detail/simd_match_mismatch_scoring_scheme.hpp | 2 +- .../scoring/detail/simd_matrix_scoring_scheme.hpp | 2 +- include/seqan3/alphabet/alphabet_base.hpp | 2 +- .../seqan3/alphabet/composite/alphabet_tuple_base.hpp | 2 +- .../seqan3/alphabet/container/bitpacked_sequence.hpp | 2 +- include/seqan3/alphabet/detail/alphabet_proxy.hpp | 2 +- include/seqan3/alphabet/exception.hpp | 2 +- include/seqan3/alphabet/nucleotide/concept.hpp | 2 +- include/seqan3/alphabet/structure/concept.hpp | 2 +- include/seqan3/alphabet/views/translate.hpp | 2 +- include/seqan3/alphabet/views/translate_join.hpp | 2 +- include/seqan3/argument_parser/auxiliary.hpp | 2 +- include/seqan3/argument_parser/detail/concept.hpp | 2 +- include/seqan3/argument_parser/detail/format_parse.hpp | 2 +- include/seqan3/argument_parser/validators.hpp | 2 +- include/seqan3/contrib/parallel/buffer_queue.hpp | 2 +- .../algorithm/algorithm_result_generator_range.hpp | 2 +- .../algorithm/detail/execution_handler_parallel.hpp | 2 +- .../algorithm/detail/execution_handler_sequential.hpp | 2 +- include/seqan3/core/configuration/configuration.hpp | 2 +- include/seqan3/core/configuration/detail/concept.hpp | 2 +- include/seqan3/core/debug_stream/byte.hpp | 2 +- include/seqan3/core/debug_stream/tuple.hpp | 2 +- include/seqan3/core/detail/persist_view.hpp | 2 +- include/seqan3/core/detail/strong_type.hpp | 2 +- include/seqan3/core/detail/template_inspection.hpp | 2 +- include/seqan3/io/detail/misc_input.hpp | 2 +- include/seqan3/io/sam_file/detail/cigar.hpp | 2 +- include/seqan3/io/sam_file/input.hpp | 2 +- include/seqan3/io/sam_file/sam_tag_dictionary.hpp | 2 +- include/seqan3/io/stream/concept.hpp | 2 +- include/seqan3/io/views/async_input_buffer.hpp | 2 +- include/seqan3/io/views/detail/take_exactly_view.hpp | 2 +- include/seqan3/io/views/detail/take_until_view.hpp | 2 +- .../seqan3/search/configuration/max_error_common.hpp | 2 +- include/seqan3/search/fm_index/concept.hpp | 2 +- include/seqan3/search/search_result.hpp | 2 +- include/seqan3/std/charconv | 2 +- .../utility/char_operations/predicate_detail.hpp | 2 +- .../utility/concept/exposition_only/core_language.hpp | 2 +- include/seqan3/utility/container/concept.hpp | 2 +- include/seqan3/utility/detail/to_little_endian.hpp | 2 +- include/seqan3/utility/math.hpp | 2 +- include/seqan3/utility/simd/algorithm.hpp | 2 +- include/seqan3/utility/simd/concept.hpp | 2 +- include/seqan3/utility/tuple/concept.hpp | 2 +- .../utility/type_list/detail/type_list_algorithm.hpp | 2 +- .../utility/type_pack/detail/type_pack_algorithm.hpp | 2 +- include/seqan3/utility/views/convert.hpp | 2 +- include/seqan3/utility/views/interleave.hpp | 2 +- include/seqan3/utility/views/repeat_n.hpp | 2 +- include/seqan3/utility/views/single_pass_input.hpp | 2 +- include/seqan3/utility/views/slice.hpp | 2 +- include/seqan3/utility/views/type_reduce.hpp | 2 +- test/scripts/check_include_order.pl | 2 +- test/snippet/core/detail/customisation_point.cpp | 2 +- .../align_config_gap_cost_affine_test.cpp | 2 +- .../configuration/align_config_on_result_test.cpp | 2 +- .../configuration/align_config_scoring_scheme_test.cpp | 2 +- .../alignment/pairwise/detail/type_traits_test.cpp | 2 +- test/unit/core/detail/iterator_traits_test.cpp | 2 +- test/unit/core/detail/persist_view_test.cpp | 2 +- test/unit/io/sam_file/sam_tag_dictionary_test.cpp | 2 +- .../sequence_file_format_test_template.hpp | 2 +- test/unit/io/stream/ostream_test_template.hpp | 2 +- test/unit/io/views/detail/take_exactly_view_test.cpp | 2 +- test/unit/search/configuration/on_result_test.cpp | 2 +- test/unit/std/bit_test.cpp | 2 +- test/unit/std/charconv_float_test.cpp | 2 +- test/unit/std/charconv_int_test.cpp | 2 +- test/unit/std/concept/callable_test.cpp | 2 +- test/unit/std/concept/comparison_test.cpp | 2 +- test/unit/std/concept/object_test.cpp | 2 +- test/unit/utility/simd/views/to_simd_test.cpp | 2 +- test/unit/utility/tuple/pop_front_test.cpp | 2 +- test/unit/utility/tuple/split_test.cpp | 2 +- .../unit/utility/type_traits/lazy_conditional_test.cpp | 2 +- test/unit/utility/views/slice_test.cpp | 2 +- test/unit/utility/views/type_reduce_test.cpp | 2 +- 98 files changed, 105 insertions(+), 109 deletions(-) diff --git a/doc/tutorial/concepts/overloading1.cpp b/doc/tutorial/concepts/overloading1.cpp index f1cce772d6..235629d955 100644 --- a/doc/tutorial/concepts/overloading1.cpp +++ b/doc/tutorial/concepts/overloading1.cpp @@ -1,7 +1,5 @@ -#include // for std::cout - -#include // GCC7 - GCC9 or -//#include // compilers with full C++20 support +#include +#include // for std::cout template void print(t const v) @@ -14,6 +12,6 @@ int main() int i{4}; unsigned u{3}; - print(i); // prints "integral value: 4" - print(u); // prints "integral value: 3" + print(i); // prints "integral value: 4" + print(u); // prints "integral value: 3" } diff --git a/doc/tutorial/concepts/overloading2.cpp b/doc/tutorial/concepts/overloading2.cpp index edee82443e..d1224ed8df 100644 --- a/doc/tutorial/concepts/overloading2.cpp +++ b/doc/tutorial/concepts/overloading2.cpp @@ -1,7 +1,5 @@ -#include // for std::cout - -#include // GCC7 - GCC9 or -//#include // compilers with full C++20 support +#include +#include // for std::cout template void print(t const v) @@ -20,6 +18,6 @@ int main() int i{4}; unsigned u{3}; - print(i); // prints "integral value: 4" - print(u); // prints "Unsigned value: 3" + print(i); // prints "integral value: 4" + print(u); // prints "Unsigned value: 3" } diff --git a/doc/tutorial/concepts/specialisation.cpp b/doc/tutorial/concepts/specialisation.cpp index 6b882a3123..af989e3cf8 100644 --- a/doc/tutorial/concepts/specialisation.cpp +++ b/doc/tutorial/concepts/specialisation.cpp @@ -1,5 +1,5 @@ -#include // for std::pair -#include +#include +#include // for std::pair template struct square_root_type; diff --git a/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp b/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp index 41bbf07c07..8bbfec6140 100644 --- a/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp +++ b/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp b/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp index 03f8ae9dc6..cc8aa15e8b 100644 --- a/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp +++ b/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp b/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp index d27b9c5bb6..37bb6b8155 100644 --- a/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp +++ b/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/aligned_sequence_builder.hpp b/include/seqan3/alignment/matrix/detail/aligned_sequence_builder.hpp index 09ee44e2be..ed6c50bf0f 100644 --- a/include/seqan3/alignment/matrix/detail/aligned_sequence_builder.hpp +++ b/include/seqan3/alignment/matrix/detail/aligned_sequence_builder.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp b/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp index b314e0f519..7d59b5f8d9 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_proxy.hpp b/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_proxy.hpp index 8cdb696fe3..7fc076d74a 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_proxy.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_proxy.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/coordinate_matrix.hpp b/include/seqan3/alignment/matrix/detail/coordinate_matrix.hpp index 934fb25392..435d86b6dc 100644 --- a/include/seqan3/alignment/matrix/detail/coordinate_matrix.hpp +++ b/include/seqan3/alignment/matrix/detail/coordinate_matrix.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/matrix_concept.hpp b/include/seqan3/alignment/matrix/detail/matrix_concept.hpp index c24d0147e5..b2d810d6b6 100644 --- a/include/seqan3/alignment/matrix/detail/matrix_concept.hpp +++ b/include/seqan3/alignment/matrix/detail/matrix_concept.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include namespace seqan3::detail { diff --git a/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp b/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp index 8c682dc58c..b6460941a8 100644 --- a/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp +++ b/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/trace_iterator_base.hpp b/include/seqan3/alignment/matrix/detail/trace_iterator_base.hpp index 6da54a6ca0..889bf5fee7 100644 --- a/include/seqan3/alignment/matrix/detail/trace_iterator_base.hpp +++ b/include/seqan3/alignment/matrix/detail/trace_iterator_base.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_base.hpp b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_base.hpp index f083fc520c..8669d0a64b 100644 --- a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_base.hpp +++ b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_base.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp index 9c29983ba3..9035387067 100644 --- a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp +++ b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/alignment/pairwise/align_pairwise.hpp b/include/seqan3/alignment/pairwise/align_pairwise.hpp index a2d776c22c..05647be608 100644 --- a/include/seqan3/alignment/pairwise/align_pairwise.hpp +++ b/include/seqan3/alignment/pairwise/align_pairwise.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp b/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp index bfcfe41289..aefd3d5acf 100644 --- a/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp +++ b/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm_banded.hpp b/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm_banded.hpp index f79d9179f3..f1211fea72 100644 --- a/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm_banded.hpp +++ b/include/seqan3/alignment/pairwise/detail/pairwise_alignment_algorithm_banded.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/pairwise/edit_distance_fwd.hpp b/include/seqan3/alignment/pairwise/edit_distance_fwd.hpp index 506025eb60..a8ee533855 100644 --- a/include/seqan3/alignment/pairwise/edit_distance_fwd.hpp +++ b/include/seqan3/alignment/pairwise/edit_distance_fwd.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/scoring/detail/simd_match_mismatch_scoring_scheme.hpp b/include/seqan3/alignment/scoring/detail/simd_match_mismatch_scoring_scheme.hpp index 49a6c9c95f..f38cad849e 100644 --- a/include/seqan3/alignment/scoring/detail/simd_match_mismatch_scoring_scheme.hpp +++ b/include/seqan3/alignment/scoring/detail/simd_match_mismatch_scoring_scheme.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/scoring/detail/simd_matrix_scoring_scheme.hpp b/include/seqan3/alignment/scoring/detail/simd_matrix_scoring_scheme.hpp index ef85320f88..d24ab82a77 100644 --- a/include/seqan3/alignment/scoring/detail/simd_matrix_scoring_scheme.hpp +++ b/include/seqan3/alignment/scoring/detail/simd_matrix_scoring_scheme.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alphabet/alphabet_base.hpp b/include/seqan3/alphabet/alphabet_base.hpp index bc44d10f12..4a11f3740a 100644 --- a/include/seqan3/alphabet/alphabet_base.hpp +++ b/include/seqan3/alphabet/alphabet_base.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp b/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp index 30529d6da1..31fac8d9c6 100644 --- a/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp +++ b/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/alphabet/container/bitpacked_sequence.hpp b/include/seqan3/alphabet/container/bitpacked_sequence.hpp index 398a499bbd..c923fc1cc1 100644 --- a/include/seqan3/alphabet/container/bitpacked_sequence.hpp +++ b/include/seqan3/alphabet/container/bitpacked_sequence.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/alphabet/detail/alphabet_proxy.hpp b/include/seqan3/alphabet/detail/alphabet_proxy.hpp index dd03ddf043..775c0bc391 100644 --- a/include/seqan3/alphabet/detail/alphabet_proxy.hpp +++ b/include/seqan3/alphabet/detail/alphabet_proxy.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alphabet/exception.hpp b/include/seqan3/alphabet/exception.hpp index 761d095e78..849410fe76 100644 --- a/include/seqan3/alphabet/exception.hpp +++ b/include/seqan3/alphabet/exception.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alphabet/nucleotide/concept.hpp b/include/seqan3/alphabet/nucleotide/concept.hpp index f50a2e2f0a..8ad536eaeb 100644 --- a/include/seqan3/alphabet/nucleotide/concept.hpp +++ b/include/seqan3/alphabet/nucleotide/concept.hpp @@ -14,7 +14,7 @@ #pragma once #include -#include +#include // ============================================================================ // complement() diff --git a/include/seqan3/alphabet/structure/concept.hpp b/include/seqan3/alphabet/structure/concept.hpp index 34d488c131..8e65b80ade 100644 --- a/include/seqan3/alphabet/structure/concept.hpp +++ b/include/seqan3/alphabet/structure/concept.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include // ============================================================================ diff --git a/include/seqan3/alphabet/views/translate.hpp b/include/seqan3/alphabet/views/translate.hpp index b75114b1f9..0e65f5a11d 100644 --- a/include/seqan3/alphabet/views/translate.hpp +++ b/include/seqan3/alphabet/views/translate.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/alphabet/views/translate_join.hpp b/include/seqan3/alphabet/views/translate_join.hpp index a7b6d851d9..6e00f9d1fe 100644 --- a/include/seqan3/alphabet/views/translate_join.hpp +++ b/include/seqan3/alphabet/views/translate_join.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/argument_parser/auxiliary.hpp b/include/seqan3/argument_parser/auxiliary.hpp index 3c916ed77f..a0192c6544 100644 --- a/include/seqan3/argument_parser/auxiliary.hpp +++ b/include/seqan3/argument_parser/auxiliary.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/argument_parser/detail/concept.hpp b/include/seqan3/argument_parser/detail/concept.hpp index cecb5da723..f959c27d18 100644 --- a/include/seqan3/argument_parser/detail/concept.hpp +++ b/include/seqan3/argument_parser/detail/concept.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/argument_parser/detail/format_parse.hpp b/include/seqan3/argument_parser/detail/format_parse.hpp index 810bbc178f..a78d8205aa 100644 --- a/include/seqan3/argument_parser/detail/format_parse.hpp +++ b/include/seqan3/argument_parser/detail/format_parse.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/argument_parser/validators.hpp b/include/seqan3/argument_parser/validators.hpp index 563786f3c0..45bc16d013 100644 --- a/include/seqan3/argument_parser/validators.hpp +++ b/include/seqan3/argument_parser/validators.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/contrib/parallel/buffer_queue.hpp b/include/seqan3/contrib/parallel/buffer_queue.hpp index 7b952d2b12..08e012dfcc 100644 --- a/include/seqan3/contrib/parallel/buffer_queue.hpp +++ b/include/seqan3/contrib/parallel/buffer_queue.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/seqan3/core/algorithm/algorithm_result_generator_range.hpp b/include/seqan3/core/algorithm/algorithm_result_generator_range.hpp index bd6baba0eb..a4e2b1fb75 100644 --- a/include/seqan3/core/algorithm/algorithm_result_generator_range.hpp +++ b/include/seqan3/core/algorithm/algorithm_result_generator_range.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp b/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp index e718c25f2d..7a1c8bf32c 100644 --- a/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp +++ b/include/seqan3/core/algorithm/detail/execution_handler_parallel.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/core/algorithm/detail/execution_handler_sequential.hpp b/include/seqan3/core/algorithm/detail/execution_handler_sequential.hpp index 612c93b299..f235fa238d 100644 --- a/include/seqan3/core/algorithm/detail/execution_handler_sequential.hpp +++ b/include/seqan3/core/algorithm/detail/execution_handler_sequential.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/core/configuration/configuration.hpp b/include/seqan3/core/configuration/configuration.hpp index d230cd9f3f..12803a5113 100644 --- a/include/seqan3/core/configuration/configuration.hpp +++ b/include/seqan3/core/configuration/configuration.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/core/configuration/detail/concept.hpp b/include/seqan3/core/configuration/detail/concept.hpp index 5e83586b4d..4d13c10035 100644 --- a/include/seqan3/core/configuration/detail/concept.hpp +++ b/include/seqan3/core/configuration/detail/concept.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/core/debug_stream/byte.hpp b/include/seqan3/core/debug_stream/byte.hpp index a928aa1dda..41908f9d49 100644 --- a/include/seqan3/core/debug_stream/byte.hpp +++ b/include/seqan3/core/debug_stream/byte.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/core/debug_stream/tuple.hpp b/include/seqan3/core/debug_stream/tuple.hpp index efbf817939..9d285da5e5 100644 --- a/include/seqan3/core/debug_stream/tuple.hpp +++ b/include/seqan3/core/debug_stream/tuple.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/core/detail/persist_view.hpp b/include/seqan3/core/detail/persist_view.hpp index 614ce423a5..d1f37d393a 100644 --- a/include/seqan3/core/detail/persist_view.hpp +++ b/include/seqan3/core/detail/persist_view.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/core/detail/strong_type.hpp b/include/seqan3/core/detail/strong_type.hpp index 88a1041811..43eb1bc94a 100644 --- a/include/seqan3/core/detail/strong_type.hpp +++ b/include/seqan3/core/detail/strong_type.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/core/detail/template_inspection.hpp b/include/seqan3/core/detail/template_inspection.hpp index a61047f49d..307a0db7ad 100644 --- a/include/seqan3/core/detail/template_inspection.hpp +++ b/include/seqan3/core/detail/template_inspection.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include diff --git a/include/seqan3/io/detail/misc_input.hpp b/include/seqan3/io/detail/misc_input.hpp index ca7f5db6ba..793b41e9e4 100644 --- a/include/seqan3/io/detail/misc_input.hpp +++ b/include/seqan3/io/detail/misc_input.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/io/sam_file/detail/cigar.hpp b/include/seqan3/io/sam_file/detail/cigar.hpp index 233d7dc331..0b2419cd2d 100644 --- a/include/seqan3/io/sam_file/detail/cigar.hpp +++ b/include/seqan3/io/sam_file/detail/cigar.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/io/sam_file/input.hpp b/include/seqan3/io/sam_file/input.hpp index 8a0c3fd8aa..d95a90577f 100644 --- a/include/seqan3/io/sam_file/input.hpp +++ b/include/seqan3/io/sam_file/input.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/io/sam_file/sam_tag_dictionary.hpp b/include/seqan3/io/sam_file/sam_tag_dictionary.hpp index 55bf76fbac..919dbeca75 100644 --- a/include/seqan3/io/sam_file/sam_tag_dictionary.hpp +++ b/include/seqan3/io/sam_file/sam_tag_dictionary.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/io/stream/concept.hpp b/include/seqan3/io/stream/concept.hpp index fb6f7b3ff7..a3626c554f 100644 --- a/include/seqan3/io/stream/concept.hpp +++ b/include/seqan3/io/stream/concept.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/io/views/async_input_buffer.hpp b/include/seqan3/io/views/async_input_buffer.hpp index 7144d3dffd..951fc5f432 100644 --- a/include/seqan3/io/views/async_input_buffer.hpp +++ b/include/seqan3/io/views/async_input_buffer.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/io/views/detail/take_exactly_view.hpp b/include/seqan3/io/views/detail/take_exactly_view.hpp index d2baba7533..46994a190e 100644 --- a/include/seqan3/io/views/detail/take_exactly_view.hpp +++ b/include/seqan3/io/views/detail/take_exactly_view.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/io/views/detail/take_until_view.hpp b/include/seqan3/io/views/detail/take_until_view.hpp index 827f062a13..5fb0289bbd 100644 --- a/include/seqan3/io/views/detail/take_until_view.hpp +++ b/include/seqan3/io/views/detail/take_until_view.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/search/configuration/max_error_common.hpp b/include/seqan3/search/configuration/max_error_common.hpp index 72a31c9e70..a705ae0756 100644 --- a/include/seqan3/search/configuration/max_error_common.hpp +++ b/include/seqan3/search/configuration/max_error_common.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/search/fm_index/concept.hpp b/include/seqan3/search/fm_index/concept.hpp index 5a78a63510..7fcfbf39d3 100644 --- a/include/seqan3/search/fm_index/concept.hpp +++ b/include/seqan3/search/fm_index/concept.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/search/search_result.hpp b/include/seqan3/search/search_result.hpp index 588198291f..f43d43cb2f 100644 --- a/include/seqan3/search/search_result.hpp +++ b/include/seqan3/search/search_result.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/std/charconv b/include/seqan3/std/charconv index c79068deee..da55e97b75 100644 --- a/include/seqan3/std/charconv +++ b/include/seqan3/std/charconv @@ -105,7 +105,7 @@ using ::seqan3::contrib::charconv::from_chars; #if !defined(SEQAN3_CPP_LIB_TO_CHARS) || SEQAN3_CPP_LIB_TO_CHARS == 100000 #include -#include +#include #include namespace seqan3::contrib::charconv_float diff --git a/include/seqan3/utility/char_operations/predicate_detail.hpp b/include/seqan3/utility/char_operations/predicate_detail.hpp index 5d682e17d1..e939b98c82 100644 --- a/include/seqan3/utility/char_operations/predicate_detail.hpp +++ b/include/seqan3/utility/char_operations/predicate_detail.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/concept/exposition_only/core_language.hpp b/include/seqan3/utility/concept/exposition_only/core_language.hpp index a84c1e31d5..dd48cb9d68 100644 --- a/include/seqan3/utility/concept/exposition_only/core_language.hpp +++ b/include/seqan3/utility/concept/exposition_only/core_language.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/container/concept.hpp b/include/seqan3/utility/container/concept.hpp index 88bcbd0f11..4e2a2c9dd3 100644 --- a/include/seqan3/utility/container/concept.hpp +++ b/include/seqan3/utility/container/concept.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/utility/detail/to_little_endian.hpp b/include/seqan3/utility/detail/to_little_endian.hpp index f1da4c57e0..3cc905e758 100644 --- a/include/seqan3/utility/detail/to_little_endian.hpp +++ b/include/seqan3/utility/detail/to_little_endian.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include // Find correct header for byte-order conversion functions. #if __has_include() // unix GLIBC diff --git a/include/seqan3/utility/math.hpp b/include/seqan3/utility/math.hpp index 853e07aafb..d7901aa826 100644 --- a/include/seqan3/utility/math.hpp +++ b/include/seqan3/utility/math.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/simd/algorithm.hpp b/include/seqan3/utility/simd/algorithm.hpp index e1f2e72226..d282dd5931 100644 --- a/include/seqan3/utility/simd/algorithm.hpp +++ b/include/seqan3/utility/simd/algorithm.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/simd/concept.hpp b/include/seqan3/utility/simd/concept.hpp index 90b6ac62d0..d8b090a339 100644 --- a/include/seqan3/utility/simd/concept.hpp +++ b/include/seqan3/utility/simd/concept.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/tuple/concept.hpp b/include/seqan3/utility/tuple/concept.hpp index d59d9814da..9e8945566b 100644 --- a/include/seqan3/utility/tuple/concept.hpp +++ b/include/seqan3/utility/tuple/concept.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp b/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp index 31dd87b714..495a65aabd 100644 --- a/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp +++ b/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp b/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp index dabd81e570..fa5881bda1 100644 --- a/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp +++ b/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/views/convert.hpp b/include/seqan3/utility/views/convert.hpp index ddec993b59..6406cc2aab 100644 --- a/include/seqan3/utility/views/convert.hpp +++ b/include/seqan3/utility/views/convert.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/views/interleave.hpp b/include/seqan3/utility/views/interleave.hpp index c7ec1144ea..d227dd63af 100644 --- a/include/seqan3/utility/views/interleave.hpp +++ b/include/seqan3/utility/views/interleave.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/utility/views/repeat_n.hpp b/include/seqan3/utility/views/repeat_n.hpp index 2b8a592d99..2dd3b5e743 100644 --- a/include/seqan3/utility/views/repeat_n.hpp +++ b/include/seqan3/utility/views/repeat_n.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/views/single_pass_input.hpp b/include/seqan3/utility/views/single_pass_input.hpp index 5c863b8c03..e134d681bd 100644 --- a/include/seqan3/utility/views/single_pass_input.hpp +++ b/include/seqan3/utility/views/single_pass_input.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/utility/views/slice.hpp b/include/seqan3/utility/views/slice.hpp index 8e6bedea13..63251048f4 100644 --- a/include/seqan3/utility/views/slice.hpp +++ b/include/seqan3/utility/views/slice.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/utility/views/type_reduce.hpp b/include/seqan3/utility/views/type_reduce.hpp index f9832071a9..8d1a15a2bb 100644 --- a/include/seqan3/utility/views/type_reduce.hpp +++ b/include/seqan3/utility/views/type_reduce.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/test/scripts/check_include_order.pl b/test/scripts/check_include_order.pl index ce7398f74a..be63b2ea5f 100755 --- a/test/scripts/check_include_order.pl +++ b/test/scripts/check_include_order.pl @@ -18,7 +18,7 @@ # This is a script checking for blocks of include statements: # # #include -# #include +# #include # #include # # It will extract the include paths to diff --git a/test/snippet/core/detail/customisation_point.cpp b/test/snippet/core/detail/customisation_point.cpp index 30240ae06b..760166e7f1 100644 --- a/test/snippet/core/detail/customisation_point.cpp +++ b/test/snippet/core/detail/customisation_point.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/test/unit/alignment/configuration/align_config_gap_cost_affine_test.cpp b/test/unit/alignment/configuration/align_config_gap_cost_affine_test.cpp index c626d89997..1b892e5259 100644 --- a/test/unit/alignment/configuration/align_config_gap_cost_affine_test.cpp +++ b/test/unit/alignment/configuration/align_config_gap_cost_affine_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alignment/configuration/align_config_on_result_test.cpp b/test/unit/alignment/configuration/align_config_on_result_test.cpp index 232ef098da..7fd74bdc46 100644 --- a/test/unit/alignment/configuration/align_config_on_result_test.cpp +++ b/test/unit/alignment/configuration/align_config_on_result_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alignment/configuration/align_config_scoring_scheme_test.cpp b/test/unit/alignment/configuration/align_config_scoring_scheme_test.cpp index dc823cd704..35e91b83e5 100644 --- a/test/unit/alignment/configuration/align_config_scoring_scheme_test.cpp +++ b/test/unit/alignment/configuration/align_config_scoring_scheme_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alignment/pairwise/detail/type_traits_test.cpp b/test/unit/alignment/pairwise/detail/type_traits_test.cpp index cb45b89d70..0027053385 100644 --- a/test/unit/alignment/pairwise/detail/type_traits_test.cpp +++ b/test/unit/alignment/pairwise/detail/type_traits_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/core/detail/iterator_traits_test.cpp b/test/unit/core/detail/iterator_traits_test.cpp index 385b628a94..6a7e5a31c7 100644 --- a/test/unit/core/detail/iterator_traits_test.cpp +++ b/test/unit/core/detail/iterator_traits_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/core/detail/persist_view_test.cpp b/test/unit/core/detail/persist_view_test.cpp index fe27560308..ecf7921fc1 100644 --- a/test/unit/core/detail/persist_view_test.cpp +++ b/test/unit/core/detail/persist_view_test.cpp @@ -9,7 +9,7 @@ #include -#include +#include #include #include diff --git a/test/unit/io/sam_file/sam_tag_dictionary_test.cpp b/test/unit/io/sam_file/sam_tag_dictionary_test.cpp index 3ce0c43c0c..451fd59317 100644 --- a/test/unit/io/sam_file/sam_tag_dictionary_test.cpp +++ b/test/unit/io/sam_file/sam_tag_dictionary_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/io/sequence_file/sequence_file_format_test_template.hpp b/test/unit/io/sequence_file/sequence_file_format_test_template.hpp index bae46e1953..aaac83ce07 100644 --- a/test/unit/io/sequence_file/sequence_file_format_test_template.hpp +++ b/test/unit/io/sequence_file/sequence_file_format_test_template.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/test/unit/io/stream/ostream_test_template.hpp b/test/unit/io/stream/ostream_test_template.hpp index 9a2db288a9..2f181301f0 100644 --- a/test/unit/io/stream/ostream_test_template.hpp +++ b/test/unit/io/stream/ostream_test_template.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include template diff --git a/test/unit/io/views/detail/take_exactly_view_test.cpp b/test/unit/io/views/detail/take_exactly_view_test.cpp index 5e565f5557..f3c48b5d54 100644 --- a/test/unit/io/views/detail/take_exactly_view_test.cpp +++ b/test/unit/io/views/detail/take_exactly_view_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/unit/search/configuration/on_result_test.cpp b/test/unit/search/configuration/on_result_test.cpp index a0d91577b1..548ca24e0a 100644 --- a/test/unit/search/configuration/on_result_test.cpp +++ b/test/unit/search/configuration/on_result_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/std/bit_test.cpp b/test/unit/std/bit_test.cpp index af458fee89..4ba93449a4 100644 --- a/test/unit/std/bit_test.cpp +++ b/test/unit/std/bit_test.cpp @@ -6,7 +6,7 @@ // ----------------------------------------------------------------------------------------------------- #include -#include +#include #include diff --git a/test/unit/std/charconv_float_test.cpp b/test/unit/std/charconv_float_test.cpp index 828b4f7914..5af424b2a8 100644 --- a/test/unit/std/charconv_float_test.cpp +++ b/test/unit/std/charconv_float_test.cpp @@ -14,7 +14,7 @@ #endif // __has_include() #include #include -#include +#include #include #include diff --git a/test/unit/std/charconv_int_test.cpp b/test/unit/std/charconv_int_test.cpp index cb7943137c..1647c0b19a 100644 --- a/test/unit/std/charconv_int_test.cpp +++ b/test/unit/std/charconv_int_test.cpp @@ -14,7 +14,7 @@ #endif // __has_include() #include #include -#include +#include #include #include diff --git a/test/unit/std/concept/callable_test.cpp b/test/unit/std/concept/callable_test.cpp index fb466960cd..7b4f7a7d33 100644 --- a/test/unit/std/concept/callable_test.cpp +++ b/test/unit/std/concept/callable_test.cpp @@ -9,7 +9,7 @@ #include -#include +#include #include "auxiliary.hpp" diff --git a/test/unit/std/concept/comparison_test.cpp b/test/unit/std/concept/comparison_test.cpp index b86ba0e6d2..7b53da8fc3 100644 --- a/test/unit/std/concept/comparison_test.cpp +++ b/test/unit/std/concept/comparison_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/std/concept/object_test.cpp b/test/unit/std/concept/object_test.cpp index 645264aabe..33ba68ff15 100644 --- a/test/unit/std/concept/object_test.cpp +++ b/test/unit/std/concept/object_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/utility/simd/views/to_simd_test.cpp b/test/unit/utility/simd/views/to_simd_test.cpp index 02837287a8..d5b14f7e6b 100644 --- a/test/unit/utility/simd/views/to_simd_test.cpp +++ b/test/unit/utility/simd/views/to_simd_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/unit/utility/tuple/pop_front_test.cpp b/test/unit/utility/tuple/pop_front_test.cpp index dadda7e72d..06b158d09a 100644 --- a/test/unit/utility/tuple/pop_front_test.cpp +++ b/test/unit/utility/tuple/pop_front_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include diff --git a/test/unit/utility/tuple/split_test.cpp b/test/unit/utility/tuple/split_test.cpp index 6c4ada7ace..e2f9284696 100644 --- a/test/unit/utility/tuple/split_test.cpp +++ b/test/unit/utility/tuple/split_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include diff --git a/test/unit/utility/type_traits/lazy_conditional_test.cpp b/test/unit/utility/type_traits/lazy_conditional_test.cpp index 4cb69f71e5..585a13dbba 100644 --- a/test/unit/utility/type_traits/lazy_conditional_test.cpp +++ b/test/unit/utility/type_traits/lazy_conditional_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/utility/views/slice_test.cpp b/test/unit/utility/views/slice_test.cpp index df060666c2..30eb170721 100644 --- a/test/unit/utility/views/slice_test.cpp +++ b/test/unit/utility/views/slice_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/unit/utility/views/type_reduce_test.cpp b/test/unit/utility/views/type_reduce_test.cpp index b6d6ae43c2..cee43a3284 100644 --- a/test/unit/utility/views/type_reduce_test.cpp +++ b/test/unit/utility/views/type_reduce_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include From 83db3ec8564bdf0df7ac7470242a46f65382af06 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:45:53 +0100 Subject: [PATCH 16/22] [MISC] deprecate std/iterator --- .../advanceable_alignment_coordinate.hpp | 2 +- ...lignment_matrix_column_major_range_base.hpp | 2 +- .../alignment_score_matrix_one_column.hpp | 2 +- ...lignment_score_matrix_one_column_banded.hpp | 2 +- .../detail/alignment_trace_matrix_full.hpp | 2 +- .../alignment_trace_matrix_full_banded.hpp | 2 +- ...two_dimensional_matrix_iterator_concept.hpp | 2 +- .../alignment/pairwise/alignment_algorithm.hpp | 2 +- .../alphabet/container/bitpacked_sequence.hpp | 2 +- .../container/concatenated_sequences.hpp | 18 +++++++++--------- .../contrib/parallel/suspendable_queue.hpp | 2 +- include/seqan3/contrib/span/span | 2 +- include/seqan3/core/detail/iterator_traits.hpp | 2 +- .../range/detail/inherited_iterator_base.hpp | 2 +- .../range/detail/random_access_iterator.hpp | 2 +- include/seqan3/core/range/type_traits.hpp | 2 +- include/seqan3/io/detail/misc.hpp | 2 +- .../stream/detail/fast_istreambuf_iterator.hpp | 2 +- .../stream/detail/fast_ostreambuf_iterator.hpp | 2 +- include/seqan3/io/views/async_input_buffer.hpp | 2 +- .../seqan3/io/views/detail/istreambuf_view.hpp | 2 +- .../io/views/detail/take_exactly_view.hpp | 2 +- .../seqan3/io/views/detail/take_until_view.hpp | 2 +- include/seqan3/utility/container/concept.hpp | 2 +- include/seqan3/utility/simd/views/to_simd.hpp | 2 +- .../utility/views/enforce_random_access.hpp | 2 +- .../seqan3/utility/views/single_pass_input.hpp | 2 +- include/seqan3/utility/views/slice.hpp | 2 +- test/include/seqan3/test/pretty_printing.hpp | 2 +- .../sequence_file_output_view_pipeline.cpp | 2 +- .../aligned_sequence_test_template.hpp | 2 +- .../detail/trace_iterator_banded_test.cpp | 2 +- .../matrix/detail/trace_iterator_test.cpp | 2 +- .../detail/execution_handler_template.hpp | 2 +- test/unit/core/detail/iterator_traits_test.cpp | 2 +- .../io/detail/ignore_output_iterator_test.cpp | 2 +- test/unit/io/detail/in_file_iterator_test.cpp | 2 +- test/unit/io/detail/out_file_iterator_test.cpp | 2 +- test/unit/io/sam_file/sam_file_input_test.cpp | 2 +- test/unit/io/sam_file/sam_file_output_test.cpp | 2 +- .../sequence_file/sequence_file_input_test.cpp | 2 +- .../sequence_file_integration_test.cpp | 2 +- .../sequence_file_output_test.cpp | 2 +- .../detail/fast_istreambuf_iterator_test.cpp | 2 +- .../detail/fast_ostreambuf_iterator_test.cpp | 2 +- .../io/structure_file/format_vienna_test.cpp | 2 +- .../structure_file_input_test.cpp | 2 +- .../structure_file_output_test.cpp | 2 +- test/unit/range/iterator_test_template.hpp | 2 +- test/unit/range/range_test_template.hpp | 2 +- test/unit/search/helper.hpp | 2 +- test/unit/std/algorithm_test.cpp | 2 +- test/unit/std/concept/auxiliary_iterator.hpp | 2 +- .../detail/exposition_only_concept_test.cpp | 2 +- test/unit/utility/simd/views/to_simd_test.cpp | 2 +- 55 files changed, 63 insertions(+), 63 deletions(-) diff --git a/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp b/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp index cc8aa15e8b..e4070c2475 100644 --- a/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp +++ b/include/seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp b/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp index aed5b237af..eeea24e7f5 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp index 2ee931a080..058c1d2fe4 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp index 6ee430da60..0cfdfaf0ad 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full.hpp b/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full.hpp index b66340ad17..8f82deb4a2 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full_banded.hpp b/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full_banded.hpp index aac489da86..026275fadf 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full_banded.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_trace_matrix_full_banded.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp index 9035387067..6aff508581 100644 --- a/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp +++ b/include/seqan3/alignment/matrix/detail/two_dimensional_matrix_iterator_concept.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include namespace seqan3::detail { diff --git a/include/seqan3/alignment/pairwise/alignment_algorithm.hpp b/include/seqan3/alignment/pairwise/alignment_algorithm.hpp index 40f5c29302..82ddbbdc7b 100644 --- a/include/seqan3/alignment/pairwise/alignment_algorithm.hpp +++ b/include/seqan3/alignment/pairwise/alignment_algorithm.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/alphabet/container/bitpacked_sequence.hpp b/include/seqan3/alphabet/container/bitpacked_sequence.hpp index c923fc1cc1..5b73b72168 100644 --- a/include/seqan3/alphabet/container/bitpacked_sequence.hpp +++ b/include/seqan3/alphabet/container/bitpacked_sequence.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/alphabet/container/concatenated_sequences.hpp b/include/seqan3/alphabet/container/concatenated_sequences.hpp index 82d9e3f23f..03d5611a17 100644 --- a/include/seqan3/alphabet/container/concatenated_sequences.hpp +++ b/include/seqan3/alphabet/container/concatenated_sequences.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include @@ -31,7 +31,7 @@ namespace seqan3 /*!\brief Container that stores sequences concatenated internally. * \tparam underlying_container_type Type of the underlying container. Must satisfy seqan3::reservible_container. - * \tparam data_delimiters_type A container that stores the begin/end positions in the underlying_container_type. Must + * \tparam data_delimiters_type A container that stores the begin/end positions in the underlying_container_type. Must * satifsy seqan3::reservible_container and have underlying_container_type's size_type as value_type. * \implements seqan3::cerealisable * \implements seqan3::reservible_container @@ -84,7 +84,7 @@ template > && reservible_container> && - std::is_same_v, + std::is_same_v, std::ranges::range_value_t> //!\endcond class concatenated_sequences @@ -1233,7 +1233,7 @@ class concatenated_sequences * This conceptionally adds another element to the container with the specified content, * i.e. the "outer container" grows by 1. * - * If the new concat_size() is greater than concat_capacity(), all iterators and references (including the + * If the new concat_size() is greater than concat_capacity(), all iterators and references (including the * past-the-end iterator) are invalidated. Otherwise, only the past-the-end iterator is invalidated. * * ### Complexity @@ -1270,7 +1270,7 @@ class concatenated_sequences * * ### Exceptions * - * Basic exception guarantee, i.e. guaranteed not to leak. However, the container may contain invalid data after + * Basic exception guarantee, i.e. guaranteed not to leak. However, the container may contain invalid data after * an exception is thrown. * * \experimentalapi{Experimental since version 3.1.} @@ -1286,7 +1286,7 @@ class concatenated_sequences * This conceptionally performs a `push_back()` on the `back()` of this container, * i.e. that last inner container grows by 1. * - * If the new concat_size() is greater than concat_capacity(), all iterators and references (including the + * If the new concat_size() is greater than concat_capacity(), all iterators and references (including the * past-the-end iterator) are invalidated. Otherwise, only the past-the-end iterator is invalidated. * * ### Complexity @@ -1295,7 +1295,7 @@ class concatenated_sequences * * ### Exceptions * - * Basic exception guarantee, i.e. guaranteed not to leak. However, the container may contain invalid data after + * Basic exception guarantee, i.e. guaranteed not to leak. However, the container may contain invalid data after * an exception is thrown. * * \experimentalapi{Experimental since version 3.1.} @@ -1313,7 +1313,7 @@ class concatenated_sequences * This conceptionally performs an `insert()` on the `back()` of this container, * i.e. the last inner container grows by value.size(). * - * If the new concat_size() is greater than concat_capacity(), all iterators and references (including the + * If the new concat_size() is greater than concat_capacity(), all iterators and references (including the * past-the-end iterator) are invalidated. Otherwise, only the past-the-end iterator is invalidated. * * ### Complexity @@ -1322,7 +1322,7 @@ class concatenated_sequences * * ### Exceptions * - * Basic exception guarantee, i.e. guaranteed not to leak. However, the container may contain invalid data after + * Basic exception guarantee, i.e. guaranteed not to leak. However, the container may contain invalid data after * an exception is thrown. * * \experimentalapi{Experimental since version 3.1.} diff --git a/include/seqan3/contrib/parallel/suspendable_queue.hpp b/include/seqan3/contrib/parallel/suspendable_queue.hpp index ba38c2efd6..1d539448e3 100644 --- a/include/seqan3/contrib/parallel/suspendable_queue.hpp +++ b/include/seqan3/contrib/parallel/suspendable_queue.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/contrib/span/span b/include/seqan3/contrib/span/span index cfd720f4a5..a2331d19b2 100644 --- a/include/seqan3/contrib/span/span +++ b/include/seqan3/contrib/span/span @@ -13,7 +13,7 @@ #include // for array #include // for ptrdiff_t -#include // for iterator concepts +#include // for iterator concepts #include // for range concepts #include // for remove_cvref_t, etc diff --git a/include/seqan3/core/detail/iterator_traits.hpp b/include/seqan3/core/detail/iterator_traits.hpp index 53bfe98287..a18522d5ca 100644 --- a/include/seqan3/core/detail/iterator_traits.hpp +++ b/include/seqan3/core/detail/iterator_traits.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/core/range/detail/inherited_iterator_base.hpp b/include/seqan3/core/range/detail/inherited_iterator_base.hpp index d568e6ed6a..ff04233465 100644 --- a/include/seqan3/core/range/detail/inherited_iterator_base.hpp +++ b/include/seqan3/core/range/detail/inherited_iterator_base.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/core/range/detail/random_access_iterator.hpp b/include/seqan3/core/range/detail/random_access_iterator.hpp index 5f2981ac50..f41fe47b92 100644 --- a/include/seqan3/core/range/detail/random_access_iterator.hpp +++ b/include/seqan3/core/range/detail/random_access_iterator.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/core/range/type_traits.hpp b/include/seqan3/core/range/type_traits.hpp index e038bf76a1..2ed60a5fca 100644 --- a/include/seqan3/core/range/type_traits.hpp +++ b/include/seqan3/core/range/type_traits.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/io/detail/misc.hpp b/include/seqan3/io/detail/misc.hpp index da726dbc4b..73fa413e53 100644 --- a/include/seqan3/io/detail/misc.hpp +++ b/include/seqan3/io/detail/misc.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/io/stream/detail/fast_istreambuf_iterator.hpp b/include/seqan3/io/stream/detail/fast_istreambuf_iterator.hpp index 45740bbca9..bc5f4b6018 100644 --- a/include/seqan3/io/stream/detail/fast_istreambuf_iterator.hpp +++ b/include/seqan3/io/stream/detail/fast_istreambuf_iterator.hpp @@ -14,7 +14,7 @@ #pragma once #include -#include +#include #include diff --git a/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp b/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp index af719fbb25..d42ce0c324 100644 --- a/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp +++ b/include/seqan3/io/stream/detail/fast_ostreambuf_iterator.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/io/views/async_input_buffer.hpp b/include/seqan3/io/views/async_input_buffer.hpp index 951fc5f432..f80103092a 100644 --- a/include/seqan3/io/views/async_input_buffer.hpp +++ b/include/seqan3/io/views/async_input_buffer.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/io/views/detail/istreambuf_view.hpp b/include/seqan3/io/views/detail/istreambuf_view.hpp index 271d4b4fd2..6e1ad30df0 100644 --- a/include/seqan3/io/views/detail/istreambuf_view.hpp +++ b/include/seqan3/io/views/detail/istreambuf_view.hpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include diff --git a/include/seqan3/io/views/detail/take_exactly_view.hpp b/include/seqan3/io/views/detail/take_exactly_view.hpp index 46994a190e..f7ad08d408 100644 --- a/include/seqan3/io/views/detail/take_exactly_view.hpp +++ b/include/seqan3/io/views/detail/take_exactly_view.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/seqan3/io/views/detail/take_until_view.hpp b/include/seqan3/io/views/detail/take_until_view.hpp index 5fb0289bbd..1cfc765b3b 100644 --- a/include/seqan3/io/views/detail/take_until_view.hpp +++ b/include/seqan3/io/views/detail/take_until_view.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/container/concept.hpp b/include/seqan3/utility/container/concept.hpp index 4e2a2c9dd3..72bf3eda15 100644 --- a/include/seqan3/utility/container/concept.hpp +++ b/include/seqan3/utility/container/concept.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/simd/views/to_simd.hpp b/include/seqan3/utility/simd/views/to_simd.hpp index ac2a5be408..c1e51846e0 100644 --- a/include/seqan3/utility/simd/views/to_simd.hpp +++ b/include/seqan3/utility/simd/views/to_simd.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/utility/views/enforce_random_access.hpp b/include/seqan3/utility/views/enforce_random_access.hpp index 63c49d79da..aa558a28d0 100644 --- a/include/seqan3/utility/views/enforce_random_access.hpp +++ b/include/seqan3/utility/views/enforce_random_access.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/views/single_pass_input.hpp b/include/seqan3/utility/views/single_pass_input.hpp index e134d681bd..2a5e64cd38 100644 --- a/include/seqan3/utility/views/single_pass_input.hpp +++ b/include/seqan3/utility/views/single_pass_input.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/utility/views/slice.hpp b/include/seqan3/utility/views/slice.hpp index 63251048f4..b82af26520 100644 --- a/include/seqan3/utility/views/slice.hpp +++ b/include/seqan3/utility/views/slice.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/test/include/seqan3/test/pretty_printing.hpp b/test/include/seqan3/test/pretty_printing.hpp index 449f9acf21..6782f86727 100644 --- a/test/include/seqan3/test/pretty_printing.hpp +++ b/test/include/seqan3/test/pretty_printing.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include diff --git a/test/snippet/io/sequence_file/sequence_file_output_view_pipeline.cpp b/test/snippet/io/sequence_file/sequence_file_output_view_pipeline.cpp index d27c6edb1b..9d8bc2e1b6 100644 --- a/test/snippet/io/sequence_file/sequence_file_output_view_pipeline.cpp +++ b/test/snippet/io/sequence_file/sequence_file_output_view_pipeline.cpp @@ -2,7 +2,7 @@ #if !SEQAN3_WORKAROUND_GCC_96070 //![snippet] -#include +#include #include #include diff --git a/test/unit/alignment/aligned_sequence_test_template.hpp b/test/unit/alignment/aligned_sequence_test_template.hpp index dd7310d85e..10eaf01b19 100644 --- a/test/unit/alignment/aligned_sequence_test_template.hpp +++ b/test/unit/alignment/aligned_sequence_test_template.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alignment/matrix/detail/trace_iterator_banded_test.cpp b/test/unit/alignment/matrix/detail/trace_iterator_banded_test.cpp index b11735f027..cd89e023dd 100644 --- a/test/unit/alignment/matrix/detail/trace_iterator_banded_test.cpp +++ b/test/unit/alignment/matrix/detail/trace_iterator_banded_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/alignment/matrix/detail/trace_iterator_test.cpp b/test/unit/alignment/matrix/detail/trace_iterator_test.cpp index 8c83019add..367382a93e 100644 --- a/test/unit/alignment/matrix/detail/trace_iterator_test.cpp +++ b/test/unit/alignment/matrix/detail/trace_iterator_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/core/algorithm/detail/execution_handler_template.hpp b/test/unit/core/algorithm/detail/execution_handler_template.hpp index 50cd54f8f3..7e638ae4d5 100644 --- a/test/unit/core/algorithm/detail/execution_handler_template.hpp +++ b/test/unit/core/algorithm/detail/execution_handler_template.hpp @@ -6,7 +6,7 @@ // ----------------------------------------------------------------------------------------------------- #include -#include +#include #include #include #include diff --git a/test/unit/core/detail/iterator_traits_test.cpp b/test/unit/core/detail/iterator_traits_test.cpp index 6a7e5a31c7..d61c0abf71 100644 --- a/test/unit/core/detail/iterator_traits_test.cpp +++ b/test/unit/core/detail/iterator_traits_test.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/unit/io/detail/ignore_output_iterator_test.cpp b/test/unit/io/detail/ignore_output_iterator_test.cpp index 224f97e41a..9557406671 100644 --- a/test/unit/io/detail/ignore_output_iterator_test.cpp +++ b/test/unit/io/detail/ignore_output_iterator_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include diff --git a/test/unit/io/detail/in_file_iterator_test.cpp b/test/unit/io/detail/in_file_iterator_test.cpp index 9b9b7ec5ca..9d07f6421c 100644 --- a/test/unit/io/detail/in_file_iterator_test.cpp +++ b/test/unit/io/detail/in_file_iterator_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/io/detail/out_file_iterator_test.cpp b/test/unit/io/detail/out_file_iterator_test.cpp index e83718335a..4cb8ddba7d 100644 --- a/test/unit/io/detail/out_file_iterator_test.cpp +++ b/test/unit/io/detail/out_file_iterator_test.cpp @@ -9,7 +9,7 @@ #include -#include +#include #include diff --git a/test/unit/io/sam_file/sam_file_input_test.cpp b/test/unit/io/sam_file/sam_file_input_test.cpp index d56e0b37da..5d3806699c 100644 --- a/test/unit/io/sam_file/sam_file_input_test.cpp +++ b/test/unit/io/sam_file/sam_file_input_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/io/sam_file/sam_file_output_test.cpp b/test/unit/io/sam_file/sam_file_output_test.cpp index ec18bbb09d..36c3fb0414 100644 --- a/test/unit/io/sam_file/sam_file_output_test.cpp +++ b/test/unit/io/sam_file/sam_file_output_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/io/sequence_file/sequence_file_input_test.cpp b/test/unit/io/sequence_file/sequence_file_input_test.cpp index 3d6fa64da7..1001e72afb 100644 --- a/test/unit/io/sequence_file/sequence_file_input_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_input_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/io/sequence_file/sequence_file_integration_test.cpp b/test/unit/io/sequence_file/sequence_file_integration_test.cpp index 849fd9e764..45e616fa4b 100644 --- a/test/unit/io/sequence_file/sequence_file_integration_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_integration_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include diff --git a/test/unit/io/sequence_file/sequence_file_output_test.cpp b/test/unit/io/sequence_file/sequence_file_output_test.cpp index ed9aa03473..1585a8e0a8 100644 --- a/test/unit/io/sequence_file/sequence_file_output_test.cpp +++ b/test/unit/io/sequence_file/sequence_file_output_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include diff --git a/test/unit/io/stream/detail/fast_istreambuf_iterator_test.cpp b/test/unit/io/stream/detail/fast_istreambuf_iterator_test.cpp index 26f02178ab..5fed76f02b 100644 --- a/test/unit/io/stream/detail/fast_istreambuf_iterator_test.cpp +++ b/test/unit/io/stream/detail/fast_istreambuf_iterator_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include diff --git a/test/unit/io/stream/detail/fast_ostreambuf_iterator_test.cpp b/test/unit/io/stream/detail/fast_ostreambuf_iterator_test.cpp index 87fc2b7d46..143bcf3f77 100644 --- a/test/unit/io/stream/detail/fast_ostreambuf_iterator_test.cpp +++ b/test/unit/io/stream/detail/fast_ostreambuf_iterator_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/io/structure_file/format_vienna_test.cpp b/test/unit/io/structure_file/format_vienna_test.cpp index d2a59c0089..d4534e69ca 100644 --- a/test/unit/io/structure_file/format_vienna_test.cpp +++ b/test/unit/io/structure_file/format_vienna_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/unit/io/structure_file/structure_file_input_test.cpp b/test/unit/io/structure_file/structure_file_input_test.cpp index f6e783d194..81b2d9c6ee 100644 --- a/test/unit/io/structure_file/structure_file_input_test.cpp +++ b/test/unit/io/structure_file/structure_file_input_test.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/io/structure_file/structure_file_output_test.cpp b/test/unit/io/structure_file/structure_file_output_test.cpp index 4ee8adf466..80fa7e6f8b 100644 --- a/test/unit/io/structure_file/structure_file_output_test.cpp +++ b/test/unit/io/structure_file/structure_file_output_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include #include diff --git a/test/unit/range/iterator_test_template.hpp b/test/unit/range/iterator_test_template.hpp index 1a420b302e..25c1819fcd 100644 --- a/test/unit/range/iterator_test_template.hpp +++ b/test/unit/range/iterator_test_template.hpp @@ -9,7 +9,7 @@ #include -#include +#include #include #include diff --git a/test/unit/range/range_test_template.hpp b/test/unit/range/range_test_template.hpp index db32663f3b..cca2b15996 100644 --- a/test/unit/range/range_test_template.hpp +++ b/test/unit/range/range_test_template.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/search/helper.hpp b/test/unit/search/helper.hpp index 77fdaab286..8ad874790c 100644 --- a/test/unit/search/helper.hpp +++ b/test/unit/search/helper.hpp @@ -8,7 +8,7 @@ #pragma once #include -#include +#include #include #include diff --git a/test/unit/std/algorithm_test.cpp b/test/unit/std/algorithm_test.cpp index e6e1c53b2d..611acd790d 100644 --- a/test/unit/std/algorithm_test.cpp +++ b/test/unit/std/algorithm_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/std/concept/auxiliary_iterator.hpp b/test/unit/std/concept/auxiliary_iterator.hpp index e311d65648..af543307dd 100644 --- a/test/unit/std/concept/auxiliary_iterator.hpp +++ b/test/unit/std/concept/auxiliary_iterator.hpp @@ -8,7 +8,7 @@ #pragma once #include -#include +#include #include #include diff --git a/test/unit/utility/detail/exposition_only_concept_test.cpp b/test/unit/utility/detail/exposition_only_concept_test.cpp index c46318e881..edf9a38a53 100644 --- a/test/unit/utility/detail/exposition_only_concept_test.cpp +++ b/test/unit/utility/detail/exposition_only_concept_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include diff --git a/test/unit/utility/simd/views/to_simd_test.cpp b/test/unit/utility/simd/views/to_simd_test.cpp index d5b14f7e6b..e85696841e 100644 --- a/test/unit/utility/simd/views/to_simd_test.cpp +++ b/test/unit/utility/simd/views/to_simd_test.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include From 2bbdd9263391cac59940e14d76520be07c3ddd0b Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:46:12 +0100 Subject: [PATCH 17/22] [MISC] deprecate std/memory --- test/unit/range/iterator_test_template.hpp | 2 +- test/unit/std/CMakeLists.txt | 1 - test/unit/std/memory_test.cpp | 101 --------------------- 3 files changed, 1 insertion(+), 103 deletions(-) delete mode 100644 test/unit/std/memory_test.cpp diff --git a/test/unit/range/iterator_test_template.hpp b/test/unit/range/iterator_test_template.hpp index 25c1819fcd..4dc9676208 100644 --- a/test/unit/range/iterator_test_template.hpp +++ b/test/unit/range/iterator_test_template.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/std/CMakeLists.txt b/test/unit/std/CMakeLists.txt index 0bbafbab2e..731f5f7471 100644 --- a/test/unit/std/CMakeLists.txt +++ b/test/unit/std/CMakeLists.txt @@ -4,6 +4,5 @@ seqan3_test (algorithm_test.cpp) seqan3_test (bit_test.cpp) seqan3_test (charconv_int_test.cpp) seqan3_test (charconv_float_test.cpp) -seqan3_test (memory_test.cpp) seqan3_test (ranges_test.cpp) seqan3_test (std_type_traits_test.cpp) diff --git a/test/unit/std/memory_test.cpp b/test/unit/std/memory_test.cpp deleted file mode 100644 index 97e58d7123..0000000000 --- a/test/unit/std/memory_test.cpp +++ /dev/null @@ -1,101 +0,0 @@ -// ----------------------------------------------------------------------------------------------------- -// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin -// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik -// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License -// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md -// ----------------------------------------------------------------------------------------------------- - -#include - -#include - -#include - -TEST(to_address, pointer) -{ - int value{}; - int * value_ptr = &value; - - EXPECT_EQ(value_ptr, std::to_address(value_ptr)); -} - -TEST(to_address, pointer_traits) -{ - std::shared_ptr value_ptr = std::make_shared(5); - - EXPECT_SAME_TYPE(std::pointer_traits>::pointer, - std::shared_ptr); - - EXPECT_SAME_TYPE(std::pointer_traits>::element_type, - int); - - EXPECT_EQ(*value_ptr, 5); - EXPECT_EQ(value_ptr.get(), std::to_address(value_ptr)); -} - -struct fancy_ptr_t -{ - using element_type = int; // needed to enable std::pointer_traits - - int * operator->() - { - return &value; - } - - int const * operator->() const - { - return &value; - } - - int value{5}; -}; - -TEST(to_address, pointer_traits_and_member_arrow_operator) -{ - fancy_ptr_t fancy_ptr{}; - int * value_ptr = &fancy_ptr.value; - - EXPECT_SAME_TYPE(std::pointer_traits::pointer, - fancy_ptr_t); - - EXPECT_SAME_TYPE(std::pointer_traits::element_type, - int); - - EXPECT_EQ(value_ptr, std::to_address(fancy_ptr)); -} - -struct fancy_ptr2_t -{ - int * value_ptr; -}; - -namespace std -{ -template <> -struct pointer_traits -{ - using pointer = fancy_ptr2_t; - using element_type = int; - using difference_type = std::ptrdiff_t; - - static element_type * to_address(pointer p) noexcept - { - return p.value_ptr; - } -}; -} // namespace std - -TEST(to_address, pointer_traits_to_address) -{ - int value{5}; - fancy_ptr2_t fancy_ptr{&value}; - - EXPECT_SAME_TYPE(std::pointer_traits::pointer, - fancy_ptr2_t); - - EXPECT_SAME_TYPE(std::pointer_traits::element_type, - int); - - EXPECT_EQ(fancy_ptr.value_ptr, std::pointer_traits::to_address(fancy_ptr)); - EXPECT_EQ(fancy_ptr.value_ptr, std::to_address(fancy_ptr)); -} From cf0ddb8bd5b70a60747402d2068810f44a0d0226 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:46:49 +0100 Subject: [PATCH 18/22] [MISC] deprecate std/type_traits --- .../align_config_result_type.hpp | 2 +- include/seqan3/alphabet/alphabet_base.hpp | 2 +- include/seqan3/alphabet/concept.hpp | 2 +- include/seqan3/alphabet/structure/concept.hpp | 2 +- include/seqan3/argument_parser/auxiliary.hpp | 2 +- .../seqan3/argument_parser/detail/concept.hpp | 2 +- include/seqan3/contrib/span/span | 2 +- include/seqan3/core/debug_stream/byte.hpp | 2 +- .../detail/is_class_template_declarable.hpp | 2 +- .../detail/transfer_type_modifier_onto.hpp | 2 +- include/seqan3/io/detail/magic_header.hpp | 2 +- .../io/views/detail/take_exactly_view.hpp | 2 +- .../io/views/detail/take_until_view.hpp | 2 +- .../search/configuration/result_type.hpp | 2 +- include/seqan3/std/type_traits | 6 --- .../type_list/detail/type_list_algorithm.hpp | 2 +- include/seqan3/utility/type_list/traits.hpp | 2 +- .../type_pack/detail/type_pack_algorithm.hpp | 2 +- include/seqan3/utility/type_pack/traits.hpp | 2 +- include/seqan3/utility/type_traits/basic.hpp | 2 +- .../detail/transformation_trait_or.hpp | 2 +- .../utility/type_traits/lazy_conditional.hpp | 2 +- .../utility/views/enforce_random_access.hpp | 2 +- .../utility/views/single_pass_input.hpp | 2 +- include/seqan3/utility/views/slice.hpp | 2 +- test/include/seqan3/test/expect_same_type.hpp | 2 +- test/unit/alphabet/custom_alphabet2_test.cpp | 2 +- test/unit/std/CMakeLists.txt | 1 - test/unit/std/std_type_traits_test.cpp | 40 ------------------- .../utility/simd/detail/builtin_simd_test.cpp | 2 +- 30 files changed, 27 insertions(+), 74 deletions(-) delete mode 100644 test/unit/std/std_type_traits_test.cpp diff --git a/include/seqan3/alignment/configuration/align_config_result_type.hpp b/include/seqan3/alignment/configuration/align_config_result_type.hpp index e0c0c9653d..9e2726203f 100644 --- a/include/seqan3/alignment/configuration/align_config_result_type.hpp +++ b/include/seqan3/alignment/configuration/align_config_result_type.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alphabet/alphabet_base.hpp b/include/seqan3/alphabet/alphabet_base.hpp index 4a11f3740a..e71c190633 100644 --- a/include/seqan3/alphabet/alphabet_base.hpp +++ b/include/seqan3/alphabet/alphabet_base.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/alphabet/concept.hpp b/include/seqan3/alphabet/concept.hpp index 631ce1031c..9caf796ebe 100644 --- a/include/seqan3/alphabet/concept.hpp +++ b/include/seqan3/alphabet/concept.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/alphabet/structure/concept.hpp b/include/seqan3/alphabet/structure/concept.hpp index 8e65b80ade..aa99c5fd55 100644 --- a/include/seqan3/alphabet/structure/concept.hpp +++ b/include/seqan3/alphabet/structure/concept.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include // ============================================================================ // is_pair_open() diff --git a/include/seqan3/argument_parser/auxiliary.hpp b/include/seqan3/argument_parser/auxiliary.hpp index a0192c6544..9d73d425c0 100644 --- a/include/seqan3/argument_parser/auxiliary.hpp +++ b/include/seqan3/argument_parser/auxiliary.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/argument_parser/detail/concept.hpp b/include/seqan3/argument_parser/detail/concept.hpp index f959c27d18..83bea40b5a 100644 --- a/include/seqan3/argument_parser/detail/concept.hpp +++ b/include/seqan3/argument_parser/detail/concept.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include diff --git a/include/seqan3/contrib/span/span b/include/seqan3/contrib/span/span index a2331d19b2..fc6bf1f88b 100644 --- a/include/seqan3/contrib/span/span +++ b/include/seqan3/contrib/span/span @@ -15,7 +15,7 @@ #include // for ptrdiff_t #include // for iterator concepts #include // for range concepts -#include // for remove_cvref_t, etc +#include // for remove_cvref_t, etc namespace std { diff --git a/include/seqan3/core/debug_stream/byte.hpp b/include/seqan3/core/debug_stream/byte.hpp index 41908f9d49..b0ed3bd7d8 100644 --- a/include/seqan3/core/debug_stream/byte.hpp +++ b/include/seqan3/core/debug_stream/byte.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include diff --git a/include/seqan3/core/detail/is_class_template_declarable.hpp b/include/seqan3/core/detail/is_class_template_declarable.hpp index e69444f5aa..9e464c2783 100644 --- a/include/seqan3/core/detail/is_class_template_declarable.hpp +++ b/include/seqan3/core/detail/is_class_template_declarable.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include diff --git a/include/seqan3/core/detail/transfer_type_modifier_onto.hpp b/include/seqan3/core/detail/transfer_type_modifier_onto.hpp index 2590412635..bb8fe47d05 100644 --- a/include/seqan3/core/detail/transfer_type_modifier_onto.hpp +++ b/include/seqan3/core/detail/transfer_type_modifier_onto.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include diff --git a/include/seqan3/io/detail/magic_header.hpp b/include/seqan3/io/detail/magic_header.hpp index c8f291ca60..dfc7464b83 100644 --- a/include/seqan3/io/detail/magic_header.hpp +++ b/include/seqan3/io/detail/magic_header.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/io/views/detail/take_exactly_view.hpp b/include/seqan3/io/views/detail/take_exactly_view.hpp index f7ad08d408..f00571a171 100644 --- a/include/seqan3/io/views/detail/take_exactly_view.hpp +++ b/include/seqan3/io/views/detail/take_exactly_view.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/io/views/detail/take_until_view.hpp b/include/seqan3/io/views/detail/take_until_view.hpp index 1cfc765b3b..620b2f6e0a 100644 --- a/include/seqan3/io/views/detail/take_until_view.hpp +++ b/include/seqan3/io/views/detail/take_until_view.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/search/configuration/result_type.hpp b/include/seqan3/search/configuration/result_type.hpp index 10ac5a7164..e186beece9 100644 --- a/include/seqan3/search/configuration/result_type.hpp +++ b/include/seqan3/search/configuration/result_type.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/std/type_traits b/include/seqan3/std/type_traits index 6d360bf082..dbf110ea19 100644 --- a/include/seqan3/std/type_traits +++ b/include/seqan3/std/type_traits @@ -12,12 +12,6 @@ * \author Hannes Hauswedell */ -/*!\defgroup std_type_traits type_traits - * \ingroup std - * \brief The [\ header](https://en.cppreference.com/w/cpp/header/type_traits) from C++20's standard - * library. - */ - #pragma once #include diff --git a/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp b/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp index 495a65aabd..e38f00b55f 100644 --- a/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp +++ b/include/seqan3/utility/type_list/detail/type_list_algorithm.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/utility/type_list/traits.hpp b/include/seqan3/utility/type_list/traits.hpp index 5931bb26a8..45eb3caf59 100644 --- a/include/seqan3/utility/type_list/traits.hpp +++ b/include/seqan3/utility/type_list/traits.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp b/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp index fa5881bda1..e071e38091 100644 --- a/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp +++ b/include/seqan3/utility/type_pack/detail/type_pack_algorithm.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/utility/type_pack/traits.hpp b/include/seqan3/utility/type_pack/traits.hpp index 2a41a14926..4478a69e21 100644 --- a/include/seqan3/utility/type_pack/traits.hpp +++ b/include/seqan3/utility/type_pack/traits.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/type_traits/basic.hpp b/include/seqan3/utility/type_traits/basic.hpp index 76b0958564..851f675590 100644 --- a/include/seqan3/utility/type_traits/basic.hpp +++ b/include/seqan3/utility/type_traits/basic.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include diff --git a/include/seqan3/utility/type_traits/detail/transformation_trait_or.hpp b/include/seqan3/utility/type_traits/detail/transformation_trait_or.hpp index 64f0085ad8..e45aafb44d 100644 --- a/include/seqan3/utility/type_traits/detail/transformation_trait_or.hpp +++ b/include/seqan3/utility/type_traits/detail/transformation_trait_or.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include diff --git a/include/seqan3/utility/type_traits/lazy_conditional.hpp b/include/seqan3/utility/type_traits/lazy_conditional.hpp index be6d959ca3..47aab7ae0f 100644 --- a/include/seqan3/utility/type_traits/lazy_conditional.hpp +++ b/include/seqan3/utility/type_traits/lazy_conditional.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include diff --git a/include/seqan3/utility/views/enforce_random_access.hpp b/include/seqan3/utility/views/enforce_random_access.hpp index aa558a28d0..376491246f 100644 --- a/include/seqan3/utility/views/enforce_random_access.hpp +++ b/include/seqan3/utility/views/enforce_random_access.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/views/single_pass_input.hpp b/include/seqan3/utility/views/single_pass_input.hpp index 2a5e64cd38..5ae4832508 100644 --- a/include/seqan3/utility/views/single_pass_input.hpp +++ b/include/seqan3/utility/views/single_pass_input.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/views/slice.hpp b/include/seqan3/utility/views/slice.hpp index b82af26520..df9039c5bc 100644 --- a/include/seqan3/utility/views/slice.hpp +++ b/include/seqan3/utility/views/slice.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/include/seqan3/test/expect_same_type.hpp b/test/include/seqan3/test/expect_same_type.hpp index e7ce7e9bb0..a873d71f09 100644 --- a/test/include/seqan3/test/expect_same_type.hpp +++ b/test/include/seqan3/test/expect_same_type.hpp @@ -14,7 +14,7 @@ #include -#include +#include #include diff --git a/test/unit/alphabet/custom_alphabet2_test.cpp b/test/unit/alphabet/custom_alphabet2_test.cpp index 8fd2680c5c..fc7f4553b0 100644 --- a/test/unit/alphabet/custom_alphabet2_test.cpp +++ b/test/unit/alphabet/custom_alphabet2_test.cpp @@ -12,7 +12,7 @@ //![my_alph] #include // for size_t #include // for seqan3::alphabet -#include // for std::type_identity +#include // for std::type_identity namespace my_namespace { diff --git a/test/unit/std/CMakeLists.txt b/test/unit/std/CMakeLists.txt index 731f5f7471..ebab558e6a 100644 --- a/test/unit/std/CMakeLists.txt +++ b/test/unit/std/CMakeLists.txt @@ -5,4 +5,3 @@ seqan3_test (bit_test.cpp) seqan3_test (charconv_int_test.cpp) seqan3_test (charconv_float_test.cpp) seqan3_test (ranges_test.cpp) -seqan3_test (std_type_traits_test.cpp) diff --git a/test/unit/std/std_type_traits_test.cpp b/test/unit/std/std_type_traits_test.cpp deleted file mode 100644 index 2a3968f3c1..0000000000 --- a/test/unit/std/std_type_traits_test.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// ----------------------------------------------------------------------------------------------------- -// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin -// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik -// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License -// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md -// ----------------------------------------------------------------------------------------------------- - -#include - -#include - -#include - -template -concept has_type = requires() -{ - typename t::type; -}; - -TEST(common_reference, zero_template_arguments) -{ - using common_reference = std::common_reference<>; - EXPECT_FALSE(has_type); -} - -TEST(common_reference, one_template_argument) -{ - EXPECT_SAME_TYPE(std::common_reference::type, - int); - EXPECT_SAME_TYPE(std::common_reference_t, - int); -} - -TEST(common_reference, two_template_argument_both_lvalue_reference_type) -{ - EXPECT_SAME_TYPE((std::common_reference::type), - long); - EXPECT_SAME_TYPE((std::common_reference_t), - long); -} diff --git a/test/unit/utility/simd/detail/builtin_simd_test.cpp b/test/unit/utility/simd/detail/builtin_simd_test.cpp index 0ad1cc06ac..205f579866 100644 --- a/test/unit/utility/simd/detail/builtin_simd_test.cpp +++ b/test/unit/utility/simd/detail/builtin_simd_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include From 93a478ff96d964009a2258b75552c3c5e4857180 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 21:49:36 +0100 Subject: [PATCH 19/22] [MISC] deprecate std/span --- .../read_mapper/read_mapper_step3.cpp | 2 +- .../read_mapper/read_mapper_step4.cpp | 2 +- doc/tutorial/search/search_solution3.cpp | 2 +- doc/tutorial/search/search_solution5.cpp | 2 +- doc/tutorial/search/search_span.cpp | 2 +- ...ignment_matrix_column_major_range_base.hpp | 2 +- .../alignment_score_matrix_one_column.hpp | 2 +- ...ignment_score_matrix_one_column_banded.hpp | 2 +- .../matrix/detail/trace_matrix_full.hpp | 2 +- .../seqan3/contrib/parallel/buffer_queue.hpp | 2 +- .../contrib/parallel/suspendable_queue.hpp | 2 +- include/seqan3/contrib/span/span | 434 ------------------ .../contrib/stream/bgzf_stream_util.hpp | 2 +- include/seqan3/io/detail/magic_header.hpp | 2 +- include/seqan3/io/detail/misc_input.hpp | 2 +- .../io/views/detail/take_exactly_view.hpp | 2 +- include/seqan3/std/span | 24 +- include/seqan3/utility/views/slice.hpp | 2 +- include/seqan3/utility/views/type_reduce.hpp | 2 +- ...ignment_matrix_column_major_range_base.cpp | 2 +- .../io/views/detail/take_until_view_test.cpp | 2 +- test/unit/std/ranges_test.cpp | 2 +- test/unit/test/expect_range_eq_test.cpp | 2 +- 23 files changed, 24 insertions(+), 476 deletions(-) delete mode 100644 include/seqan3/contrib/span/span diff --git a/doc/tutorial/read_mapper/read_mapper_step3.cpp b/doc/tutorial/read_mapper/read_mapper_step3.cpp index 5bad807940..9cc109507f 100644 --- a/doc/tutorial/read_mapper/read_mapper_step3.cpp +++ b/doc/tutorial/read_mapper/read_mapper_step3.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include struct reference_storage_t { diff --git a/doc/tutorial/read_mapper/read_mapper_step4.cpp b/doc/tutorial/read_mapper/read_mapper_step4.cpp index 0d24192274..5258601a5a 100644 --- a/doc/tutorial/read_mapper/read_mapper_step4.cpp +++ b/doc/tutorial/read_mapper/read_mapper_step4.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include struct reference_storage_t { diff --git a/doc/tutorial/search/search_solution3.cpp b/doc/tutorial/search/search_solution3.cpp index 715ac3bd36..1f526eaf09 100644 --- a/doc/tutorial/search/search_solution3.cpp +++ b/doc/tutorial/search/search_solution3.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include int main() { diff --git a/doc/tutorial/search/search_solution5.cpp b/doc/tutorial/search/search_solution5.cpp index fcb1ebbc60..a2dc0dc3ef 100644 --- a/doc/tutorial/search/search_solution5.cpp +++ b/doc/tutorial/search/search_solution5.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include using namespace seqan3::literals; diff --git a/doc/tutorial/search/search_span.cpp b/doc/tutorial/search/search_span.cpp index 40a2264a3e..aff80d1979 100644 --- a/doc/tutorial/search/search_span.cpp +++ b/doc/tutorial/search/search_span.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main() { diff --git a/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp b/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp index eeea24e7f5..2357b2bf5a 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp index 058c1d2fe4..cfbd077bd5 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp index 0cfdfaf0ad..69d090e182 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_banded.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace seqan3::detail { diff --git a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp index f1052f5cd5..378a2530b4 100644 --- a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp +++ b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/include/seqan3/contrib/parallel/buffer_queue.hpp b/include/seqan3/contrib/parallel/buffer_queue.hpp index 08e012dfcc..3edb67c8f3 100644 --- a/include/seqan3/contrib/parallel/buffer_queue.hpp +++ b/include/seqan3/contrib/parallel/buffer_queue.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/contrib/parallel/suspendable_queue.hpp b/include/seqan3/contrib/parallel/suspendable_queue.hpp index 1d539448e3..7ffc5b92a7 100644 --- a/include/seqan3/contrib/parallel/suspendable_queue.hpp +++ b/include/seqan3/contrib/parallel/suspendable_queue.hpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include namespace seqan3::contrib { diff --git a/include/seqan3/contrib/span/span b/include/seqan3/contrib/span/span deleted file mode 100644 index fc6bf1f88b..0000000000 --- a/include/seqan3/contrib/span/span +++ /dev/null @@ -1,434 +0,0 @@ -// -*- C++ -*- -//!\cond -//===------------------------------ span ---------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===---------------------------------------------------------------------===// - -#pragma once - -#include // for array -#include // for ptrdiff_t -#include // for iterator concepts -#include // for range concepts -#include // for remove_cvref_t, etc - -namespace std -{ -inline constexpr size_t dynamic_extent = -1; -template class span; - -template -struct is_span_impl : public false_type {}; - -template -struct is_span_impl> : public true_type {}; - -template -struct is_span : public is_span_impl> {}; - -template -struct is_std_array_impl : public false_type {}; - -template -struct is_std_array_impl> : public true_type {}; - -template -struct is_std_array : public is_std_array_impl> {}; - -} // namespace std - -namespace std -{ -template -class span { -public: -// constants and types - using element_type = span_tp; - using value_type = remove_cv_t; - using index_type = size_t; - using difference_type = ptrdiff_t; - using pointer = span_tp *; - using const_pointer = const span_tp *; // not in standard - using reference = span_tp &; - using const_reference = const span_tp &; // not in standard - using iterator = value_type *; - using const_iterator = value_type const *; - using reverse_iterator = std::reverse_iterator; - using const_reverse_iterator = std::reverse_iterator; - - static constexpr index_type extent = span_extent; - static_assert(span_extent >= 0, "Can't have a span with an extent < 0"); - -// [span.cons], span constructors, copy, assignment, and destructor - constexpr span() noexcept : data_{nullptr} - { static_assert(span_extent == 0, "Can't default construct a statically sized span with size > 0"); } - - constexpr span (const span&) noexcept = default; - constexpr span& operator=(const span&) noexcept = default; - - template - requires is_convertible_v>(*)[], element_type(*)[]> - constexpr span(iterator_t f, index_type count) noexcept : data_{addressof(*f)} - { (void) count; assert(span_extent == count); } // "size mismatch in span's constructor (f, count)" - - template - requires sized_sentinel_for && - is_convertible_v>(*)[], element_type(*)[]> && - (!is_convertible_v) - constexpr span(iterator_t f, sentinel_t l) noexcept : data_{addressof(*f)} - { (void) l; assert(span_extent == distance(f, l)); } // "size mismatch in span's constructor (first, last)" - - constexpr span(element_type (&arr)[span_extent]) noexcept : data_{arr} {} - constexpr span(array& arr) noexcept : data_{arr.data()} {} - constexpr span(const array& arr) noexcept : data_{arr.data()} {} - - template - inline constexpr span(const span& other, - enable_if_t< - is_convertible_v, - nullptr_t> = nullptr) - : data_{other.data()} {} - - template - inline constexpr span(const span& other, - enable_if_t< - is_convertible_v, - nullptr_t> = nullptr) noexcept - : data_{other.data()} { assert(span_extent == other.size()); } // "size mismatch in span's constructor (other span)" - -// ~span() noexcept = default; - - template - inline constexpr span first() const noexcept - { - static_assert(count >= 0, "Count must be >= 0 in span::first()"); - static_assert(count <= span_extent, "Count out of range in span::first()"); - return {data(), count}; - } - - template - inline constexpr span last() const noexcept - { - static_assert(count >= 0, "Count must be >= 0 in span::last()"); - static_assert(count <= span_extent, "Count out of range in span::last()"); - return {data() + size() - count, count}; - } - - constexpr span first(index_type count) const noexcept - { - assert(count >= 0 && count <= size()); // "Count out of range in span::first(count)" - return {data(), count}; - } - - constexpr span last(index_type count) const noexcept - { - assert(count >= 0 && count <= size()); // "Count out of range in span::last(count)" - return {data() + size() - count, count}; - } - - template - inline constexpr auto subspan() const noexcept - -> span - { - static_assert(offset >= 0 && offset <= size(), "Offset out of range in span::subspan()"); - return {data() + offset, count == dynamic_extent ? size() - offset : count}; - } - - inline constexpr span - subspan(index_type offset, index_type count = dynamic_extent) const noexcept - { - assert( offset >= 0 && offset <= size()); // "Offset out of range in span::subspan(offset, count)" - assert((count >= 0 && count <= size()) || count == dynamic_extent); // "Count out of range in span::subspan(offset, count)" - if (count == dynamic_extent) - return {data() + offset, size() - offset}; - assert(offset + count <= size()); // "count + offset out of range in span::subspan(offset, count)" - return {data() + offset, count}; - } - - constexpr index_type size() const noexcept { return span_extent; } - constexpr index_type size_bytes() const noexcept { return span_extent * sizeof(element_type); } - constexpr bool empty() const noexcept { return span_extent == 0; } - - constexpr reference front() const noexcept - { - return *begin(); - } - - constexpr reference back() const noexcept - { - return *(end() - 1); - } - - constexpr reference operator[](index_type idx) const noexcept - { - assert(idx >= 0 && idx < size()); // "span[] index out of bounds" - return data_[idx]; - } - - constexpr reference operator()(index_type idx) const noexcept - { - assert(idx >= 0 && idx < size()); // "span() index out of bounds" - return data_[idx]; - } - - constexpr pointer data() const noexcept { return data_; } - -// [span.iter], span iterator support - constexpr iterator begin() const noexcept { return iterator(data()); } - constexpr iterator end() const noexcept { return iterator(data() + size()); } - constexpr const_iterator cbegin() const noexcept { return const_iterator(data()); } - constexpr const_iterator cend() const noexcept { return const_iterator(data() + size()); } - constexpr reverse_iterator rbegin() const noexcept { return reverse_iterator(end()); } - constexpr reverse_iterator rend() const noexcept { return reverse_iterator(begin()); } - constexpr const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(cend()); } - constexpr const_reverse_iterator crend() const noexcept { return const_reverse_iterator(cbegin()); } - - constexpr void swap(span &other) noexcept - { - pointer p = data_; - data_ = other.data_; - other.data_ = p; - } - - span as_bytes() const noexcept - { return {reinterpret_cast(data()), size_bytes()}; } - - span as_writeable_bytes() const noexcept - { return {reinterpret_cast(data()), size_bytes()}; } - -private: - pointer data_; - -}; - -template -class span { -private: - -public: -// constants and types - using element_type = span_tp; - using value_type = remove_cv_t; - using index_type = size_t; - using difference_type = ptrdiff_t; - using pointer = span_tp *; - using const_pointer = const span_tp *; // not in standard - using reference = span_tp &; - using const_reference = const span_tp &; // not in standard - using iterator = value_type *; - using const_iterator = value_type const *; - using reverse_iterator = std::reverse_iterator; - using const_reverse_iterator = std::reverse_iterator; - - static constexpr index_type extent = dynamic_extent; - -// [span.cons], span constructors, copy, assignment, and destructor - constexpr span() noexcept : data_{nullptr}, size_{0} {} - - constexpr span (const span&) noexcept = default; - constexpr span& operator=(const span&) noexcept = default; - - template - requires is_convertible_v>(*)[], element_type(*)[]> - constexpr span(iterator_t f, index_type count) noexcept : data_{addressof(*f)}, size_{count} - {} - - template - requires sized_sentinel_for && - is_convertible_v>(*)[], element_type(*)[]> && - (!is_convertible_v) - constexpr span(iterator f, sentinel_t l) noexcept : data_{addressof(*f)}, size_{static_cast(distance(f, l))} - {} - - template - inline constexpr span(element_type (&arr)[span_sz]) noexcept : data_{arr}, size_{span_sz} {} - - template - inline constexpr span(array& arr) noexcept : data_{arr.data()}, size_{span_sz} {} - - template - inline constexpr span(const array& arr) noexcept : data_{arr.data()}, size_{span_sz} {} - - template - requires (!same_as, span>) && // guard for recursive instantiation in constructible_from - (!is_span>::value) && - (!is_std_array>::value) && - (!is_array_v>) && - is_convertible_v>(*)[], - element_type(*)[]> && - ranges::contiguous_range && - ranges::sized_range && - (ranges::borrowed_range || is_const_v) - constexpr span(range_t && rng) : data_{ranges::data(rng)}, size_{static_cast(ranges::size(rng))} - {} - - template - inline constexpr span(const span& other, - enable_if_t< - is_convertible_v, - nullptr_t> = nullptr) noexcept - : data_{other.data()}, size_{other.size()} {} - -// ~span() noexcept = default; - - template - inline constexpr span first() const noexcept - { - static_assert(count >= 0, "Count must be >= 0 in span::first()"); - assert(count <= size()); - return {data(), count}; - } - - template - inline constexpr span last() const noexcept - { - static_assert(count >= 0, "Count must be >= 0 in span::last()"); - assert(count <= size()); - return {data() + size() - count, count}; - } - - constexpr span first(index_type count) const noexcept - { - assert(count >= 0 && count <= size()); - return {data(), count}; - } - - constexpr span last (index_type count) const noexcept - { - assert(count >= 0 && count <= size()); - return {data() + size() - count, count}; - } - - template - inline constexpr span subspan() const noexcept - { - assert(offset >= 0 && offset <= size()); - assert(count == dynamic_extent || offset + count <= size()); - return {data() + offset, count == dynamic_extent ? size() - offset : count}; - } - - constexpr span - inline subspan(index_type offset, index_type count = dynamic_extent) const noexcept - { - assert(offset >= 0 && offset <= size()); - assert(count >= 0 && count <= size()); - if (count == dynamic_extent) - return {data() + offset, size() - offset}; - assert(offset + count <= size()); - return {data() + offset, count}; - } - - constexpr index_type size() const noexcept { return size_; } - constexpr index_type size_bytes() const noexcept { return size_ * sizeof(element_type); } - constexpr bool empty() const noexcept { return size_ == 0; } - - constexpr reference front() const noexcept - { - return *begin(); - } - - constexpr reference back() const noexcept - { - return *(end() - 1); - } - - constexpr reference operator[](index_type idx) const noexcept - { - assert(idx < size()); - return data_[idx]; - } - - constexpr reference operator()(index_type idx) const noexcept - { - assert(idx < size()); - return data_[idx]; - } - - constexpr pointer data() const noexcept { return data_; } - -// [span.iter], span iterator support - constexpr iterator begin() const noexcept { return iterator(data()); } - constexpr iterator end() const noexcept { return iterator(data() + size()); } - constexpr const_iterator cbegin() const noexcept { return const_iterator(data()); } - constexpr const_iterator cend() const noexcept { return const_iterator(data() + size()); } - constexpr reverse_iterator rbegin() const noexcept { return reverse_iterator(end()); } - constexpr reverse_iterator rend() const noexcept { return reverse_iterator(begin()); } - constexpr const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(cend()); } - constexpr const_reverse_iterator crend() const noexcept { return const_reverse_iterator(cbegin()); } - - constexpr void swap(span &other) noexcept - { - pointer p = data_; - data_ = other.data_; - other.data_ = p; - - index_type sz = size_; - size_ = other.size_; - other.size_ = sz; - } - - span as_bytes() const noexcept - { return {reinterpret_cast(data()), size_bytes()}; } - - span as_writeable_bytes() const noexcept - { return {reinterpret_cast(data()), size_bytes()}; } - -private: - pointer data_; - index_type size_; -}; - -template -constexpr auto begin(span s) noexcept -{ - return s.begin(); -} - -template -constexpr auto end(span s) noexcept -{ - return s.end(); -} - -// as_bytes & as_writeable_bytes -template - auto as_bytes(span s) noexcept - -> decltype(s.as_bytes()) - { return s.as_bytes(); } - -template - auto as_writeable_bytes(span s) noexcept - -> typename enable_if, decltype(s.as_writeable_bytes())>::type - { return s.as_writeable_bytes(); } - -template - constexpr void swap(span &lhs, span &rhs) noexcept - { lhs.swap(rhs); } - -// Deduction guides -template - span(iterator_t, size_t) -> span>>; - -template - requires sized_sentinel_for - span(iterator_t, sentinel_t) -> span>>; - -template - span(span_tp (&)[span_sz]) -> span; - -template - span(array&) -> span; - -template - span(const array&) -> span; - -template - span(range_t &&) -> span>>; -} // namespace std - -//!\endcond diff --git a/include/seqan3/contrib/stream/bgzf_stream_util.hpp b/include/seqan3/contrib/stream/bgzf_stream_util.hpp index 53841ecbdf..843c86e4ad 100644 --- a/include/seqan3/contrib/stream/bgzf_stream_util.hpp +++ b/include/seqan3/contrib/stream/bgzf_stream_util.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/io/detail/magic_header.hpp b/include/seqan3/io/detail/magic_header.hpp index dfc7464b83..c3eec31bc0 100644 --- a/include/seqan3/io/detail/magic_header.hpp +++ b/include/seqan3/io/detail/magic_header.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/include/seqan3/io/detail/misc_input.hpp b/include/seqan3/io/detail/misc_input.hpp index 793b41e9e4..c3a09cbcd2 100644 --- a/include/seqan3/io/detail/misc_input.hpp +++ b/include/seqan3/io/detail/misc_input.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/io/views/detail/take_exactly_view.hpp b/include/seqan3/io/views/detail/take_exactly_view.hpp index f00571a171..cc32a6703c 100644 --- a/include/seqan3/io/views/detail/take_exactly_view.hpp +++ b/include/seqan3/io/views/detail/take_exactly_view.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/std/span b/include/seqan3/std/span index 3ac3e519d8..3f8b558728 100644 --- a/include/seqan3/std/span +++ b/include/seqan3/std/span @@ -11,29 +11,11 @@ // \see https://en.cppreference.com/w/cpp/container/span */ -//!\cond #pragma once -#if __has_include() #include -#endif // __has_include() -#if !defined(__cpp_lib_span) +#include -#include - -#if RANGE_V3_VERSION >= 1000 -namespace ranges -{ -template -inline constexpr bool enable_borrowed_range> = true; - -// we follow the definition of the ranges library for enable_view: -// https://github.com/ericniebler/range-v3/blob/6103268542c27210dbc3f99f1fa0c1e348b52184/include/range/v3/range/concepts.hpp#L201 -template -inline constexpr bool enable_view> = span_sz + 1 < 2; -} // namespace ranges -#endif // RANGE_V3_VERSION >= 1000 - -#endif // !defined(__cpp_lib_span) -//!\endcond +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") diff --git a/include/seqan3/utility/views/slice.hpp b/include/seqan3/utility/views/slice.hpp index df9039c5bc..5febba5316 100644 --- a/include/seqan3/utility/views/slice.hpp +++ b/include/seqan3/utility/views/slice.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/utility/views/type_reduce.hpp b/include/seqan3/utility/views/type_reduce.hpp index 8d1a15a2bb..966a1ac9bc 100644 --- a/include/seqan3/utility/views/type_reduce.hpp +++ b/include/seqan3/utility/views/type_reduce.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/test/snippet/alignment/matrix/detail/alignment_matrix_column_major_range_base.cpp b/test/snippet/alignment/matrix/detail/alignment_matrix_column_major_range_base.cpp index 20f55267a2..52f2b8c61e 100644 --- a/test/snippet/alignment/matrix/detail/alignment_matrix_column_major_range_base.cpp +++ b/test/snippet/alignment/matrix/detail/alignment_matrix_column_major_range_base.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include class my_matrix : public seqan3::detail::alignment_matrix_column_major_range_base { 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 8daa013af4..357e6d2d59 100644 --- a/test/unit/io/views/detail/take_until_view_test.cpp +++ b/test/unit/io/views/detail/take_until_view_test.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/std/ranges_test.cpp b/test/unit/std/ranges_test.cpp index 6c533e4e2a..8d556fdea9 100644 --- a/test/unit/std/ranges_test.cpp +++ b/test/unit/std/ranges_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit/test/expect_range_eq_test.cpp b/test/unit/test/expect_range_eq_test.cpp index f5de397167..d37a5e1fde 100644 --- a/test/unit/test/expect_range_eq_test.cpp +++ b/test/unit/test/expect_range_eq_test.cpp @@ -8,7 +8,7 @@ #include #include // provides test utility to test google test itself -#include +#include #include #include From eb9290b01155a093fd18da800f99a6e6ea5a6e3d Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 20:59:30 +0100 Subject: [PATCH 20/22] [MISC] update std/charconv --- include/seqan3/contrib/charconv/LICENSE.TXT | 76 --- include/seqan3/contrib/charconv/charconv | 616 ------------------ include/seqan3/contrib/charconv/charconv.cpp | 217 ------ .../seqan3/contrib/charconv/charconv_pre.hpp | 47 -- include/seqan3/std/charconv | 90 +-- test/unit/std/charconv_float_test.cpp | 2 - test/unit/std/charconv_int_test.cpp | 2 - 7 files changed, 11 insertions(+), 1039 deletions(-) delete mode 100644 include/seqan3/contrib/charconv/LICENSE.TXT delete mode 100644 include/seqan3/contrib/charconv/charconv delete mode 100644 include/seqan3/contrib/charconv/charconv.cpp delete mode 100644 include/seqan3/contrib/charconv/charconv_pre.hpp diff --git a/include/seqan3/contrib/charconv/LICENSE.TXT b/include/seqan3/contrib/charconv/LICENSE.TXT deleted file mode 100644 index c278f2c928..0000000000 --- a/include/seqan3/contrib/charconv/LICENSE.TXT +++ /dev/null @@ -1,76 +0,0 @@ -============================================================================== -libc++ License -============================================================================== - -The libc++ library is dual licensed under both the University of Illinois -"BSD-Like" license and the MIT license. As a user of this code you may choose -to use it under either license. As a contributor, you agree to allow your code -to be used under both. - -Full text of the relevant licenses is included below. - -============================================================================== - -University of Illinois/NCSA -Open Source License - -Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT - -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== - -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/include/seqan3/contrib/charconv/charconv b/include/seqan3/contrib/charconv/charconv deleted file mode 100644 index 83c6823827..0000000000 --- a/include/seqan3/contrib/charconv/charconv +++ /dev/null @@ -1,616 +0,0 @@ -// -*- C++ -*- -#include "charconv_pre.hpp" -//!\cond - -// -*- C++ -*- -//===------------------------------ charconv ------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef SEQAN3_CONTRIB_CHARCONV_LIBCPP_CHARCONV -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_CHARCONV - -/* - charconv synopsis - -namespace std { - - // floating-point format for primitive numerical conversion - enum class chars_format { - scientific = unspecified, - fixed = unspecified, - hex = unspecified, - general = fixed | scientific - }; - - // 23.20.2, primitive numerical output conversion - struct to_chars_result { - char* ptr; - errc ec; - }; - - to_chars_result to_chars(char* first, char* last, see below value, - int base = 10); - - to_chars_result to_chars(char* first, char* last, float value); - to_chars_result to_chars(char* first, char* last, double value); - to_chars_result to_chars(char* first, char* last, long double value); - - to_chars_result to_chars(char* first, char* last, float value, - chars_format fmt); - to_chars_result to_chars(char* first, char* last, double value, - chars_format fmt); - to_chars_result to_chars(char* first, char* last, long double value, - chars_format fmt); - - to_chars_result to_chars(char* first, char* last, float value, - chars_format fmt, int precision); - to_chars_result to_chars(char* first, char* last, double value, - chars_format fmt, int precision); - to_chars_result to_chars(char* first, char* last, long double value, - chars_format fmt, int precision); - - // 23.20.3, primitive numerical input conversion - struct from_chars_result { - const char* ptr; - errc ec; - }; - - from_chars_result from_chars(const char* first, const char* last, - see below& value, int base = 10); - - from_chars_result from_chars(const char* first, const char* last, - float& value, - chars_format fmt = chars_format::general); - from_chars_result from_chars(const char* first, const char* last, - double& value, - chars_format fmt = chars_format::general); - from_chars_result from_chars(const char* first, const char* last, - long double& value, - chars_format fmt = chars_format::general); - -} // namespace std - -*/ - -// #include <__errc> -#include -#include -#include -#include -#include - -// #include <__debug> - -#if !defined(SEQAN3_CONTRIB_CHARCONV_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - -SEQAN3_CONTRIB_CHARCONV_LIBCPP_BEGIN_NAMESPACE_STD - -#if SEQAN3_CONTRIB_CHARCONV_LIBCPP_STD_VER > 11 - -enum class SEQAN3_CONTRIB_CHARCONV_LIBCPP_ENUM_VIS chars_format -{ - scientific = 0x1, - fixed = 0x2, - hex = 0x4, - general = fixed | scientific -}; - -struct SEQAN3_CONTRIB_CHARCONV_LIBCPP_TYPE_VIS to_chars_result -{ - char* ptr; - errc ec; -}; - -struct SEQAN3_CONTRIB_CHARCONV_LIBCPP_TYPE_VIS from_chars_result -{ - const char* ptr; - errc ec; -}; - -void to_chars(char*, char*, bool, int = 10) = delete; -void from_chars(const char*, const char*, bool, int = 10) = delete; - -namespace __itoa -{ - -static constexpr uint64_t __pow10_64[] = { - UINT64_C(0), - UINT64_C(10), - UINT64_C(100), - UINT64_C(1000), - UINT64_C(10000), - UINT64_C(100000), - UINT64_C(1000000), - UINT64_C(10000000), - UINT64_C(100000000), - UINT64_C(1000000000), - UINT64_C(10000000000), - UINT64_C(100000000000), - UINT64_C(1000000000000), - UINT64_C(10000000000000), - UINT64_C(100000000000000), - UINT64_C(1000000000000000), - UINT64_C(10000000000000000), - UINT64_C(100000000000000000), - UINT64_C(1000000000000000000), - UINT64_C(10000000000000000000), -}; - -static constexpr uint32_t __pow10_32[] = { - UINT32_C(0), UINT32_C(10), UINT32_C(100), - UINT32_C(1000), UINT32_C(10000), UINT32_C(100000), - UINT32_C(1000000), UINT32_C(10000000), UINT32_C(100000000), - UINT32_C(1000000000), -}; - -SEQAN3_CONTRIB_CHARCONV_LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer); -SEQAN3_CONTRIB_CHARCONV_LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer); - -template -struct SEQAN3_CONTRIB_CHARCONV_LIBCPP_HIDDEN __traits_base -{ - using type = uint64_t; - -#if !defined(SEQAN3_CONTRIB_CHARCONV_LIBCPP_COMPILER_MSVC) - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY int __width(_Tp __v) - { - auto __t = (64 - __builtin_clzll(__v | 1)) * 1233 >> 12; - return __t - (__v < __pow10_64[__t]) + 1; - } -#endif - - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY char* __convert(_Tp __v, char* __p) - { - return __u64toa(__v, __p); - } - - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY auto& __pow() { return __pow10_64; } -}; - -template -struct SEQAN3_CONTRIB_CHARCONV_LIBCPP_HIDDEN - __traits_base<_Tp, decltype(void(uint32_t{declval<_Tp>()}))> -{ - using type = uint32_t; - -#if !defined(SEQAN3_CONTRIB_CHARCONV_LIBCPP_COMPILER_MSVC) - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY int __width(_Tp __v) - { - auto __t = (32 - __builtin_clz(__v | 1)) * 1233 >> 12; - return __t - (__v < __pow10_32[__t]) + 1; - } -#endif - - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY char* __convert(_Tp __v, char* __p) - { - return __u32toa(__v, __p); - } - - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY auto& __pow() { return __pow10_32; } -}; - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY bool -__mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r) -{ - auto __c = __a * __b; - __r = __c; - return __c > (numeric_limits::max)(); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY bool -__mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r) -{ - auto __c = __a * __b; - __r = __c; - return __c > (numeric_limits::max)(); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY bool -__mul_overflowed(_Tp __a, _Tp __b, _Tp& __r) -{ - static_assert(is_unsigned<_Tp>::value, ""); -#if !defined(SEQAN3_CONTRIB_CHARCONV_LIBCPP_COMPILER_MSVC) - return __builtin_mul_overflow(__a, __b, &__r); -#else - bool __did = __b && ((numeric_limits<_Tp>::max)() / __b) < __a; - __r = __a * __b; - return __did; -#endif -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY bool -__mul_overflowed(_Tp __a, _Up __b, _Tp& __r) -{ - return __mul_overflowed(__a, static_cast<_Tp>(__b), __r); -} - -template -struct SEQAN3_CONTRIB_CHARCONV_LIBCPP_HIDDEN __traits : __traits_base<_Tp> -{ - static constexpr int digits = numeric_limits<_Tp>::digits10 + 1; - using __traits_base<_Tp>::__pow; - using typename __traits_base<_Tp>::type; - - // precondition: at least one non-zero character available - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY char const* - __read(char const* __p, char const* __ep, type& __a, type& __b) - { - type __cprod[digits]; - int __j = digits - 1; - int __i = digits; - do - { - if (!('0' <= *__p && *__p <= '9')) - break; - __cprod[--__i] = *__p++ - '0'; - } while (__p != __ep && __i != 0); - - __a = __inner_product(__cprod + __i + 1, __cprod + __j, __pow() + 1, - __cprod[__i]); - if (__mul_overflowed(__cprod[__j], __pow()[__j - __i], __b)) - --__p; - return __p; - } - - template - static SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY _Up - __inner_product(_It1 __first1, _It1 __last1, _It2 __first2, _Up __init) - { - for (; __first1 < __last1; ++__first1, ++__first2) - __init = __init + *__first1 * *__first2; - return __init; - } -}; - -} // namespace __itoa - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY _Tp -__complement(_Tp __x) -{ - static_assert(is_unsigned<_Tp>::value, "cast to unsigned first"); - return _Tp(~__x + 1); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY auto -__to_unsigned(_Tp __x) -{ - return static_cast>(__x); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY to_chars_result -__to_chars_itoa(char* __first, char* __last, _Tp __value, true_type) -{ - auto __x = __to_unsigned(__value); - if (__value < 0 && __first != __last) - { - *__first++ = '-'; - __x = __complement(__x); - } - - return __to_chars_itoa(__first, __last, __x, false_type()); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY to_chars_result -__to_chars_itoa(char* __first, char* __last, _Tp __value, false_type) -{ - using __tx = __itoa::__traits<_Tp>; - auto __diff = __last - __first; - -#if !defined(SEQAN3_CONTRIB_CHARCONV_LIBCPP_COMPILER_MSVC) - if (__tx::digits <= __diff || __tx::__width(__value) <= __diff) - return {__tx::__convert(__value, __first), {}}; - else - return {__last, errc::value_too_large}; -#else - if (__tx::digits <= __diff) - return {__tx::__convert(__value, __first), {}}; - else - { - char __buf[__tx::digits]; - auto __p = __tx::__convert(__value, __buf); - auto __len = __p - __buf; - if (__len <= __diff) - { - memcpy(__first, __buf, __len); - return {__first + __len, {}}; - } - else - return {__last, errc::value_too_large}; - } -#endif -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY to_chars_result -__to_chars_integral(char* __first, char* __last, _Tp __value, int __base, - true_type) -{ - auto __x = __to_unsigned(__value); - if (__value < 0 && __first != __last) - { - *__first++ = '-'; - __x = __complement(__x); - } - - return __to_chars_integral(__first, __last, __x, __base, false_type()); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY to_chars_result -__to_chars_integral(char* __first, char* __last, _Tp __value, int __base, - false_type) -{ - if (__base == 10) - return __to_chars_itoa(__first, __last, __value, false_type()); - - auto __p = __last; - while (__p != __first) - { - auto __c = __value % __base; - __value /= __base; - *--__p = "0123456789abcdefghijklmnopqrstuvwxyz"[__c]; - if (__value == 0) - break; - } - - auto __len = __last - __p; - if (__value != 0 || !__len) - return {__last, errc::value_too_large}; - else - { - memmove(__first, __p, __len); - return {__first + __len, {}}; - } -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY to_chars_result -to_chars(char* __first, char* __last, _Tp __value) -{ - return __to_chars_itoa(__first, __last, __value, is_signed<_Tp>()); -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY to_chars_result -to_chars(char* __first, char* __last, _Tp __value, int __base) -{ - SEQAN3_CONTRIB_CHARCONV_LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]"); - return __to_chars_integral(__first, __last, __value, __base, - is_signed<_Tp>()); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -__sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args) -{ - using __tl = numeric_limits<_Tp>; - decltype(__to_unsigned(__value)) __x; - - bool __neg = (__first != __last && *__first == '-'); - auto __r = __f(__neg ? __first + 1 : __first, __last, __x, __args...); - switch (__r.ec) - { - case errc::invalid_argument: - return {__first, __r.ec}; - case errc::result_out_of_range: - return __r; - default: - break; - } - - if (__neg) - { - if (__x <= __complement(__to_unsigned(__tl::min()))) - { - __x = __complement(__x); - memcpy(&__value, &__x, sizeof(__x)); - return __r; - } - } - else - { - if (__x <= (__tl::max)()) - { - __value = __x; - return __r; - } - } - - return {__r.ptr, errc::result_out_of_range}; -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY bool -__in_pattern(_Tp __c) -{ - return '0' <= __c && __c <= '9'; -} - -struct SEQAN3_CONTRIB_CHARCONV_LIBCPP_HIDDEN __in_pattern_result -{ - bool __ok; - int __val; - - explicit SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY operator bool() const { return __ok; } -}; - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY __in_pattern_result -__in_pattern(_Tp __c, int __base) -{ - if (__base <= 10) - return {'0' <= __c && __c < '0' + __base, __c - '0'}; - else if (__in_pattern(__c)) - return {true, __c - '0'}; - else if ('a' <= __c && __c < 'a' + __base - 10) - return {true, __c - 'a' + 10}; - else - return {'A' <= __c && __c < 'A' + __base - 10, __c - 'A' + 10}; -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -__subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, - _Ts... __args) -{ - auto __find_non_zero = [](_It __first, _It __last) { - for (; __first != __last; ++__first) - if (*__first != '0') - break; - return __first; - }; - - auto __p = __find_non_zero(__first, __last); - if (__p == __last || !__in_pattern(*__p, __args...)) - { - if (__p == __first) - return {__first, errc::invalid_argument}; - else - { - __value = 0; - return {__p, {}}; - } - } - - auto __r = __f(__p, __last, __value, __args...); - if (__r.ec == errc::result_out_of_range) - { - for (; __r.ptr != __last; ++__r.ptr) - { - if (!__in_pattern(*__r.ptr, __args...)) - break; - } - } - - return __r; -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -__from_chars_atoi(const char* __first, const char* __last, _Tp& __value) -{ - using __tx = __itoa::__traits<_Tp>; - using __output_type = typename __tx::type; - - return __subject_seq_combinator( - __first, __last, __value, - [](const char* __first, const char* __last, - _Tp& __value) -> from_chars_result { - __output_type __a, __b; - auto __p = __tx::__read(__first, __last, __a, __b); - if (__p == __last || !__in_pattern(*__p)) - { - __output_type __m = (numeric_limits<_Tp>::max)(); - if (__m >= __a && __m - __a >= __b) - { - __value = __a + __b; - return {__p, {}}; - } - } - return {__p, errc::result_out_of_range}; - }); -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -__from_chars_atoi(const char* __first, const char* __last, _Tp& __value) -{ - using __t = decltype(__to_unsigned(__value)); - return __sign_combinator(__first, __last, __value, __from_chars_atoi<__t>); -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -__from_chars_integral(const char* __first, const char* __last, _Tp& __value, - int __base) -{ - if (__base == 10) - return __from_chars_atoi(__first, __last, __value); - - return __subject_seq_combinator( - __first, __last, __value, - [](const char* __p, const char* __last, _Tp& __value, - int __base) -> from_chars_result { - using __tl = numeric_limits<_Tp>; - auto __digits = __tl::digits / log2f(float(__base)); - _Tp __a = __in_pattern(*__p++, __base).__val, __b = 0; - - for (int __i = 1; __p != __last; ++__i, ++__p) - { - if (auto __c = __in_pattern(*__p, __base)) - { - if (__i < __digits - 1) - __a = __a * __base + __c.__val; - else - { - if (!__itoa::__mul_overflowed(__a, __base, __a)) - ++__p; - __b = __c.__val; - break; - } - } - else - break; - } - - if (__p == __last || !__in_pattern(*__p, __base)) - { - if ((__tl::max)() - __a >= __b) - { - __value = __a + __b; - return {__p, {}}; - } - } - return {__p, errc::result_out_of_range}; - }, - __base); -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -__from_chars_integral(const char* __first, const char* __last, _Tp& __value, - int __base) -{ - using __t = decltype(__to_unsigned(__value)); - return __sign_combinator(__first, __last, __value, - __from_chars_integral<__t>, __base); -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -from_chars(const char* __first, const char* __last, _Tp& __value) -{ - return __from_chars_atoi(__first, __last, __value); -} - -template ::value, int> = 0> -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY from_chars_result -from_chars(const char* __first, const char* __last, _Tp& __value, int __base) -{ - SEQAN3_CONTRIB_CHARCONV_LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]"); - return __from_chars_integral(__first, __last, __value, __base); -} - -#endif // SEQAN3_CONTRIB_CHARCONV_LIBCPP_STD_VER > 11 - -SEQAN3_CONTRIB_CHARCONV_LIBCPP_END_NAMESPACE_STD - -#endif // SEQAN3_CONTRIB_CHARCONV_LIBCPP_CHARCONV - -//!\endcond diff --git a/include/seqan3/contrib/charconv/charconv.cpp b/include/seqan3/contrib/charconv/charconv.cpp deleted file mode 100644 index 369b782b1b..0000000000 --- a/include/seqan3/contrib/charconv/charconv.cpp +++ /dev/null @@ -1,217 +0,0 @@ -//===------------------------- charconv.cpp -------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "charconv" -#include - -SEQAN3_CONTRIB_CHARCONV_LIBCPP_BEGIN_NAMESPACE_STD - -namespace __itoa -{ - -static constexpr char cDigitsLut[200] = { - '0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', - '7', '0', '8', '0', '9', '1', '0', '1', '1', '1', '2', '1', '3', '1', '4', - '1', '5', '1', '6', '1', '7', '1', '8', '1', '9', '2', '0', '2', '1', '2', - '2', '2', '3', '2', '4', '2', '5', '2', '6', '2', '7', '2', '8', '2', '9', - '3', '0', '3', '1', '3', '2', '3', '3', '3', '4', '3', '5', '3', '6', '3', - '7', '3', '8', '3', '9', '4', '0', '4', '1', '4', '2', '4', '3', '4', '4', - '4', '5', '4', '6', '4', '7', '4', '8', '4', '9', '5', '0', '5', '1', '5', - '2', '5', '3', '5', '4', '5', '5', '5', '6', '5', '7', '5', '8', '5', '9', - '6', '0', '6', '1', '6', '2', '6', '3', '6', '4', '6', '5', '6', '6', '6', - '7', '6', '8', '6', '9', '7', '0', '7', '1', '7', '2', '7', '3', '7', '4', - '7', '5', '7', '6', '7', '7', '7', '8', '7', '9', '8', '0', '8', '1', '8', - '2', '8', '3', '8', '4', '8', '5', '8', '6', '8', '7', '8', '8', '8', '9', - '9', '0', '9', '1', '9', '2', '9', '3', '9', '4', '9', '5', '9', '6', '9', - '7', '9', '8', '9', '9'}; - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY char* -append1(char* buffer, T i) -{ - *buffer = '0' + static_cast(i); - return buffer + 1; -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY char* -append2(char* buffer, T i) -{ - memcpy(buffer, &cDigitsLut[(i)*2], 2); - return buffer + 2; -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY char* -append3(char* buffer, T i) -{ - return append2(append1(buffer, (i) / 100), (i) % 100); -} - -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY char* -append4(char* buffer, T i) -{ - return append2(append2(buffer, (i) / 100), (i) % 100); -} - -inline -char* -__u32toa(uint32_t value, char* buffer) -{ - if (value < 10000) - { - if (value < 100) - { - if (value < 10) - buffer = append1(buffer, value); - else - buffer = append2(buffer, value); - } - else - { - if (value < 1000) - buffer = append3(buffer, value); - else - buffer = append4(buffer, value); - } - } - else if (value < 100000000) - { - // value = bbbbcccc - const uint32_t b = value / 10000; - const uint32_t c = value % 10000; - - if (value < 1000000) - { - if (value < 100000) - buffer = append1(buffer, b); - else - buffer = append2(buffer, b); - } - else - { - if (value < 10000000) - buffer = append3(buffer, b); - else - buffer = append4(buffer, b); - } - - buffer = append4(buffer, c); - } - else - { - // value = aabbbbcccc in decimal - const uint32_t a = value / 100000000; // 1 to 42 - value %= 100000000; - - if (a < 10) - buffer = append1(buffer, a); - else - buffer = append2(buffer, a); - - buffer = append4(buffer, value / 10000); - buffer = append4(buffer, value % 10000); - } - - return buffer; -} - -inline -char* -__u64toa(uint64_t value, char* buffer) -{ - if (value < 100000000) - { - uint32_t v = static_cast(value); - if (v < 10000) - { - if (v < 100) - { - if (v < 10) - buffer = append1(buffer, v); - else - buffer = append2(buffer, v); - } - else - { - if (v < 1000) - buffer = append3(buffer, v); - else - buffer = append4(buffer, v); - } - } - else - { - // value = bbbbcccc - const uint32_t b = v / 10000; - const uint32_t c = v % 10000; - - if (v < 1000000) - { - if (v < 100000) - buffer = append1(buffer, b); - else - buffer = append2(buffer, b); - } - else - { - if (v < 10000000) - buffer = append3(buffer, b); - else - buffer = append4(buffer, b); - } - - buffer = append4(buffer, c); - } - } - else if (value < 10000000000000000) - { - const uint32_t v0 = static_cast(value / 100000000); - const uint32_t v1 = static_cast(value % 100000000); - - buffer = __u32toa(v0, buffer); - buffer = append4(buffer, v1 / 10000); - buffer = append4(buffer, v1 % 10000); - } - else - { - const uint32_t a = - static_cast(value / 10000000000000000); // 1 to 1844 - value %= 10000000000000000; - - if (a < 100) - { - if (a < 10) - buffer = append1(buffer, a); - else - buffer = append2(buffer, a); - } - else - { - if (a < 1000) - buffer = append3(buffer, a); - else - buffer = append4(buffer, a); - } - - const uint32_t v0 = static_cast(value / 100000000); - const uint32_t v1 = static_cast(value % 100000000); - buffer = append4(buffer, v0 / 10000); - buffer = append4(buffer, v0 % 10000); - buffer = append4(buffer, v1 / 10000); - buffer = append4(buffer, v1 % 10000); - } - - return buffer; -} - -} // namespace __itoa - -SEQAN3_CONTRIB_CHARCONV_LIBCPP_END_NAMESPACE_STD diff --git a/include/seqan3/contrib/charconv/charconv_pre.hpp b/include/seqan3/contrib/charconv/charconv_pre.hpp deleted file mode 100644 index 7104321621..0000000000 --- a/include/seqan3/contrib/charconv/charconv_pre.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// ----------------------------------------------------------------------------------------------------- -// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin -// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik -// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License -// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md -// ----------------------------------------------------------------------------------------------------- - -#pragma once - -#include -#include -#include - -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_BEGIN_NAMESPACE_STD namespace seqan3::contrib::charconv { -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_END_NAMESPACE_STD } -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_STD_VER 17 -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_FUNC_VIS -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_ENUM_VIS -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_TYPE_VIS -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_HIDDEN -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY -#define SEQAN3_CONTRIB_CHARCONV_LIBCPP_ASSERT(condition, message) assert(condition) - -// import things from std namespace which charconv uses -namespace seqan3::contrib::charconv -{ -using std::errc; -using std::declval; -using std::numeric_limits; -using std::is_integral; -using std::is_unsigned; -using std::is_signed; -using std::make_unsigned_t; -using std::true_type; -using std::false_type; -using std::enable_if_t; - -// forward declare -struct SEQAN3_CONTRIB_CHARCONV_LIBCPP_TYPE_VIS to_chars_result; - -// forward declare to avoid "no matching function for call to -// ‘__to_chars_itoa(char*&, char*&, short unsigned int&, std::false_type)’" -template -inline SEQAN3_CONTRIB_CHARCONV_LIBCPP_INLINE_VISIBILITY to_chars_result -__to_chars_itoa(char* __first, char* __last, _Tp __value, false_type); - -} // namespace seqan3::contrib::charconv diff --git a/include/seqan3/std/charconv b/include/seqan3/std/charconv index da55e97b75..205a0d43cd 100644 --- a/include/seqan3/std/charconv +++ b/include/seqan3/std/charconv @@ -13,97 +13,30 @@ #pragma once -#if __has_include() -#include // from C++20 all feature macros should be defined here -#endif - -#include // __cpp_lib_to_chars may be defined here as currently documented +#include +#include // __cpp_lib_to_chars may be defined here as currently documented. +#include // From C++20 onwards, all feature macros should be defined here. /*!\defgroup std_charconv charconv * \ingroup std * \brief The [\ header](https://en.cppreference.com/w/cpp/header/charconv) from C++17's standard library. - */ - -// ========================================================================= -// Determine charconv implementation state (full, int only or no implementation) -// ========================================================================= - -/*!\brief A workaround for __cpp_lib_to_chars. - * \ingroup std_charconv - * * \details * * The following table describes what implementation of std::to_chars and std::from_chars will be used * - * | stdlib version | __cpp_lib_to_chars | SEQAN3_CPP_LIB_TO_CHARS | chars_format | to_chars_result | from_chars_result | to_chars (int) | from_chars (int) | to_chars (float) | from_chars (float) | - * | -------------- | ------------------------------------ | ------------------------- | -------------- | --------------- | ----------------- | -------------- | ---------------- | -------------------- | -------------------- | - * | gcc 7 | undefined and NO `` header | undefined | contrib (llvm) | contrib (llvm) | contrib (llvm) | contrib (llvm) | contrib (llvm) | shim (ostringstream) | shim (strto[f/d/ld]) | - * | gcc 8 | undefined and `` header | 100000 | contrib (llvm) | stdlib | stdlib | stdlib | stdlib | shim (ostringstream) | shim (strto[f/d/ld]) | - * | gcc 9 | undefined and `` header | 100000 | contrib (llvm) | stdlib | stdlib | stdlib | stdlib | shim (ostringstream) | shim (strto[f/d/ld]) | - * | gcc 10 | undefined and `` header | 100000 | stdlib | stdlib | stdlib | stdlib | stdlib | shim (ostringstream) | shim (strto[f/d/ld]) | - * | gcc 11 | undefined and `` header | 100000* (could be 201611) | stdlib | stdlib | stdlib | stdlib | stdlib | stdlib | stdlib | + * | stdlib version | __cpp_lib_to_chars | chars_format | to_chars_result | from_chars_result | to_chars (int) | from_chars (int) | to_chars (float) | from_chars (float) | + * | -------------- | ------------------------------------------------ | -------------- | --------------- | ----------------- | -------------- | ---------------- | -------------------- | -------------------- | + * | gcc 10 | undefined and `` header | stdlib | stdlib | stdlib | stdlib | stdlib | shim (ostringstream) | shim (strto[f/d/ld]) | + * | gcc 11 | undefined (or 201611) and `` header | stdlib | stdlib | stdlib | stdlib | stdlib | stdlib | stdlib | * * Note: gcc 11 implements float too, but does not define __cpp_lib_to_chars */ -#ifdef SEQAN3_DOXYGEN_ONLY // needed as seqan3/core/platform.hpp might not be included -#if SEQAN3_DOXYGEN_ONLY(1)0 -// documentation-only -#define SEQAN3_CPP_LIB_TO_CHARS IMPLEMENTATION_DEFINED -#endif // SEQAN3_DOXYGEN_ONLY(1)0 -#endif // SEQAN3_DOXYGEN_ONLY - -#if __cpp_lib_to_chars >= 201611 // iff complete (int AND float) charconv implementation -# define SEQAN3_CPP_LIB_TO_CHARS __cpp_lib_to_chars -#elif __has_include() // iff incomplete (only int) charconv implementation -# define SEQAN3_CPP_LIB_TO_CHARS 100000 -#endif // __cpp_lib_to_chars >= 201611 // ========================================================================= -// If any std implementation is present use that as basis (>= gcc8) +// If float implementation is missing, add our own shim-implementation // ========================================================================= -#if SEQAN3_CPP_LIB_TO_CHARS >= 100000 -#include - -namespace std -{ -namespace -{ -// define in a way that works for any gcc >= 8 whether chars_format is defined or not -enum class chars_format // gcc 8 and 9 did not define std::chars_format -{ - scientific = 0x1, - fixed = 0x2, - hex = 0x4, - general = fixed | scientific -}; -} // anonymous namespace -} // namespace std -#endif // SEQAN3_CPP_LIB_TO_CHARS >= 100000 - -// ========================================================================= -// If no std implementation is present use llvm's int implementation (for gcc 7) -// ========================================================================= - -#ifndef SEQAN3_CPP_LIB_TO_CHARS -#include -#include - -namespace std -{ -using ::seqan3::contrib::charconv::chars_format; -using ::seqan3::contrib::charconv::to_chars_result; -using ::seqan3::contrib::charconv::to_chars; -using ::seqan3::contrib::charconv::from_chars_result; -using ::seqan3::contrib::charconv::from_chars; -} // namespace std -#endif // SEQAN3_CPP_LIB_TO_CHARS - -// ========================================================================= -// if float implementation is missing add our own shim-implementation -// ========================================================================= - -#if !defined(SEQAN3_CPP_LIB_TO_CHARS) || SEQAN3_CPP_LIB_TO_CHARS == 100000 +#if __cpp_lib_to_chars < 201611 #include #include #include @@ -177,7 +110,6 @@ inline from_chars_result from_chars_floating_point(char const * first, return {last, std::errc::invalid_argument}; } - // In contrast to std::from_chars, std::strto[f/d/ld] does not treat the second // parameter (str_end) as "end of the sequence to parse" but merely as an out // parameter to indicate where the parsing ended. Therefore, if [last] does @@ -266,7 +198,7 @@ inline to_chars_result to_chars(char * first, char * last, floating_point_type v /*!\brief Parse a char sequence into an floating point value. * \ingroup std_charconv - * \tparam value_type The type to parse the string into; Must model std::integral. + * \tparam floating_point_type The type to parse the string into; Must model std::floating_point. * \param[in] first The start of the string to parse. * \param[in] last The end of the string to parse. * \param[in, out] value The value to store the parsed result in. @@ -337,4 +269,4 @@ using ::seqan3::contrib::charconv_float::to_chars; // import our shim-float vers using ::seqan3::contrib::charconv_float::from_chars; // import our shim-float version } // namespace std -#endif // !defined(SEQAN3_CPP_LIB_TO_CHARS) || SEQAN3_CPP_LIB_TO_CHARS == 100000 +#endif // __cpp_lib_to_chars < 201611 diff --git a/test/unit/std/charconv_float_test.cpp b/test/unit/std/charconv_float_test.cpp index 5af424b2a8..38ea1ae84c 100644 --- a/test/unit/std/charconv_float_test.cpp +++ b/test/unit/std/charconv_float_test.cpp @@ -7,11 +7,9 @@ #include -#if __has_include() // make sure that including the std header does not produce any errors // see https://github.com/seqan/seqan3/issues/2352 #include -#endif // __has_include() #include #include #include diff --git a/test/unit/std/charconv_int_test.cpp b/test/unit/std/charconv_int_test.cpp index 1647c0b19a..17489d6c8a 100644 --- a/test/unit/std/charconv_int_test.cpp +++ b/test/unit/std/charconv_int_test.cpp @@ -7,11 +7,9 @@ #include -#if __has_include() // make sure that including the std header does not produce any errors // see https://github.com/seqan/seqan3/issues/2352 #include -#endif // __has_include() #include #include #include From f7f55cf5ff9ac6628c188d2bcd1b0779af9f7eb7 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Fri, 25 Mar 2022 22:06:43 +0100 Subject: [PATCH 21/22] [MISC] deprecate std/bit --- .../seqan3/contrib/parallel/buffer_queue.hpp | 2 +- include/seqan3/core/detail/all.hpp | 2 +- include/seqan3/io/sam_file/format_bam.hpp | 2 +- .../dream_index/interleaved_bloom_filter.hpp | 2 +- include/seqan3/std/bit | 243 +----------------- .../utility/container/dynamic_bitset.hpp | 2 +- .../utility/detail/to_little_endian.hpp | 2 +- include/seqan3/utility/math.hpp | 2 +- .../utility/simd/detail/builtin_simd.hpp | 2 +- test/performance/std/bit_benchmark.cpp | 2 +- .../core/detail/count_leading_zeros.cpp | 17 -- .../core/detail/count_leading_zeros.err | 4 - .../core/detail/count_trailing_zeros.cpp | 17 -- .../core/detail/count_trailing_zeros.err | 4 - .../core/detail/most_significant_bit_set.cpp | 17 -- .../core/detail/most_significant_bit_set.err | 4 - test/snippet/core/detail/popcount.cpp | 17 -- test/snippet/core/detail/popcount.err | 4 - test/unit/std/bit_test.cpp | 2 +- .../container/aligned_allocator_test.cpp | 2 +- 20 files changed, 14 insertions(+), 335 deletions(-) delete mode 100644 test/snippet/core/detail/count_leading_zeros.cpp delete mode 100644 test/snippet/core/detail/count_leading_zeros.err delete mode 100644 test/snippet/core/detail/count_trailing_zeros.cpp delete mode 100644 test/snippet/core/detail/count_trailing_zeros.err delete mode 100644 test/snippet/core/detail/most_significant_bit_set.cpp delete mode 100644 test/snippet/core/detail/most_significant_bit_set.err delete mode 100644 test/snippet/core/detail/popcount.cpp delete mode 100644 test/snippet/core/detail/popcount.err diff --git a/include/seqan3/contrib/parallel/buffer_queue.hpp b/include/seqan3/contrib/parallel/buffer_queue.hpp index 3edb67c8f3..f770e45725 100644 --- a/include/seqan3/contrib/parallel/buffer_queue.hpp +++ b/include/seqan3/contrib/parallel/buffer_queue.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/seqan3/core/detail/all.hpp b/include/seqan3/core/detail/all.hpp index 5c5e663ec9..5e5e1f320d 100644 --- a/include/seqan3/core/detail/all.hpp +++ b/include/seqan3/core/detail/all.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/io/sam_file/format_bam.hpp b/include/seqan3/io/sam_file/format_bam.hpp index 5668f2113f..f69deccf80 100644 --- a/include/seqan3/io/sam_file/format_bam.hpp +++ b/include/seqan3/io/sam_file/format_bam.hpp @@ -12,7 +12,7 @@ #pragma once -#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 1c966e2af9..0aa5c44160 100644 --- a/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp +++ b/include/seqan3/search/dream_index/interleaved_bloom_filter.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include diff --git a/include/seqan3/std/bit b/include/seqan3/std/bit index d26e155bea..ec7b240c71 100644 --- a/include/seqan3/std/bit +++ b/include/seqan3/std/bit @@ -14,246 +14,9 @@ #pragma once -#if __has_include() #include -#endif // __has_include() -#include -#include -/*!\defgroup std_bit bit - * \ingroup std - * \brief The [\ header](https://en.cppreference.com/w/cpp/header/bit) from C++20's standard library. - */ - -/*!\brief A workaround for __cpp_lib_bitops for gcc version 9.x (in C++20 mode). - * Those versions implemented std::countl_zero, etc, but did not define that feature detection macro. - * \ingroup std_bit - */ -#ifdef SEQAN3_DOXYGEN_ONLY // needed as seqan3/core/platform.hpp might not be included -#if SEQAN3_DOXYGEN_ONLY(1)0 -// documentation-only -#define SEQAN3_CPP_LIB_BITOPS IMPLEMENTATION_DEFINED -#undef SEQAN3_CPP_LIB_BITOPS -#endif // SEQAN3_DOXYGEN_ONLY(1)0 -#endif // SEQAN3_DOXYGEN_ONLY - -#ifndef SEQAN3_CPP_LIB_BITOPS -# if defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L -# define SEQAN3_CPP_LIB_BITOPS 1 -# elif defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE == 9) && __cplusplus > 201703L -# define SEQAN3_CPP_LIB_BITOPS 1 -# endif -#endif - -/*!\brief This defines __cpp_lib_int_pow2. - * \ingroup std_bit - * Note: g++-9.3 -std=c++2a on ubuntu 20.04 did `#define __cpp_lib_int_pow2 201806L`, which is an older implementation - * of the __cpp_lib_int_pow2 proposal. - * - * \sa http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0556r3.html (__cpp_lib_int_pow2 >= 201806L) - * \sa http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1956r1.pdf (__cpp_lib_int_pow2 >= 202002L) - */ -#ifdef SEQAN3_DOXYGEN_ONLY // needed as seqan3/core/platform.hpp might not be included -#if SEQAN3_DOXYGEN_ONLY(1)0 -// documentation-only -#define SEQAN3_CPP_LIB_INT_POW2 IMPLEMENTATION_DEFINED -#undef SEQAN3_CPP_LIB_INT_POW2 -#endif // SEQAN3_DOXYGEN_ONLY(1)0 -#endif // SEQAN3_DOXYGEN_ONLY - -#ifndef SEQAN3_CPP_LIB_INT_POW2 -# if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L -# define SEQAN3_CPP_LIB_INT_POW2 1 -# endif -#endif - -/*!\brief A workaround for __cpp_lib_endian for gcc version 8.x (in C++20 mode). - * Those versions implemented std::endian, but did not define that feature detection macro. - * \ingroup std_bit - */ -#ifdef SEQAN3_DOXYGEN_ONLY // needed as seqan3/core/platform.hpp might not be included -#if SEQAN3_DOXYGEN_ONLY(1)0 -// documentation-only -#define SEQAN3_CPP_LIB_ENDIAN IMPLEMENTATION_DEFINED -#undef SEQAN3_CPP_LIB_ENDIAN -#endif // SEQAN3_DOXYGEN_ONLY(1)0 -#endif // SEQAN3_DOXYGEN_ONLY - -#ifndef SEQAN3_CPP_LIB_ENDIAN -# if defined(__cpp_lib_endian) -# define SEQAN3_CPP_LIB_ENDIAN 1 -# elif defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE == 8 && __cplusplus > 201703L -# define SEQAN3_CPP_LIB_ENDIAN 1 -# endif -#endif - -#ifndef SEQAN3_CPP_LIB_ENDIAN - -#include - -namespace std -{ - -/*!\brief Indicates the endianness of all scalar types. - * \sa https://en.cppreference.com/w/cpp/types/endian - * \ingroup std_bit - */ -enum class endian -{ -#ifdef _WIN32 - little = 0, //!< implementation-defined - big = 1, //!< implementation-defined - native = little //!< implementation-defined -#else - little = __ORDER_LITTLE_ENDIAN__, //!< implementation-defined - big = __ORDER_BIG_ENDIAN__, //!< implementation-defined - native = __BYTE_ORDER__ //!< implementation-defined -#endif -}; - -} //namespace std - -#endif // SEQAN3_CPP_LIB_ENDIAN - -#if !defined(SEQAN3_CPP_LIB_INT_POW2) || !defined(SEQAN3_CPP_LIB_BITOPS) - -namespace std::detail -{ -/*!\brief How many bits has a type? - * \ingroup std_bit - * \tparam type_t The type to determine the number of bits. - */ -template -constexpr auto bits_of = CHAR_BIT * sizeof(type_t); -} // namespace std::detail - -#endif // !defined(SEQAN3_CPP_LIB_INT_POW2) || !defined(SEQAN3_CPP_LIB_BITOPS) - -#ifndef SEQAN3_CPP_LIB_INT_POW2 - -namespace std -{ - -#ifndef SEQAN3_CPP_LIB_BITOPS -// forward declare -template constexpr int countl_zero(T x) noexcept; -#endif // SEQAN3_CPP_LIB_BITOPS - -// // bit_cast -// template constexpr To bit_cast(const From& from) noexcept; -// -// // integral powers of 2 - -/*!\brief Checks if x is an integral power of two. - * \sa https://en.cppreference.com/w/cpp/numeric/has_single_bit - * \ingroup std_bit - */ -template constexpr bool has_single_bit(T x) noexcept -{ - static_assert(std::is_unsigned_v, "Input should be unsigned."); - - return x > 0 && (x & (x-1)) == 0; -} - -/*!\brief Calculates the smallest integral power of two that is not smaller than x. - * \sa https://en.cppreference.com/w/cpp/numeric/bit_ceil - * \ingroup std_bit - */ -template constexpr T bit_ceil(T x) noexcept -{ - static_assert(std::is_unsigned_v, "Input should be unsigned."); - - if (x == 0) - return 1; - - --x; - for (size_t shift = 1; !has_single_bit(x + 1); shift <<= 1) - x |= x >> shift; - - return x + 1; -} - -// template constexpr T bit_floor(T x) noexcept; - -/*!\brief If x is not zero, calculates the number of bits needed to store the value x, that is, - * 1 + floor(log2(x)). If x is zero, returns zero. - * \sa https://en.cppreference.com/w/cpp/numeric/bit_width - * \ingroup std_bit - */ -template constexpr T bit_width(T x) noexcept -{ - static_assert(std::is_unsigned_v, "Input should be unsigned."); - - return detail::bits_of - countl_zero(x); -} - -} // namespace std - -#endif // SEQAN3_CPP_LIB_INT_POW2 - -#ifndef SEQAN3_CPP_LIB_BITOPS - -namespace std -{ - -// -// // rotating -// template [[nodiscard]] constexpr T rotl(T x, int s) noexcept; -// template [[nodiscard]] constexpr T rotr(T x, int s) noexcept; -// -// // counting - -/*!\brief Returns the number of consecutive 0 bits in the value of x, starting from the most significant bit ("left"). - * \sa https://en.cppreference.com/w/cpp/numeric/countl_zero - * \ingroup std_bit - */ -template constexpr int countl_zero(T x) noexcept -{ - static_assert(std::is_unsigned_v, "Input should be unsigned."); - - if constexpr (sizeof(T) == sizeof(unsigned long long)) - return x == 0u ? detail::bits_of : __builtin_clzll(x); - else if constexpr (sizeof(T) == sizeof(unsigned long)) - return x == 0u ? detail::bits_of : __builtin_clzl(x); - else - return detail::bits_of + (x == 0u ? 0u : __builtin_clz(x) - detail::bits_of); -} - -// template constexpr int countl_one(T x) noexcept; - -/*!\brief Returns the number of consecutive 0 bits in the value of x, starting from the least significant bit ("right"). - * \sa https://en.cppreference.com/w/cpp/numeric/countr_zero - * \ingroup std_bit - */ -template constexpr int countr_zero(T x) noexcept -{ - static_assert(std::is_unsigned_v, "Input should be unsigned."); - - if constexpr (sizeof(T) == sizeof(unsigned long long)) - return x == 0u ? detail::bits_of : __builtin_ctzll(x); - else if constexpr (sizeof(T) == sizeof(unsigned long)) - return x == 0u ? detail::bits_of : __builtin_ctzl(x); - else - return x == 0u ? detail::bits_of : __builtin_ctz(x); -} -// template constexpr int countr_one(T x) noexcept; - -/*!\brief Returns the number of 1 bits in the value of x. - * \sa https://en.cppreference.com/w/cpp/numeric/popcount - * \ingroup std_bit - */ -template constexpr int popcount(T x) noexcept -{ - static_assert(std::is_unsigned_v, "Input should be unsigned."); - - if constexpr (sizeof(T) == sizeof(unsigned long long)) - return __builtin_popcountll(x); - else if constexpr (sizeof(T) == sizeof(unsigned long)) - return __builtin_popcountl(x); - else - return __builtin_popcount(x); -} - -} // namespace std +#include -#endif // SEQAN3_CPP_LIB_BITOPS +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") diff --git a/include/seqan3/utility/container/dynamic_bitset.hpp b/include/seqan3/utility/container/dynamic_bitset.hpp index 5c7fc2b0a4..c7a7e5fe7c 100644 --- a/include/seqan3/utility/container/dynamic_bitset.hpp +++ b/include/seqan3/utility/container/dynamic_bitset.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include diff --git a/include/seqan3/utility/detail/to_little_endian.hpp b/include/seqan3/utility/detail/to_little_endian.hpp index 3cc905e758..bdffbc5c8f 100644 --- a/include/seqan3/utility/detail/to_little_endian.hpp +++ b/include/seqan3/utility/detail/to_little_endian.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include // Find correct header for byte-order conversion functions. diff --git a/include/seqan3/utility/math.hpp b/include/seqan3/utility/math.hpp index d7901aa826..8b72c18329 100644 --- a/include/seqan3/utility/math.hpp +++ b/include/seqan3/utility/math.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include #include #include diff --git a/include/seqan3/utility/simd/detail/builtin_simd.hpp b/include/seqan3/utility/simd/detail/builtin_simd.hpp index 0b2fa13faa..3fe3d1fcaf 100644 --- a/include/seqan3/utility/simd/detail/builtin_simd.hpp +++ b/include/seqan3/utility/simd/detail/builtin_simd.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include #include #include diff --git a/test/performance/std/bit_benchmark.cpp b/test/performance/std/bit_benchmark.cpp index 5ccb951382..e0fe404f7d 100644 --- a/test/performance/std/bit_benchmark.cpp +++ b/test/performance/std/bit_benchmark.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include diff --git a/test/snippet/core/detail/count_leading_zeros.cpp b/test/snippet/core/detail/count_leading_zeros.cpp deleted file mode 100644 index 2ad46c7497..0000000000 --- a/test/snippet/core/detail/count_leading_zeros.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include - -int main() -{ - uint8_t t0 = 0b0000'1001; - uint16_t t1 = 0b0100'0001'0000'1001; - uint32_t t2 = 0b0000'0000'0000'0000'1000'0000'0000'0000; - uint64_t t3 = 0b0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0001; - - seqan3::debug_stream << std::countl_zero(t0) << '\n'; // 4 - seqan3::debug_stream << std::countl_zero(t1) << '\n'; // 1 - seqan3::debug_stream << std::countl_zero(t2) << '\n'; // 16 - seqan3::debug_stream << std::countl_zero(t3) << '\n'; // 63 - - return 0; -} diff --git a/test/snippet/core/detail/count_leading_zeros.err b/test/snippet/core/detail/count_leading_zeros.err deleted file mode 100644 index a6b5cddb8a..0000000000 --- a/test/snippet/core/detail/count_leading_zeros.err +++ /dev/null @@ -1,4 +0,0 @@ -4 -1 -16 -63 diff --git a/test/snippet/core/detail/count_trailing_zeros.cpp b/test/snippet/core/detail/count_trailing_zeros.cpp deleted file mode 100644 index d1e60aa5f3..0000000000 --- a/test/snippet/core/detail/count_trailing_zeros.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include - -int main() -{ - uint8_t t0 = 0b0000'1001; - uint16_t t1 = 0b0100'0001'0000'1000; - uint32_t t2 = 0b0000'0000'0000'0000'1000'0000'0000'0000; - uint64_t t3 = 0b0000'0000'0000'0000'0010'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000; - - seqan3::debug_stream << std::countr_zero(t0) << '\n'; // 0 - seqan3::debug_stream << std::countr_zero(t1) << '\n'; // 3 - seqan3::debug_stream << std::countr_zero(t2) << '\n'; // 15 - seqan3::debug_stream << std::countr_zero(t3) << '\n'; // 45 - - return 0; -} diff --git a/test/snippet/core/detail/count_trailing_zeros.err b/test/snippet/core/detail/count_trailing_zeros.err deleted file mode 100644 index bcadfe0cfb..0000000000 --- a/test/snippet/core/detail/count_trailing_zeros.err +++ /dev/null @@ -1,4 +0,0 @@ -0 -3 -15 -45 diff --git a/test/snippet/core/detail/most_significant_bit_set.cpp b/test/snippet/core/detail/most_significant_bit_set.cpp deleted file mode 100644 index 33453cc710..0000000000 --- a/test/snippet/core/detail/most_significant_bit_set.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include - -int main() -{ - uint8_t t0 = 0b0000'1001; - uint16_t t1 = 0b0100'0001'0000'1001; - uint32_t t2 = 0b0000'0000'0000'0000'0000'0000'0000'0001; - uint64_t t3 = 0b0100'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000; - - seqan3::debug_stream << std::bit_width(t0) << '\n'; // 4 - seqan3::debug_stream << std::bit_width(t1) << '\n'; // 15 - seqan3::debug_stream << std::bit_width(t2) << '\n'; // 1 - seqan3::debug_stream << std::bit_width(t3) << '\n'; // 63 - - return 0; -} diff --git a/test/snippet/core/detail/most_significant_bit_set.err b/test/snippet/core/detail/most_significant_bit_set.err deleted file mode 100644 index 405167e7c0..0000000000 --- a/test/snippet/core/detail/most_significant_bit_set.err +++ /dev/null @@ -1,4 +0,0 @@ -4 -15 -1 -63 diff --git a/test/snippet/core/detail/popcount.cpp b/test/snippet/core/detail/popcount.cpp deleted file mode 100644 index 34b3c43075..0000000000 --- a/test/snippet/core/detail/popcount.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include - -int main() -{ - uint8_t t0 = 0b1100'1001; - uint16_t t1 = 0b0100'0001'1110'1001; - uint32_t t2 = 0b0000'0000'0000'0000'0000'0000'0000'0000; - uint64_t t3 = 0b1000'0000'1111'0000'0000'0000'0000'0110'0000'0000'0000'0000'1110'0000'0000'0001; - - seqan3::debug_stream << std::popcount(t0) << '\n'; // 4 - seqan3::debug_stream << std::popcount(t1) << '\n'; // 7 - seqan3::debug_stream << std::popcount(t2) << '\n'; // 0 - seqan3::debug_stream << std::popcount(t3) << '\n'; // 11 - - return 0; -} diff --git a/test/snippet/core/detail/popcount.err b/test/snippet/core/detail/popcount.err deleted file mode 100644 index 0b072c8e5d..0000000000 --- a/test/snippet/core/detail/popcount.err +++ /dev/null @@ -1,4 +0,0 @@ -4 -7 -0 -11 diff --git a/test/unit/std/bit_test.cpp b/test/unit/std/bit_test.cpp index 4ba93449a4..acceb560b2 100644 --- a/test/unit/std/bit_test.cpp +++ b/test/unit/std/bit_test.cpp @@ -5,7 +5,7 @@ // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md // ----------------------------------------------------------------------------------------------------- -#include +#include #include #include diff --git a/test/unit/utility/container/aligned_allocator_test.cpp b/test/unit/utility/container/aligned_allocator_test.cpp index 4c738bc726..4e965eed0d 100644 --- a/test/unit/utility/container/aligned_allocator_test.cpp +++ b/test/unit/utility/container/aligned_allocator_test.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include From d081e6653114614296b25c6797af7c7d8621cc45 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Mon, 28 Mar 2022 17:44:21 +0200 Subject: [PATCH 22/22] [MISC] update core_language --- .../configuration/align_config_output.hpp | 2 +- .../configuration/align_config_score_type.hpp | 2 +- .../matrix/detail/affine_cell_proxy.hpp | 2 +- .../matrix/detail/alignment_optimum.hpp | 2 +- .../alignment_score_matrix_one_column.hpp | 2 +- ...alignment_score_matrix_one_column_base.hpp | 2 +- .../detail/alignment_score_matrix_proxy.hpp | 2 +- .../combined_score_and_trace_matrix.hpp | 2 +- .../matrix/detail/matrix_coordinate.hpp | 2 +- .../detail/score_matrix_single_column.hpp | 2 +- .../matrix/detail/trace_matrix_full.hpp | 2 +- .../detail/alignment_algorithm_state.hpp | 2 +- .../pairwise/policy/affine_gap_policy.hpp | 2 +- .../policy/simd_affine_gap_policy.hpp | 2 +- .../alignment/scoring/scoring_scheme_base.hpp | 2 +- .../composite/alphabet_tuple_base.hpp | 1 - include/seqan3/alphabet/composite/detail.hpp | 27 +- include/seqan3/alphabet/concept.hpp | 2 +- .../seqan3/alphabet/detail/alphabet_proxy.hpp | 3 +- include/seqan3/alphabet/detail/concept.hpp | 63 +++++ include/seqan3/argument_parser/validators.hpp | 2 +- include/seqan3/core/concept/all.hpp | 2 +- include/seqan3/core/platform.hpp | 11 + include/seqan3/io/detail/magic_header.hpp | 4 +- include/seqan3/io/detail/misc_input.hpp | 2 +- include/seqan3/io/detail/misc_output.hpp | 2 +- .../seqan3/io/sam_file/sam_tag_dictionary.hpp | 1 - .../search/configuration/max_error_common.hpp | 2 +- .../utility/char_operations/transform.hpp | 2 +- include/seqan3/utility/concept.hpp | 202 +++++++++++++++ include/seqan3/utility/concept/all.hpp | 7 +- .../concept/exposition_only/core_language.hpp | 232 +----------------- .../seqan3/utility/simd/views/iota_simd.hpp | 2 +- include/seqan3/utility/views/convert.hpp | 2 +- ...sion_from_@source_alphabet@_inherit.cpp.in | 2 +- ...implicit_conversion_from_rna15_inherit.cpp | 2 +- ..._implicit_conversion_from_rna4_inherit.cpp | 2 +- ..._implicit_conversion_from_rna5_inherit.cpp | 2 +- ...implicit_conversion_from_dna15_inherit.cpp | 2 +- ..._implicit_conversion_from_dna4_inherit.cpp | 2 +- ..._implicit_conversion_from_dna5_inherit.cpp | 2 +- test/unit/alphabet/detail/CMakeLists.txt | 1 + .../detail}/comparison_test.cpp | 7 +- .../alphabet/semi_alphabet_test_template.hpp | 2 +- test/unit/std/concept/CMakeLists.txt | 1 - test/unit/std/concept/object_test.cpp | 2 +- test/unit/utility/detail/CMakeLists.txt | 2 +- ...cept_test.cpp => utility_concept_test.cpp} | 2 +- 48 files changed, 349 insertions(+), 281 deletions(-) create mode 100644 include/seqan3/alphabet/detail/concept.hpp create mode 100644 include/seqan3/utility/concept.hpp rename test/unit/{std/concept => alphabet/detail}/comparison_test.cpp (89%) rename test/unit/utility/detail/{exposition_only_concept_test.cpp => utility_concept_test.cpp} (97%) diff --git a/include/seqan3/alignment/configuration/align_config_output.hpp b/include/seqan3/alignment/configuration/align_config_output.hpp index 94db194084..dfeb25aca8 100644 --- a/include/seqan3/alignment/configuration/align_config_output.hpp +++ b/include/seqan3/alignment/configuration/align_config_output.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include namespace seqan3::align_cfg { diff --git a/include/seqan3/alignment/configuration/align_config_score_type.hpp b/include/seqan3/alignment/configuration/align_config_score_type.hpp index b1478c15fd..22fbdb5171 100644 --- a/include/seqan3/alignment/configuration/align_config_score_type.hpp +++ b/include/seqan3/alignment/configuration/align_config_score_type.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include namespace seqan3::align_cfg { diff --git a/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp b/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp index 37bb6b8155..39079b074b 100644 --- a/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp +++ b/include/seqan3/alignment/matrix/detail/affine_cell_proxy.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp b/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp index 7d59b5f8d9..4993a11423 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_optimum.hpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp index cfbd077bd5..5c726a93d5 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column.hpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_base.hpp b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_base.hpp index 08728d154e..692ac456d8 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_base.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_one_column_base.hpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_proxy.hpp b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_proxy.hpp index 788669e588..4c28255d80 100644 --- a/include/seqan3/alignment/matrix/detail/alignment_score_matrix_proxy.hpp +++ b/include/seqan3/alignment/matrix/detail/alignment_score_matrix_proxy.hpp @@ -12,7 +12,7 @@ #pragma once -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/alignment/matrix/detail/combined_score_and_trace_matrix.hpp b/include/seqan3/alignment/matrix/detail/combined_score_and_trace_matrix.hpp index 839df4300f..3a9cf983b5 100644 --- a/include/seqan3/alignment/matrix/detail/combined_score_and_trace_matrix.hpp +++ b/include/seqan3/alignment/matrix/detail/combined_score_and_trace_matrix.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp b/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp index b6460941a8..2e24be9f01 100644 --- a/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp +++ b/include/seqan3/alignment/matrix/detail/matrix_coordinate.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/include/seqan3/alignment/matrix/detail/score_matrix_single_column.hpp b/include/seqan3/alignment/matrix/detail/score_matrix_single_column.hpp index d079364737..a423d3dfd5 100644 --- a/include/seqan3/alignment/matrix/detail/score_matrix_single_column.hpp +++ b/include/seqan3/alignment/matrix/detail/score_matrix_single_column.hpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp index 378a2530b4..c75d26af78 100644 --- a/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp +++ b/include/seqan3/alignment/matrix/detail/trace_matrix_full.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/seqan3/alignment/pairwise/detail/alignment_algorithm_state.hpp b/include/seqan3/alignment/pairwise/detail/alignment_algorithm_state.hpp index a460da1230..37a4fec06f 100644 --- a/include/seqan3/alignment/pairwise/detail/alignment_algorithm_state.hpp +++ b/include/seqan3/alignment/pairwise/detail/alignment_algorithm_state.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/alignment/pairwise/policy/affine_gap_policy.hpp b/include/seqan3/alignment/pairwise/policy/affine_gap_policy.hpp index c8980ef35e..ce64703ee2 100644 --- a/include/seqan3/alignment/pairwise/policy/affine_gap_policy.hpp +++ b/include/seqan3/alignment/pairwise/policy/affine_gap_policy.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include namespace seqan3::detail { diff --git a/include/seqan3/alignment/pairwise/policy/simd_affine_gap_policy.hpp b/include/seqan3/alignment/pairwise/policy/simd_affine_gap_policy.hpp index f8aaa07b98..64a5cc138c 100644 --- a/include/seqan3/alignment/pairwise/policy/simd_affine_gap_policy.hpp +++ b/include/seqan3/alignment/pairwise/policy/simd_affine_gap_policy.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/seqan3/alignment/scoring/scoring_scheme_base.hpp b/include/seqan3/alignment/scoring/scoring_scheme_base.hpp index ebe2dc5d1a..a5d2c281dd 100644 --- a/include/seqan3/alignment/scoring/scoring_scheme_base.hpp +++ b/include/seqan3/alignment/scoring/scoring_scheme_base.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #if SEQAN3_WITH_CEREAL #include diff --git a/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp b/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp index 31fac8d9c6..44713086bf 100644 --- a/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp +++ b/include/seqan3/alphabet/composite/alphabet_tuple_base.hpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/include/seqan3/alphabet/composite/detail.hpp b/include/seqan3/alphabet/composite/detail.hpp index b3e3cae7ca..2a40ba27e7 100644 --- a/include/seqan3/alphabet/composite/detail.hpp +++ b/include/seqan3/alphabet/composite/detail.hpp @@ -13,7 +13,8 @@ #pragma once #include -#include +#include +#include #include #include @@ -131,6 +132,7 @@ using recursive_required_types_t = typename recursive_required_types::type; // ------------------------------------------------------------------ /*!\brief 'Callable' helper class that is invokable by meta::invoke. + * \ingroup alphabet_composite * Returns a std::true_type if the `type` is constructable from `T`. */ template @@ -142,6 +144,7 @@ struct constructible_from }; /*!\brief 'Callable' helper class that is invokable by meta::invoke. + * \ingroup alphabet_composite * Returns a std::true_type if the `T` is implicitly convertible to `type`. */ template @@ -153,6 +156,7 @@ struct implicitly_convertible_from }; /*!\brief 'Callable' helper class that is invokable by meta::invoke. + * \ingroup alphabet_composite * Returns a std::true_type if the `type` is assignable from `T`. */ template @@ -164,6 +168,7 @@ struct assignable_from }; /*!\brief 'Callable' helper class that is invokable by meta::invoke. + * \ingroup alphabet_composite * Returns a std::true_type if the `type` is weakly equality comparable to `T`. */ template @@ -175,6 +180,7 @@ struct weakly_equality_comparable_with_ }; /*!\brief 'Callable' helper class that is invokable by meta::invoke. + * \ingroup alphabet_composite * Returns a std::true_type if the `type` is comparable via <,<=,>,>= to `T`. */ template @@ -185,6 +191,25 @@ struct weakly_ordered_with_ using invoke = std::integral_constant>; }; +// ------------------------------------------------------------------ +// Concept traits helper +// ------------------------------------------------------------------ + +/*!\brief Binary type trait that behaves like the seqan3::detail::weakly_equality_comparable_with concept. + * \ingroup alphabet_composite + */ +template +struct weakly_equality_comparable_with_trait : + std::integral_constant> +{}; + +/*!\brief Binary type trait that behaves like the seqan3::detail::weakly_ordered_with concept. + * \ingroup alphabet_composite + */ +template +struct weakly_ordered_with_trait : std::integral_constant> +{}; + } // namespace seqan3::detail // ------------------------------------------------------------------ diff --git a/include/seqan3/alphabet/concept.hpp b/include/seqan3/alphabet/concept.hpp index 9caf796ebe..5f2d6605a4 100644 --- a/include/seqan3/alphabet/concept.hpp +++ b/include/seqan3/alphabet/concept.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/seqan3/alphabet/detail/alphabet_proxy.hpp b/include/seqan3/alphabet/detail/alphabet_proxy.hpp index 775c0bc391..a08c0f40b9 100644 --- a/include/seqan3/alphabet/detail/alphabet_proxy.hpp +++ b/include/seqan3/alphabet/detail/alphabet_proxy.hpp @@ -15,10 +15,11 @@ #include #include +#include #include #include #include -#include +#include #include namespace seqan3 diff --git a/include/seqan3/alphabet/detail/concept.hpp b/include/seqan3/alphabet/detail/concept.hpp new file mode 100644 index 0000000000..5e90948ae7 --- /dev/null +++ b/include/seqan3/alphabet/detail/concept.hpp @@ -0,0 +1,63 @@ +// ----------------------------------------------------------------------------------------------------- +// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin +// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik +// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License +// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md +// ----------------------------------------------------------------------------------------------------- + +/*!\file + * \author Enrico Seiler + * \brief Provides alphabet helper concepts. + */ + +#pragma once + +#include + +#include + +namespace seqan3::detail +{ +/*!\interface seqan3::detail::weakly_equality_comparable_with <> + * \ingroup alphabet + * \tparam t1 The first type to compare. + * \tparam t2 The second type to compare. + * \brief Requires the two operands to be comparable with `==` and `!=` in both directions. + */ +//!\cond +template +concept weakly_equality_comparable_with = + requires(std::remove_reference_t const & t, + std::remove_reference_t const & u) + { + requires std::convertible_to; + requires std::convertible_to; + requires std::convertible_to; + requires std::convertible_to; + }; +//!\endcond + +/*!\interface seqan3::detail::weakly_ordered_with <> + * \ingroup alphabet + * \tparam t1 The first type to compare. + * \tparam t2 The second type to compare. + * \brief Requires the two operands to be comparable with `<`, `<=`, `>` and `>=` in both directions. + */ +//!\cond +template +concept weakly_ordered_with = requires (std::remove_reference_t const & v1, + std::remove_reference_t const & v2) +{ + requires std::convertible_to; + requires std::convertible_to; + requires std::convertible_to v2), bool>; + requires std::convertible_to= v2), bool>; + + requires std::convertible_to; + requires std::convertible_to; + requires std::convertible_to v1), bool>; + requires std::convertible_to= v1), bool>; +}; +//!\endcond + +} // seqan3::detail diff --git a/include/seqan3/argument_parser/validators.hpp b/include/seqan3/argument_parser/validators.hpp index 45bc16d013..92e2ab9e70 100644 --- a/include/seqan3/argument_parser/validators.hpp +++ b/include/seqan3/argument_parser/validators.hpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/seqan3/core/concept/all.hpp b/include/seqan3/core/concept/all.hpp index 57ca046aca..6f5d03f1db 100644 --- a/include/seqan3/core/concept/all.hpp +++ b/include/seqan3/core/concept/all.hpp @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include /*!\defgroup core_concept Concept diff --git a/include/seqan3/core/platform.hpp b/include/seqan3/core/platform.hpp index fead734fb9..5de0d7deea 100644 --- a/include/seqan3/core/platform.hpp +++ b/include/seqan3/core/platform.hpp @@ -187,6 +187,17 @@ # endif #endif +//!\brief Deprecation message for SeqAn 3.3.0 release. +#ifndef SEQAN3_REMOVE_DEPRECATED_330 +# ifndef SEQAN3_DEPRECATED_330 +# ifndef SEQAN3_DISABLE_DEPRECATED_WARNINGS +# define SEQAN3_DEPRECATED_330 [[deprecated("This will be removed in SeqAn-3.3.0; please see the documentation.")]] +# else +# define SEQAN3_DEPRECATED_330 /**/ +# endif +# endif +#endif + // ============================================================================ // Workarounds // ============================================================================ diff --git a/include/seqan3/io/detail/magic_header.hpp b/include/seqan3/io/detail/magic_header.hpp index c3eec31bc0..46bb6174ad 100644 --- a/include/seqan3/io/detail/magic_header.hpp +++ b/include/seqan3/io/detail/magic_header.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -96,7 +96,7 @@ struct bgzf_compression template static bool validate_header(std::span header) { - static_assert(seqan3::detail::weakly_equality_comparable_with, + static_assert(std::equality_comparable_with, "The given char type of the span must be comparable with char."); return (header[0] == magic_header[0] && // GZ_ID1 diff --git a/include/seqan3/io/detail/misc_input.hpp b/include/seqan3/io/detail/misc_input.hpp index c3a09cbcd2..667793e985 100644 --- a/include/seqan3/io/detail/misc_input.hpp +++ b/include/seqan3/io/detail/misc_input.hpp @@ -31,7 +31,7 @@ #endif #include #include -#include +#include namespace seqan3::detail { diff --git a/include/seqan3/io/detail/misc_output.hpp b/include/seqan3/io/detail/misc_output.hpp index 1610d65aeb..5a2e61731d 100644 --- a/include/seqan3/io/detail/misc_output.hpp +++ b/include/seqan3/io/detail/misc_output.hpp @@ -26,7 +26,7 @@ #include #endif #include -#include +#include namespace seqan3::detail { diff --git a/include/seqan3/io/sam_file/sam_tag_dictionary.hpp b/include/seqan3/io/sam_file/sam_tag_dictionary.hpp index 919dbeca75..f32744b707 100644 --- a/include/seqan3/io/sam_file/sam_tag_dictionary.hpp +++ b/include/seqan3/io/sam_file/sam_tag_dictionary.hpp @@ -18,7 +18,6 @@ #include #include -#include #include namespace seqan3::detail diff --git a/include/seqan3/search/configuration/max_error_common.hpp b/include/seqan3/search/configuration/max_error_common.hpp index a705ae0756..8fb49a8784 100644 --- a/include/seqan3/search/configuration/max_error_common.hpp +++ b/include/seqan3/search/configuration/max_error_common.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include namespace seqan3::search_cfg { diff --git a/include/seqan3/utility/char_operations/transform.hpp b/include/seqan3/utility/char_operations/transform.hpp index 013e920029..ca2cb0a6aa 100644 --- a/include/seqan3/utility/char_operations/transform.hpp +++ b/include/seqan3/utility/char_operations/transform.hpp @@ -14,7 +14,7 @@ #include -#include +#include #include namespace seqan3::detail diff --git a/include/seqan3/utility/concept.hpp b/include/seqan3/utility/concept.hpp new file mode 100644 index 0000000000..953e14656e --- /dev/null +++ b/include/seqan3/utility/concept.hpp @@ -0,0 +1,202 @@ +// ----------------------------------------------------------------------------------------------------- +// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin +// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik +// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License +// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md +// ----------------------------------------------------------------------------------------------------- + +/*!\file + * \brief Provides concepts that do not have equivalents in C++20. + * \author Hannes Hauswedell + */ + +#pragma once + +#include +#include + +#include + +/*!\defgroup utility_concept Concept + * \brief Provides various general purpose concepts. + * \ingroup utility + * \see utility + */ + +namespace seqan3 +{ +/*!\interface seqan3::implicitly_convertible_to <> + * \ingroup utility_concept + * \brief Checks whether `from` can be implicityly converted to `to`. + * + * \details + * + * The STL concept `convertible_to` checks for implicit and explicit convertability. + * + * \noapi + */ +//!\cond +template +concept implicitly_convertible_to = std::is_convertible_v; +//!\endcond + +/*!\interface seqan3::explicitly_convertible_to <> + * \ingroup utility_concept + * \brief Checks whether `from` can be explicitly converted to `to`. + * + * \details + * + * The STL concept `convertible_to` checks for implicit and explicit convertability. + * + * \noapi + */ +//!\cond +template +concept explicitly_convertible_to = requires (from v) { { static_cast(v)}; }; +//!\endcond + +/*!\interface seqan3::arithmetic <> + * \ingroup utility_concept + * \brief A type that satisfies std::is_arithmetic_v. + * + * \details + * + * \sa https://en.cppreference.com/w/cpp/types/is_arithmetic + * + * \noapi + */ +//!\cond +template +concept arithmetic = std::is_arithmetic_v; +//!\endcond + +/*!\interface seqan3::floating_point <> + * \ingroup utility_concept + * \brief An alias for `std::floating_point`. + * + * \details + * + * \sa https://en.cppreference.com/w/cpp/concepts/floating_point + * + * \deprecated Use std::floating_point instead. + * + * \noapi + */ +//!\cond +namespace deprecated +{ +template +concept floating_point = arithmetic && std::is_floating_point_v; +} // namespace deprecated + +template +SEQAN3_DEPRECATED_330 constexpr bool floating_point = deprecated::floating_point; +//!\endcond + +/*!\interface seqan3::builtin_character <> + * \ingroup utility_concept + * \extends std::integral + * \brief This concept encompasses exactly the types `char`, `signed char`, `unsigned char`, `wchar_t`, + * `char16_t` and `char32_t`. + * + * \details + * + * \noapi + */ +//!\cond + +template +concept builtin_character = std::integral && + (std::same_as || + std::same_as || + std::same_as || +#ifdef __cpp_char8_t + std::same_as || +#endif + std::same_as || + std::same_as || + std::same_as); +//!\endcond + +/*!\interface seqan3::trivially_destructible <> + * \ingroup utility_concept + * \extends std::destructible + * \brief A type that satisfies std::is_trivially_destructible_v. + * + * \details + * + * \sa https://en.cppreference.com/w/cpp/types/is_destructible + * + * \noapi + */ +//!\cond +template +concept trivially_destructible = std::destructible && std::is_trivially_destructible_v; +//!\endcond + +/*!\interface seqan3::trivially_copyable + * \ingroup utility_concept + * \brief A type that satisfies std::is_trivially_copyable_v. + * \extends std::copyable + * + * \details + * + * \sa https://en.cppreference.com/w/cpp/types/is_trivially_copyable + * + * \noapi + */ +//!\cond +template +concept trivially_copyable = std::copyable && std::is_trivially_copyable_v; +//!\endcond + +/*!\interface seqan3::trivial + * \ingroup utility_concept + * \brief A type that satisfies seqan3::trivially_copyable and seqan3::trivially_destructible. + * \extends seqan3::trivially_copyable + * \extends seqan3::trivially_destructible + * + * \details + * + * \sa https://en.cppreference.com/w/cpp/types/is_trivial + * + * \noapi + */ +//!\cond +template +concept trivial = trivially_copyable && trivially_destructible && std::is_trivial_v; +//!\endcond + +/*!\interface seqan3::standard_layout + * \ingroup utility_concept + * \brief Resolves to std::is_standard_layout_v. + * + * \details + * + * \sa https://en.cppreference.com/w/cpp/types/is_standard_layout + * + * \noapi + */ +//!\cond +template +concept standard_layout = std::is_standard_layout_v; +//!\endcond + +/*!\interface seqan3::weakly_assignable_from + * \ingroup utility_concept + * \brief Resolves to std::is_assignable_v. + * + * \details + * + * \note This requires less than std::assignable_from, it simply tests if the expression `std::declval() = + * std::declval()` is well-formed. + * + * \sa https://en.cppreference.com/w/cpp/types/is_assignable + * + * \noapi + */ +//!\cond +template +concept weakly_assignable_from = std::is_assignable_v; +//!\endcond +} // namespace seqan3 diff --git a/include/seqan3/utility/concept/all.hpp b/include/seqan3/utility/concept/all.hpp index 1275112a94..b3b52d196f 100644 --- a/include/seqan3/utility/concept/all.hpp +++ b/include/seqan3/utility/concept/all.hpp @@ -15,8 +15,5 @@ #include -/*!\defgroup utility_concept Concept - * \brief Provides various general purpose concepts. - * \ingroup utility - * \see utility - */ +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0.") diff --git a/include/seqan3/utility/concept/exposition_only/core_language.hpp b/include/seqan3/utility/concept/exposition_only/core_language.hpp index dd48cb9d68..54bc4c0b1c 100644 --- a/include/seqan3/utility/concept/exposition_only/core_language.hpp +++ b/include/seqan3/utility/concept/exposition_only/core_language.hpp @@ -12,233 +12,7 @@ #pragma once -#include -#include +#include -#include - -namespace seqan3::detail -{ -/*!\interface seqan3::detail::weakly_equality_comparable_with <> - * \ingroup utility_concept - * \tparam t1 The first type to compare. - * \tparam t2 The second type to compare. - * \brief Requires the two operands to be comparable with `==` and `!=` in both directions. - */ -//!\cond -template -concept weakly_equality_comparable_with = - requires(std::remove_reference_t const & t, - std::remove_reference_t const & u) - { - requires std::convertible_to; - requires std::convertible_to; - requires std::convertible_to; - requires std::convertible_to; - }; -//!\endcond - -//!\brief Binary type trait that behaves like the seqan3::detail::weakly_equality_comparable_with concept. -//!\ingroup utility_concept -template -struct weakly_equality_comparable_with_trait : - std::integral_constant> -{}; - -/*!\interface seqan3::detail::weakly_ordered_with <> - * \ingroup utility_concept - * \tparam t1 The first type to compare. - * \tparam t2 The second type to compare. - * \brief Requires the two operands to be comparable with `<`, `<=`, `>` and `>=` in both directions. - */ -//!\cond -template -concept weakly_ordered_with = requires (std::remove_reference_t const & v1, - std::remove_reference_t const & v2) -{ - requires std::convertible_to; - requires std::convertible_to; - requires std::convertible_to v2), bool>; - requires std::convertible_to= v2), bool>; - - requires std::convertible_to; - requires std::convertible_to; - requires std::convertible_to v1), bool>; - requires std::convertible_to= v1), bool>; -}; -//!\endcond - -//!\brief Binary type trait that behaves like the seqan3::detail::weakly_ordered_with concept. -//!\ingroup utility_concept -template -struct weakly_ordered_with_trait : std::integral_constant> -{}; - -} // seqan3::detail - -namespace seqan3 -{ -/*!\interface seqan3::implicitly_convertible_to <> - * \ingroup utility_concept - * \brief Resolves to `std::ranges::implicitly_convertible_to()`. - * - * \details - * - * \noapi - */ -//!\cond -template -concept implicitly_convertible_to = std::is_convertible_v; -//!\endcond - -/*!\interface seqan3::explicitly_convertible_to <> - * \ingroup utility_concept - * \brief Resolves to `std::ranges::explicitly_convertible_to()`. - * - * \details - * - * \noapi - */ -//!\cond -template -concept explicitly_convertible_to = requires (t vt) { { static_cast(vt)}; }; -//!\endcond - -/*!\interface seqan3::arithmetic <> - * \ingroup utility_concept - * \brief A type that satisfies std::is_arithmetic_v. - * - * \details - * - * \sa https://en.cppreference.com/w/cpp/types/is_arithmetic - * - * \noapi - */ -//!\cond -template -concept arithmetic = std::is_arithmetic_v; -//!\endcond - -/*!\interface seqan3::floating_point <> - * \ingroup utility_concept - * \extends seqan3::arithmetic - * \brief An arithmetic type that also satisfies std::is_floating_point_v. - * - * \details - * - * \sa https://en.cppreference.com/w/cpp/types/is_floating_point - * - * \noapi - */ -//!\cond -template -concept floating_point = arithmetic && std::is_floating_point_v; -//!\endcond - -/*!\interface seqan3::builtin_character <> - * \ingroup utility_concept - * \extends std::integral - * \brief This concept encompasses exactly the types `char`, `signed char`, `unsigned char`, `wchar_t`, - * `char16_t` and `char32_t`. - * - * \details - * - * \noapi - */ -//!\cond - -template -concept builtin_character = std::integral && - (std::same_as || - std::same_as || - std::same_as || -#ifdef __cpp_char8_t - std::same_as || -#endif - std::same_as || - std::same_as || - std::same_as); -//!\endcond - -/*!\interface seqan3::trivially_destructible <> - * \ingroup utility_concept - * \extends std::destructible - * \brief A type that satisfies std::is_trivially_destructible_v. - * - * \details - * - * \sa https://en.cppreference.com/w/cpp/types/is_destructible - * - * \noapi - */ -//!\cond -template -concept trivially_destructible = std::destructible && std::is_trivially_destructible_v; -//!\endcond - -/*!\interface seqan3::trivially_copyable - * \ingroup utility_concept - * \brief A type that satisfies std::is_trivially_copyable_v. - * \extends std::copyable - * - * \details - * - * \sa https://en.cppreference.com/w/cpp/types/is_trivially_copyable - * - * \noapi - */ -//!\cond -template -concept trivially_copyable = std::copyable && std::is_trivially_copyable_v; -//!\endcond - -/*!\interface seqan3::trivial - * \ingroup utility_concept - * \brief A type that satisfies seqan3::trivially_copyable and seqan3::trivially_destructible. - * \extends seqan3::trivially_copyable - * \extends seqan3::trivially_destructible - * - * \details - * - * \sa https://en.cppreference.com/w/cpp/types/is_trivial - * - * \noapi - */ -//!\cond -template -concept trivial = trivially_copyable && trivially_destructible && std::is_trivial_v; -//!\endcond - -/*!\interface seqan3::standard_layout - * \ingroup utility_concept - * \brief Resolves to std::is_standard_layout_v. - * - * \details - * - * \sa https://en.cppreference.com/w/cpp/types/is_standard_layout - * - * \noapi - */ -//!\cond -template -concept standard_layout = std::is_standard_layout_v; -//!\endcond - -/*!\interface seqan3::weakly_assignable_from - * \ingroup utility_concept - * \brief Resolves to std::is_assignable_v. - * - * \details - * - * \note This requires less than std::assignable_from, it simply tests if the expression `std::declval() = - * std::declval()` is well-formed. - * - * \sa https://en.cppreference.com/w/cpp/types/is_assignable - * - * \noapi - */ -//!\cond -template -concept weakly_assignable_from = std::is_assignable_v; -//!\endcond -} // namespace seqan3 +SEQAN3_DEPRECATED_HEADER( + "This header is deprecated and will be removed in SeqAn-3.3.0; Please #include instead.") diff --git a/include/seqan3/utility/simd/views/iota_simd.hpp b/include/seqan3/utility/simd/views/iota_simd.hpp index 4ba261a44a..4b5fe1940c 100644 --- a/include/seqan3/utility/simd/views/iota_simd.hpp +++ b/include/seqan3/utility/simd/views/iota_simd.hpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include #include diff --git a/include/seqan3/utility/views/convert.hpp b/include/seqan3/utility/views/convert.hpp index 6406cc2aab..1c8a74bb1e 100644 --- a/include/seqan3/utility/views/convert.hpp +++ b/include/seqan3/utility/views/convert.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include namespace seqan3::views { diff --git a/test/snippet/alphabet/nucleotide/@target_alphabet@_implicit_conversion_from_@source_alphabet@_inherit.cpp.in b/test/snippet/alphabet/nucleotide/@target_alphabet@_implicit_conversion_from_@source_alphabet@_inherit.cpp.in index e4148bc234..92fd6cac48 100644 --- a/test/snippet/alphabet/nucleotide/@target_alphabet@_implicit_conversion_from_@source_alphabet@_inherit.cpp.in +++ b/test/snippet/alphabet/nucleotide/@target_alphabet@_implicit_conversion_from_@source_alphabet@_inherit.cpp.in @@ -21,7 +21,7 @@ int main() } //![main] -#include +#include static_assert(seqan3::implicitly_convertible_to); static_assert(!seqan3::implicitly_convertible_to); diff --git a/test/snippet/alphabet/nucleotide/dna15_implicit_conversion_from_rna15_inherit.cpp b/test/snippet/alphabet/nucleotide/dna15_implicit_conversion_from_rna15_inherit.cpp index b825cf4386..342358e629 100644 --- a/test/snippet/alphabet/nucleotide/dna15_implicit_conversion_from_rna15_inherit.cpp +++ b/test/snippet/alphabet/nucleotide/dna15_implicit_conversion_from_rna15_inherit.cpp @@ -21,7 +21,7 @@ int main() } //![main] -#include +#include static_assert(seqan3::implicitly_convertible_to); static_assert(!seqan3::implicitly_convertible_to); diff --git a/test/snippet/alphabet/nucleotide/dna4_implicit_conversion_from_rna4_inherit.cpp b/test/snippet/alphabet/nucleotide/dna4_implicit_conversion_from_rna4_inherit.cpp index 0ee801814f..b2bc4af6f0 100644 --- a/test/snippet/alphabet/nucleotide/dna4_implicit_conversion_from_rna4_inherit.cpp +++ b/test/snippet/alphabet/nucleotide/dna4_implicit_conversion_from_rna4_inherit.cpp @@ -21,7 +21,7 @@ int main() } //![main] -#include +#include static_assert(seqan3::implicitly_convertible_to); static_assert(!seqan3::implicitly_convertible_to); diff --git a/test/snippet/alphabet/nucleotide/dna5_implicit_conversion_from_rna5_inherit.cpp b/test/snippet/alphabet/nucleotide/dna5_implicit_conversion_from_rna5_inherit.cpp index 23aa292185..6c5f3c68aa 100644 --- a/test/snippet/alphabet/nucleotide/dna5_implicit_conversion_from_rna5_inherit.cpp +++ b/test/snippet/alphabet/nucleotide/dna5_implicit_conversion_from_rna5_inherit.cpp @@ -21,7 +21,7 @@ int main() } //![main] -#include +#include static_assert(seqan3::implicitly_convertible_to); static_assert(!seqan3::implicitly_convertible_to); diff --git a/test/snippet/alphabet/nucleotide/rna15_implicit_conversion_from_dna15_inherit.cpp b/test/snippet/alphabet/nucleotide/rna15_implicit_conversion_from_dna15_inherit.cpp index d1d8bf23cc..9267fb292c 100644 --- a/test/snippet/alphabet/nucleotide/rna15_implicit_conversion_from_dna15_inherit.cpp +++ b/test/snippet/alphabet/nucleotide/rna15_implicit_conversion_from_dna15_inherit.cpp @@ -21,7 +21,7 @@ int main() } //![main] -#include +#include static_assert(seqan3::implicitly_convertible_to); static_assert(!seqan3::implicitly_convertible_to); diff --git a/test/snippet/alphabet/nucleotide/rna4_implicit_conversion_from_dna4_inherit.cpp b/test/snippet/alphabet/nucleotide/rna4_implicit_conversion_from_dna4_inherit.cpp index 2a5ccd0454..aca2dfb162 100644 --- a/test/snippet/alphabet/nucleotide/rna4_implicit_conversion_from_dna4_inherit.cpp +++ b/test/snippet/alphabet/nucleotide/rna4_implicit_conversion_from_dna4_inherit.cpp @@ -21,7 +21,7 @@ int main() } //![main] -#include +#include static_assert(seqan3::implicitly_convertible_to); static_assert(!seqan3::implicitly_convertible_to); diff --git a/test/snippet/alphabet/nucleotide/rna5_implicit_conversion_from_dna5_inherit.cpp b/test/snippet/alphabet/nucleotide/rna5_implicit_conversion_from_dna5_inherit.cpp index 6f3d6e2dfd..fc8e901f42 100644 --- a/test/snippet/alphabet/nucleotide/rna5_implicit_conversion_from_dna5_inherit.cpp +++ b/test/snippet/alphabet/nucleotide/rna5_implicit_conversion_from_dna5_inherit.cpp @@ -21,7 +21,7 @@ int main() } //![main] -#include +#include static_assert(seqan3::implicitly_convertible_to); static_assert(!seqan3::implicitly_convertible_to); diff --git a/test/unit/alphabet/detail/CMakeLists.txt b/test/unit/alphabet/detail/CMakeLists.txt index 7a3cfffbfe..136d2ecda8 100644 --- a/test/unit/alphabet/detail/CMakeLists.txt +++ b/test/unit/alphabet/detail/CMakeLists.txt @@ -1,4 +1,5 @@ seqan3_test (alphabet_proxy_test.cpp) +seqan3_test (comparison_test.cpp) seqan3_test (debug_stream_alphabet_dna4_test.cpp) seqan3_test (debug_stream_alphabet_mask_test.cpp) seqan3_test (debug_stream_alphabet_test.cpp) diff --git a/test/unit/std/concept/comparison_test.cpp b/test/unit/alphabet/detail/comparison_test.cpp similarity index 89% rename from test/unit/std/concept/comparison_test.cpp rename to test/unit/alphabet/detail/comparison_test.cpp index 7b53da8fc3..95e2182b3c 100644 --- a/test/unit/std/concept/comparison_test.cpp +++ b/test/unit/alphabet/detail/comparison_test.cpp @@ -7,12 +7,9 @@ #include -#include -#include +#include -#include - -#include "auxiliary.hpp" +#include "../../std/concept/auxiliary.hpp" TEST(comparison_concepts, weakly_equality_comparable_with) { diff --git a/test/unit/alphabet/semi_alphabet_test_template.hpp b/test/unit/alphabet/semi_alphabet_test_template.hpp index 52dea639b9..245026df3c 100644 --- a/test/unit/alphabet/semi_alphabet_test_template.hpp +++ b/test/unit/alphabet/semi_alphabet_test_template.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include template using semi_alphabet_test = ::testing::Test; diff --git a/test/unit/std/concept/CMakeLists.txt b/test/unit/std/concept/CMakeLists.txt index 8864b559ea..161c7a9a62 100644 --- a/test/unit/std/concept/CMakeLists.txt +++ b/test/unit/std/concept/CMakeLists.txt @@ -1,4 +1,3 @@ -seqan3_test (comparison_test.cpp) seqan3_test (object_test.cpp) seqan3_test (callable_test.cpp) seqan3_test (iterator_test.cpp) diff --git a/test/unit/std/concept/object_test.cpp b/test/unit/std/concept/object_test.cpp index 33ba68ff15..675801aa58 100644 --- a/test/unit/std/concept/object_test.cpp +++ b/test/unit/std/concept/object_test.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "auxiliary.hpp" diff --git a/test/unit/utility/detail/CMakeLists.txt b/test/unit/utility/detail/CMakeLists.txt index a30d757ebe..5df88b2f9d 100644 --- a/test/unit/utility/detail/CMakeLists.txt +++ b/test/unit/utility/detail/CMakeLists.txt @@ -1,5 +1,5 @@ seqan3_test (bits_of_test.cpp) seqan3_test (to_little_endian_test.cpp) seqan3_test (integer_traits_test.cpp) -seqan3_test (exposition_only_concept_test.cpp) seqan3_test (type_name_as_string_test.cpp) +seqan3_test (utility_concept_test.cpp) diff --git a/test/unit/utility/detail/exposition_only_concept_test.cpp b/test/unit/utility/detail/utility_concept_test.cpp similarity index 97% rename from test/unit/utility/detail/exposition_only_concept_test.cpp rename to test/unit/utility/detail/utility_concept_test.cpp index edf9a38a53..6c5fc80410 100644 --- a/test/unit/utility/detail/exposition_only_concept_test.cpp +++ b/test/unit/utility/detail/utility_concept_test.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "../../std/concept/auxiliary.hpp"