From fe3d2bbeba694b65369201fc7e62f447915e495d Mon Sep 17 00:00:00 2001 From: wvandertoorn Date: Sun, 30 Aug 2020 11:41:47 +0200 Subject: [PATCH 1/4] [FIX] add remove_cvref to include/seqan3/std/type_traits --- include/seqan3/std/type_traits | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/include/seqan3/std/type_traits b/include/seqan3/std/type_traits index 9b0baf6e4a..717aeccbe8 100644 --- a/include/seqan3/std/type_traits +++ b/include/seqan3/std/type_traits @@ -18,6 +18,35 @@ namespace std { +// ---------------------------------------------------------------------------- +// remove_cvref_t +// ---------------------------------------------------------------------------- +#ifndef __cpp_lib_remove_cvref +/*!\brief Return the input type with `const`, `volatile` and references removed. + * \tparam t The type to operate on. + */ +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. + */ +template +using remove_cvref_t = typename remove_cvref::type; +#endif // __cpp_lib_remove_cvref + +// ---------------------------------------------------------------------------- +// type_identity +// ---------------------------------------------------------------------------- #ifndef __cpp_lib_type_identity /*!\defgroup std_type_traits type_traits * \ingroup std From d2d3dc5f54025bd9fdd3659eb899354cae9d0765 Mon Sep 17 00:00:00 2001 From: wvandertoorn Date: Mon, 31 Aug 2020 07:26:43 +0200 Subject: [PATCH 2/4] [MISC] replace seqan3::remove_cvref_t occurences with std version --- .../debug_stream_alignment.hpp | 4 +-- .../align_config_aligned_ends.hpp | 2 +- .../align_config_scoring_scheme.hpp | 2 +- .../alignment/matrix/alignment_coordinate.hpp | 4 +-- .../matrix/alignment_trace_algorithms.hpp | 8 ++--- .../detail/score_matrix_single_column.hpp | 4 +-- .../alignment/matrix/matrix_concept.hpp | 14 ++++---- .../alignment/pairwise/align_pairwise.hpp | 2 +- .../pairwise/align_result_selector.hpp | 2 +- .../pairwise/alignment_configurator.hpp | 8 ++--- .../alignment/pairwise/alignment_result.hpp | 4 +-- .../alignment/pairwise/detail/type_traits.hpp | 2 +- .../pairwise/edit_distance_algorithm.hpp | 2 +- .../pairwise/edit_distance_unbanded.hpp | 2 +- include/seqan3/alphabet/aminoacid/concept.hpp | 2 +- .../alphabet/composite/alphabet_variant.hpp | 4 +-- include/seqan3/alphabet/concept.hpp | 16 +++++----- include/seqan3/alphabet/structure/concept.hpp | 8 ++--- include/seqan3/argument_parser/auxiliary.hpp | 10 +++--- .../argument_parser/detail/format_parse.hpp | 2 +- include/seqan3/argument_parser/validators.hpp | 2 +- .../seqan3/core/algorithm/configuration.hpp | 12 +++---- .../core/algorithm/configuration_utility.hpp | 8 ++--- .../core/char_operations/predicate_detail.hpp | 4 +-- include/seqan3/core/concept/tuple.hpp | 8 ++--- .../core/detail/debug_stream_optional.hpp | 2 +- .../seqan3/core/detail/debug_stream_range.hpp | 8 ++--- .../seqan3/core/detail/debug_stream_tuple.hpp | 4 +-- .../core/detail/debug_stream_variant.hpp | 2 +- include/seqan3/core/detail/strong_type.hpp | 4 +-- .../seqan3/core/simd/debug_stream_simd.hpp | 4 +-- include/seqan3/core/simd/view_to_simd.hpp | 2 +- include/seqan3/core/tuple_utility.hpp | 6 ++-- include/seqan3/core/type_traits/basic.hpp | 5 +-- include/seqan3/core/type_traits/range.hpp | 12 +++---- include/seqan3/io/alignment_file/detail.hpp | 6 ++-- .../seqan3/io/alignment_file/format_bam.hpp | 22 ++++++------- .../seqan3/io/alignment_file/format_sam.hpp | 32 +++++++++---------- .../io/alignment_file/format_sam_base.hpp | 4 +-- include/seqan3/io/alignment_file/output.hpp | 2 +- include/seqan3/io/sequence_file/output.hpp | 2 +- include/seqan3/io/structure_file/output.hpp | 2 +- .../range/container/bitcompressed_vector.hpp | 2 +- .../seqan3/range/container/dynamic_bitset.hpp | 2 +- .../seqan3/range/container/small_vector.hpp | 2 +- .../seqan3/range/decorator/gap_decorator.hpp | 2 +- .../seqan3/range/views/async_input_buffer.hpp | 2 +- include/seqan3/range/views/drop.hpp | 4 +-- .../range/views/enforce_random_access.hpp | 2 +- include/seqan3/range/views/kmer_hash.hpp | 2 +- include/seqan3/range/views/move.hpp | 2 +- .../seqan3/range/views/pairwise_combine.hpp | 2 +- .../seqan3/range/views/single_pass_input.hpp | 2 +- include/seqan3/range/views/take.hpp | 4 +-- include/seqan3/range/views/to_char.hpp | 2 +- include/seqan3/range/views/to_lower.hpp | 2 +- include/seqan3/range/views/to_upper.hpp | 2 +- include/seqan3/range/views/translate.hpp | 8 ++--- include/seqan3/range/views/translate_join.hpp | 2 +- include/seqan3/range/views/trim_quality.hpp | 10 +++--- include/seqan3/range/views/type_reduce.hpp | 4 +-- .../seqan3/search/detail/search_traits.hpp | 2 +- include/seqan3/search/search.hpp | 2 +- include/seqan3/search/search_result.hpp | 4 +-- test/include/seqan3/test/cereal.hpp | 2 +- .../gap_decorator_rand_read_benchmark.cpp | 2 +- .../gap_decorator_rand_write_benchmark.cpp | 4 +-- .../gap_decorator_seq_read_benchmark.cpp | 2 +- .../gap_decorator_seq_write_benchmark.cpp | 4 +-- .../sam_tag_dictionary/unknown_tag.cpp | 2 +- .../aligned_sequence_test_template.hpp | 6 ++-- .../align_config_output_test.cpp | 12 +++---- .../configuration/align_config_score_test.cpp | 2 +- .../align_config_score_type_test.cpp | 2 +- .../align_config_sequence_ends_test.cpp | 4 +-- test/unit/core/my_tuple.hpp | 2 +- test/unit/core/type_traits/basic_test.cpp | 22 ++++++------- 77 files changed, 194 insertions(+), 193 deletions(-) diff --git a/include/seqan3/alignment/aligned_sequence/debug_stream_alignment.hpp b/include/seqan3/alignment/aligned_sequence/debug_stream_alignment.hpp index b9b55e8d35..f5556d88cb 100644 --- a/include/seqan3/alignment/aligned_sequence/debug_stream_alignment.hpp +++ b/include/seqan3/alignment/aligned_sequence/debug_stream_alignment.hpp @@ -98,11 +98,11 @@ namespace seqan3 template //!\cond requires (detail::debug_streamable_tuple && - detail::all_model_aligned_seq>>) + detail::all_model_aligned_seq>>) //!\endcond inline debug_stream_type & operator<<(debug_stream_type & stream, alignment_t && alignment) { - constexpr size_t sequence_count = std::tuple_size_v>; + constexpr size_t sequence_count = std::tuple_size_v>; static_assert(sequence_count >= 2, "An alignment requires at least two sequences."); diff --git a/include/seqan3/alignment/configuration/align_config_aligned_ends.hpp b/include/seqan3/alignment/configuration/align_config_aligned_ends.hpp index 6ae31539b5..882b09fccf 100644 --- a/include/seqan3/alignment/configuration/align_config_aligned_ends.hpp +++ b/include/seqan3/alignment/configuration/align_config_aligned_ends.hpp @@ -300,7 +300,7 @@ class end_gaps { detail::for_each([this](auto e) { - values[remove_cvref_t::id()] = e(); + values[std::remove_cvref_t::id()] = e(); }, args...); } //\!} diff --git a/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp b/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp index d9cd6fead1..1184ce8b0b 100644 --- a/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp +++ b/include/seqan3/alignment/configuration/align_config_scoring_scheme.hpp @@ -52,7 +52,7 @@ struct scoring_scheme : public pipeable_config_element -scoring_scheme(scheme_t) -> scoring_scheme>; +scoring_scheme(scheme_t) -> scoring_scheme>; //!\} } // namespace seqan3::align_cfg diff --git a/include/seqan3/alignment/matrix/alignment_coordinate.hpp b/include/seqan3/alignment/matrix/alignment_coordinate.hpp index 54ab481a71..90c57d7f14 100644 --- a/include/seqan3/alignment/matrix/alignment_coordinate.hpp +++ b/include/seqan3/alignment/matrix/alignment_coordinate.hpp @@ -398,8 +398,8 @@ class alignment_coordinate */ template //!\cond - requires std::same_as, alignment_coordinate> || - detail::is_value_specialisation_of_v, + requires std::same_as, alignment_coordinate> || + detail::is_value_specialisation_of_v, detail::advanceable_alignment_coordinate> //!\endcond inline debug_stream_type & operator<<(debug_stream_type & s, coordinate_type && c) diff --git a/include/seqan3/alignment/matrix/alignment_trace_algorithms.hpp b/include/seqan3/alignment/matrix/alignment_trace_algorithms.hpp index 624b35cb1e..bbdebdacd4 100644 --- a/include/seqan3/alignment/matrix/alignment_trace_algorithms.hpp +++ b/include/seqan3/alignment/matrix/alignment_trace_algorithms.hpp @@ -36,8 +36,8 @@ namespace seqan3::detail */ template //!\cond - requires matrix> && - std::same_as::value_type, trace_directions> + requires matrix> && + std::same_as::value_type, trace_directions> //!\endcond inline alignment_coordinate alignment_begin_positions(trace_matrix_t && matrix, alignment_coordinate const end_positions) @@ -99,8 +99,8 @@ template < typename query_t, typename trace_matrix_t> //!\cond - requires matrix> && - std::same_as::value_type, trace_directions> && + requires matrix> && + std::same_as::value_type, trace_directions> && detail::all_model_writable_aligned_seq> //!\endcond inline alignment_t alignment_trace(database_t && database, 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 6d506515b3..640ff84e8a 100644 --- a/include/seqan3/alignment/matrix/detail/score_matrix_single_column.hpp +++ b/include/seqan3/alignment/matrix/detail/score_matrix_single_column.hpp @@ -168,10 +168,10 @@ class score_matrix_single_column::matrix_iterator //!\brief The transform adaptor to convert the tuple from the zip view into a seqan3::detail::affine_cell_type. static constexpr auto transform_to_affine_cell = std::views::transform([] (auto && tpl) - -> affine_cell_proxy> + -> affine_cell_proxy> { using fwd_tuple_t = decltype(tpl); - return affine_cell_proxy>{std::forward(tpl)}; + return affine_cell_proxy>{std::forward(tpl)}; }); //!\brief The pointer to the underlying matrix. diff --git a/include/seqan3/alignment/matrix/matrix_concept.hpp b/include/seqan3/alignment/matrix/matrix_concept.hpp index 05403c8500..74fe962c40 100644 --- a/include/seqan3/alignment/matrix/matrix_concept.hpp +++ b/include/seqan3/alignment/matrix/matrix_concept.hpp @@ -38,35 +38,35 @@ constexpr score_type matrix_inf = std::numeric_limits::max(); */ //!\cond template -SEQAN3_CONCEPT matrix = requires(remove_cvref_t m) +SEQAN3_CONCEPT matrix = requires(std::remove_cvref_t m) { //!\endcond /*!\typedef typedef IMPLEMENTATION_DEFINED value_type; * \brief The type of an entry in the matrix. */ - typename remove_cvref_t::value_type; + typename std::remove_cvref_t::value_type; /*!\typedef typedef IMPLEMENTATION_DEFINED reference; * \brief The type of a reference to an entry in the matrix. */ - typename remove_cvref_t::reference; + typename std::remove_cvref_t::reference; /*!\typedef typedef IMPLEMENTATION_DEFINED size_type; * \brief The size type of the matrix. */ - typename remove_cvref_t::size_type; + typename std::remove_cvref_t::size_type; /*!\fn size_type cols() const noexcept; * \brief The number of columns in the matrix. */ //!\cond - SEQAN3_RETURN_TYPE_CONSTRAINT(m.cols(), std::same_as, typename remove_cvref_t::size_type); + SEQAN3_RETURN_TYPE_CONSTRAINT(m.cols(), std::same_as, typename std::remove_cvref_t::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 remove_cvref_t::size_type); + SEQAN3_RETURN_TYPE_CONSTRAINT(m.rows(), std::same_as, typename std::remove_cvref_t::size_type); //!\endcond /*!\fn reference at(matrix_coordinate coordinate) noexcept; @@ -74,7 +74,7 @@ SEQAN3_CONCEPT matrix = requires(remove_cvref_t m) */ //!\cond SEQAN3_RETURN_TYPE_CONSTRAINT(m.at(matrix_coordinate{}), - std::same_as, typename remove_cvref_t::reference); + std::same_as, typename std::remove_cvref_t::reference); //!\endcond //!\cond diff --git a/include/seqan3/alignment/pairwise/align_pairwise.hpp b/include/seqan3/alignment/pairwise/align_pairwise.hpp index 89881e9ab3..72fe6b51ec 100644 --- a/include/seqan3/alignment/pairwise/align_pairwise.hpp +++ b/include/seqan3/alignment/pairwise/align_pairwise.hpp @@ -177,7 +177,7 @@ constexpr auto align_pairwise(sequence_t && sequences, // Configure the alignment algorithm. auto && [algorithm, complete_config] = detail::alignment_configurator::configure(config); - using complete_config_t = remove_cvref_t; + using complete_config_t = std::remove_cvref_t; using traits_t = detail::alignment_configuration_traits; auto indexed_sequence_chunk_view = views::zip(seq_view, std::views::iota(0)) diff --git a/include/seqan3/alignment/pairwise/align_result_selector.hpp b/include/seqan3/alignment/pairwise/align_result_selector.hpp index b37d5bd45a..153b580a90 100644 --- a/include/seqan3/alignment/pairwise/align_result_selector.hpp +++ b/include/seqan3/alignment/pairwise/align_result_selector.hpp @@ -46,7 +46,7 @@ template //!\cond - requires is_type_specialisation_of_v, configuration> + requires is_type_specialisation_of_v, configuration> //!\endcond struct align_result_selector { diff --git a/include/seqan3/alignment/pairwise/alignment_configurator.hpp b/include/seqan3/alignment/pairwise/alignment_configurator.hpp index 86ea7b90ab..59a5cd75f6 100644 --- a/include/seqan3/alignment/pairwise/alignment_configurator.hpp +++ b/include/seqan3/alignment/pairwise/alignment_configurator.hpp @@ -302,7 +302,7 @@ struct alignment_configurator { // TODO: Instead of relying on nucleotide scoring schemes we need to be able to determine the edit distance // option via the scheme. - if constexpr (is_type_specialisation_of_v, + if constexpr (is_type_specialisation_of_v, nucleotide_scoring_scheme>) { if ((scoring_scheme.score('A'_dna15, 'A'_dna15) == 0) && @@ -377,16 +377,16 @@ struct alignment_configurator // Get the value for the sequence ends configuration. auto align_ends_cfg = cfg.get_or(align_cfg::aligned_ends{free_ends_none}).value; - using align_ends_cfg_t = remove_cvref_t; + using align_ends_cfg_t = std::remove_cvref_t; auto configure_edit_traits = [&] (auto is_semi_global) { struct edit_traits_type { - using is_semi_global_type [[maybe_unused]] = remove_cvref_t; + using is_semi_global_type [[maybe_unused]] = std::remove_cvref_t; }; - edit_distance_algorithm, edit_traits_type> algorithm{cfg}; + edit_distance_algorithm, edit_traits_type> algorithm{cfg}; return function_wrapper_t{std::move(algorithm)}; }; diff --git a/include/seqan3/alignment/pairwise/alignment_result.hpp b/include/seqan3/alignment/pairwise/alignment_result.hpp index 798f53f02f..e84c7018e0 100644 --- a/include/seqan3/alignment/pairwise/alignment_result.hpp +++ b/include/seqan3/alignment/pairwise/alignment_result.hpp @@ -394,13 +394,13 @@ namespace seqan3 */ template //!\cond - requires detail::is_type_specialisation_of_v, alignment_result> + requires detail::is_type_specialisation_of_v, alignment_result> //!\endcond inline debug_stream_type & operator<<(debug_stream_type & stream, alignment_result_t && result) { using disabled_t = std::nullopt_t *; using result_data_t = - typename detail::alignment_result_value_type_accessor>::type; + typename detail::alignment_result_value_type_accessor>::type; constexpr bool has_sequence1_id = !std::is_same_v().sequence1_id), disabled_t>; constexpr bool has_sequence2_id = !std::is_same_v().sequence2_id), disabled_t>; diff --git a/include/seqan3/alignment/pairwise/detail/type_traits.hpp b/include/seqan3/alignment/pairwise/detail/type_traits.hpp index 1b5ce1389c..d21a966b05 100644 --- a/include/seqan3/alignment/pairwise/detail/type_traits.hpp +++ b/include/seqan3/alignment/pairwise/detail/type_traits.hpp @@ -118,7 +118,7 @@ struct alignment_configuration_traits public: //!\brief Flag to indicate vectorised mode. static constexpr bool is_vectorised = - configuration_t::template exists>(); + configuration_t::template exists>(); //!\brief Flag indicating whether parallel alignment mode is enabled. static constexpr bool is_parallel = configuration_t::template exists(); //!\brief Flag indicating whether global alignment method is enabled. diff --git a/include/seqan3/alignment/pairwise/edit_distance_algorithm.hpp b/include/seqan3/alignment/pairwise/edit_distance_algorithm.hpp index a53565f843..6de61a4afe 100644 --- a/include/seqan3/alignment/pairwise/edit_distance_algorithm.hpp +++ b/include/seqan3/alignment/pairwise/edit_distance_algorithm.hpp @@ -131,7 +131,7 @@ class edit_distance_algorithm } //!\brief The alignment configuration stored on the heap. - std::shared_ptr> cfg_ptr{}; + std::shared_ptr> cfg_ptr{}; }; } // namespace seqan3::detail diff --git a/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp b/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp index ae824a3838..234cd95ad3 100644 --- a/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp +++ b/include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp @@ -591,7 +591,7 @@ class edit_distance_unbanded_trace_matrix_policy : //! Only available if default_edit_distance_trait_type::compute_sequence_alignment is true. auto alignment() const noexcept { - using alignment_t = remove_cvref_t().alignment())>; + using alignment_t = std::remove_cvref_t().alignment())>; derived_t const * self = static_cast(this); static_assert(edit_traits::compute_sequence_alignment, "alignment() can only be computed if you specify the " diff --git a/include/seqan3/alphabet/aminoacid/concept.hpp b/include/seqan3/alphabet/aminoacid/concept.hpp index 4b18010b19..2e5b5a1cc8 100644 --- a/include/seqan3/alphabet/aminoacid/concept.hpp +++ b/include/seqan3/alphabet/aminoacid/concept.hpp @@ -120,7 +120,7 @@ namespace seqan3 * follow the above instructions. */ template -inline constexpr bool enable_aminoacid = detail::adl_only::enable_aminoacid_dispatcher::dispatch>(); +inline constexpr bool enable_aminoacid = detail::adl_only::enable_aminoacid_dispatcher::dispatch>(); // ============================================================================ // concept diff --git a/include/seqan3/alphabet/composite/alphabet_variant.hpp b/include/seqan3/alphabet/composite/alphabet_variant.hpp index 08a5a2eab7..ddb0347166 100644 --- a/include/seqan3/alphabet/composite/alphabet_variant.hpp +++ b/include/seqan3/alphabet/composite/alphabet_variant.hpp @@ -440,7 +440,7 @@ class alphabet_variant : public alphabet_base>(chr)) + if (char_is_valid_for>(chr)) is_valid = true; }); @@ -572,7 +572,7 @@ class alphabet_variant : public alphabet_base; + using alt_type = std::remove_cvref_t; if (there_was_no_valid_representation && char_is_valid_for(chr)) { diff --git a/include/seqan3/alphabet/concept.hpp b/include/seqan3/alphabet/concept.hpp index 532a202bd2..2f7183ecd0 100644 --- a/include/seqan3/alphabet/concept.hpp +++ b/include/seqan3/alphabet/concept.hpp @@ -438,13 +438,13 @@ struct char_is_valid_for_fn { public: //!\brief `alph_t` with cvref removed and possibly wrapped in std::type_identity. - using s_alph_t = std::conditional_t>, - remove_cvref_t, + using s_alph_t = std::conditional_t>, + std::remove_cvref_t, std::type_identity>; SEQAN3_CPO_IMPL(3, (deferred_type_t, decltype(v)>::char_is_valid(v))) // expl. cst. SEQAN3_CPO_IMPL(2, (char_is_valid_for(v, s_alph_t{}) )) // ADL - SEQAN3_CPO_IMPL(1, (deferred_type_t, decltype(v)>::char_is_valid(v) )) // member + SEQAN3_CPO_IMPL(1, (deferred_type_t, decltype(v)>::char_is_valid(v) )) // member SEQAN3_CPO_IMPL(0, (seqan3::to_char(seqan3::assign_char_to(v, s_alph_t{})) == v )) // fallback public: @@ -619,14 +619,14 @@ struct alphabet_size_fn { public: //!\brief `alph_t` with cvref removed and possibly wrapped in std::type_identity. - using s_alph_t = std::conditional_t> && - seqan3::is_constexpr_default_constructible_v>, - remove_cvref_t, + using s_alph_t = std::conditional_t> && + seqan3::is_constexpr_default_constructible_v>, + std::remove_cvref_t, std::type_identity>; SEQAN3_CPO_IMPL(2, (deferred_type_t, decltype(v)>::alphabet_size)) // expl. cst. SEQAN3_CPO_IMPL(1, (alphabet_size(v) )) // ADL - SEQAN3_CPO_IMPL(0, (deferred_type_t, decltype(v)>::alphabet_size )) // member + SEQAN3_CPO_IMPL(0, (deferred_type_t, decltype(v)>::alphabet_size )) // member public: //!\brief Operator definition. @@ -636,7 +636,7 @@ struct alphabet_size_fn { { impl(priority_tag<2>{}, s_alph_t{}, dummy{}) }; requires noexcept(impl(priority_tag<2>{}, s_alph_t{}, dummy{})); - requires std::integral{}, s_alph_t{}, dummy{}))>>; + requires std::integral{}, s_alph_t{}, dummy{}))>>; } //!\endcond constexpr auto operator()() const noexcept diff --git a/include/seqan3/alphabet/structure/concept.hpp b/include/seqan3/alphabet/structure/concept.hpp index 9879ab9ec8..25e3401a35 100644 --- a/include/seqan3/alphabet/structure/concept.hpp +++ b/include/seqan3/alphabet/structure/concept.hpp @@ -273,16 +273,16 @@ void max_pseudoknot_depth(args_t ...) = delete; * \ingroup structure */ template > && - seqan3::is_constexpr_default_constructible_v>, - remove_cvref_t, + typename s_alph_t = std::conditional_t> && + seqan3::is_constexpr_default_constructible_v>, + std::remove_cvref_t, std::type_identity>> struct max_pseudoknot_depth_fn { public: SEQAN3_CPO_IMPL(2, (deferred_type_t, decltype(v)>::max_pseudoknot_depth)) // custom SEQAN3_CPO_IMPL(1, (max_pseudoknot_depth(v) )) // ADL - SEQAN3_CPO_IMPL(0, (deferred_type_t, decltype(v)>::max_pseudoknot_depth )) // member + SEQAN3_CPO_IMPL(0, (deferred_type_t, decltype(v)>::max_pseudoknot_depth )) // member public: //!\brief Operator definition. diff --git a/include/seqan3/argument_parser/auxiliary.hpp b/include/seqan3/argument_parser/auxiliary.hpp index 6d950aa34e..48335a1f12 100644 --- a/include/seqan3/argument_parser/auxiliary.hpp +++ b/include/seqan3/argument_parser/auxiliary.hpp @@ -83,9 +83,9 @@ template struct enumeration_names_fn { //!\brief `option_t` with cvref removed and possibly wrapped in std::type_identity. - using s_option_t = std::conditional_t> && - seqan3::is_constexpr_default_constructible_v>, - remove_cvref_t, + using s_option_t = std::conditional_t> && + seqan3::is_constexpr_default_constructible_v>, + std::remove_cvref_t, std::type_identity>; SEQAN3_CPO_IMPL(1, (deferred_type_t, decltype(v)>::enumeration_names)) @@ -98,7 +98,7 @@ struct enumeration_names_fn { { impl(priority_tag<1>{}, s_option_t{}, dummy{}) }; std::same_as{}, s_option_t{}, dummy{})), - std::unordered_map>>; + std::unordered_map>>; } //!\endcond auto operator()() const @@ -205,7 +205,7 @@ SEQAN3_CONCEPT argument_parser_compatible_option = input_stream_over //!\cond - requires named_enumeration> + requires named_enumeration> //!\endcond inline debug_stream_type & operator<<(debug_stream_type & s, option_type && op) { diff --git a/include/seqan3/argument_parser/detail/format_parse.hpp b/include/seqan3/argument_parser/detail/format_parse.hpp index 7379d7bbd3..e081710fc6 100644 --- a/include/seqan3/argument_parser/detail/format_parse.hpp +++ b/include/seqan3/argument_parser/detail/format_parse.hpp @@ -153,7 +153,7 @@ class format_parse : public format_base template static bool is_empty_id(id_type const & id) { - if constexpr (std::same_as, std::string>) + if constexpr (std::same_as, std::string>) return id.empty(); else // char return is_char<'\0'>(id); diff --git a/include/seqan3/argument_parser/validators.hpp b/include/seqan3/argument_parser/validators.hpp index 9f47b07691..8e2b157bb0 100644 --- a/include/seqan3/argument_parser/validators.hpp +++ b/include/seqan3/argument_parser/validators.hpp @@ -79,7 +79,7 @@ namespace seqan3 //!\} //!\cond template -SEQAN3_CONCEPT validator = std::copyable> && +SEQAN3_CONCEPT validator = std::copyable> && requires(validator_type validator, typename std::remove_reference_t::option_value_type value) { diff --git a/include/seqan3/core/algorithm/configuration.hpp b/include/seqan3/core/algorithm/configuration.hpp index 1c23bb538d..3774ae45fe 100644 --- a/include/seqan3/core/algorithm/configuration.hpp +++ b/include/seqan3/core/algorithm/configuration.hpp @@ -417,7 +417,7 @@ class configuration : public std::tuple template static constexpr auto make_configuration(tuple_t && tpl) { - if constexpr (std::tuple_size_v> == 0) + if constexpr (std::tuple_size_v> == 0) { return configuration<>{}; } @@ -426,7 +426,7 @@ class configuration : public std::tuple auto impl = [](auto & impl_ref, auto && config, auto && head, auto && tail) { using cfg_t = decltype(config); - if constexpr (std::tuple_size_v> == 0) + if constexpr (std::tuple_size_v> == 0) { return std::forward(config).push_back(std::get<0>(std::forward(head))); } @@ -472,7 +472,7 @@ class configuration : public std::tuple template constexpr auto push_back(config_element_t elem) const & { - static_assert(detail::is_configuration_valid_v, + static_assert(detail::is_configuration_valid_v, configs_t...>, "Configuration error: The passed element cannot be combined with one or more elements in the " "current configuration."); @@ -486,7 +486,7 @@ class configuration : public std::tuple template constexpr auto push_back(config_element_t elem) && { - static_assert(detail::is_configuration_valid_v, + static_assert(detail::is_configuration_valid_v, configs_t...>, "Configuration error: The passed element cannot be combined with one or more elements in the " "current configuration."); @@ -573,13 +573,13 @@ class configuration : public std::tuple * \relates seqan3::configuration */ template -configuration(pipeable_config_element &&) -> configuration>; +configuration(pipeable_config_element &&) -> configuration>; /*!\brief Deduces the correct configuration element type from the passed seqan3::pipeable_config_element. * \relates seqan3::configuration */ template -configuration(pipeable_config_element const &) -> configuration>; +configuration(pipeable_config_element const &) -> configuration>; //!\} /*!\name Tuple interface diff --git a/include/seqan3/core/algorithm/configuration_utility.hpp b/include/seqan3/core/algorithm/configuration_utility.hpp index 42263dd74d..7883095359 100644 --- a/include/seqan3/core/algorithm/configuration_utility.hpp +++ b/include/seqan3/core/algorithm/configuration_utility.hpp @@ -54,10 +54,10 @@ inline constexpr std::array, 0> compatibility_table; template struct is_configuration_valid : public std::conditional_t< - (std::is_same_v, remove_cvref_t> && ...) && - (compatibility_table> - [static_cast>>(query_t::id)] - [static_cast>>(compare_types::id)] && ...), + (std::is_same_v, std::remove_cvref_t> && ...) && + (compatibility_table> + [static_cast>>(query_t::id)] + [static_cast>>(compare_types::id)] && ...), std::true_type, // If condition is true. std::false_type // If condition is false. > diff --git a/include/seqan3/core/char_operations/predicate_detail.hpp b/include/seqan3/core/char_operations/predicate_detail.hpp index 885ca3b4b7..2a69f9edf2 100644 --- a/include/seqan3/core/char_operations/predicate_detail.hpp +++ b/include/seqan3/core/char_operations/predicate_detail.hpp @@ -108,8 +108,8 @@ template SEQAN3_CONCEPT char_predicate = requires { requires std::predicate, char>; - requires std::is_base_of_v>, - remove_cvref_t>; + requires std::is_base_of_v>, + std::remove_cvref_t>; std::remove_reference_t::msg; diff --git a/include/seqan3/core/concept/tuple.hpp b/include/seqan3/core/concept/tuple.hpp index a164512568..7c821cbdab 100644 --- a/include/seqan3/core/concept/tuple.hpp +++ b/include/seqan3/core/concept/tuple.hpp @@ -175,18 +175,18 @@ namespace seqan3 template SEQAN3_CONCEPT tuple_like = detail::tuple_size> && requires(t v) { - typename detail::tuple_type_list>::type; + typename detail::tuple_type_list>::type; // NOTE(rrahn): To check the full tuple_concept including the get interface and the std::totally_ordered // we need to make some assumptions. In general these checks can only be executed if the tuple is not // empty. Furthermore, the std::totally_ordered can only be checked if all elements in the // tuple are strict_totally_ordered. This is done, by the fold expression in the second part. requires (std::tuple_size>::value == 0) || - (detail::tuple_get> && - (!meta::fold>, + (detail::tuple_get> && + (!meta::fold>, std::true_type, meta::quote_trait>::value || - std::totally_ordered>)); + std::totally_ordered>)); }; //!\endcond diff --git a/include/seqan3/core/detail/debug_stream_optional.hpp b/include/seqan3/core/detail/debug_stream_optional.hpp index be347f7ccf..9b60a8d022 100644 --- a/include/seqan3/core/detail/debug_stream_optional.hpp +++ b/include/seqan3/core/detail/debug_stream_optional.hpp @@ -44,7 +44,7 @@ inline debug_stream_type & operator<<(debug_stream_type & s, std */ template //!\cond - requires detail::is_type_specialisation_of_v, std::optional> + requires detail::is_type_specialisation_of_v, std::optional> //!\endcond inline debug_stream_type & operator<<(debug_stream_type & s, optional_type && arg) { diff --git a/include/seqan3/core/detail/debug_stream_range.hpp b/include/seqan3/core/detail/debug_stream_range.hpp index 11117fc023..43df5ea46e 100644 --- a/include/seqan3/core/detail/debug_stream_range.hpp +++ b/include/seqan3/core/detail/debug_stream_range.hpp @@ -38,11 +38,11 @@ namespace seqan3::detail */ template SEQAN3_CONCEPT debug_stream_range_guard = - !std::same_as>, - remove_cvref_t> && // prevent recursive instantiation + !std::same_as>, + std::remove_cvref_t> && // prevent recursive instantiation // exclude null-terminated strings: !(std::is_pointer_v> && - std::same_as>, char>); + std::same_as>, char>); /*!\brief Helper template variable that checks if the reference type of a range can be streamed into an instance of * seqan3::debug_stream_type . @@ -122,7 +122,7 @@ template inline debug_stream_type & operator<<(debug_stream_type & s, rng_t && r) //!\cond requires detail::debug_stream_range_guard && - (!detail::is_uint_adaptation_v>>) + (!detail::is_uint_adaptation_v>>) //!\endcond { for (auto && l : r) diff --git a/include/seqan3/core/detail/debug_stream_tuple.hpp b/include/seqan3/core/detail/debug_stream_tuple.hpp index cf38d551f7..2e764b08b9 100644 --- a/include/seqan3/core/detail/debug_stream_tuple.hpp +++ b/include/seqan3/core/detail/debug_stream_tuple.hpp @@ -53,7 +53,7 @@ void print_tuple(debug_stream_type & s, tuple_t && t, std::index_sequenc template SEQAN3_CONCEPT debug_streamable_tuple = !std::ranges::input_range && !alphabet && // exclude alphabet_tuple_base - tuple_like>; + tuple_like>; //!\endcond } // namespace seqan3::detail @@ -73,7 +73,7 @@ template inline debug_stream_type & operator<<(debug_stream_type & s, tuple_t && t) { detail::print_tuple(s, std::forward(t), - std::make_index_sequence>>{}); + std::make_index_sequence>>{}); return s; } diff --git a/include/seqan3/core/detail/debug_stream_variant.hpp b/include/seqan3/core/detail/debug_stream_variant.hpp index b8f74210f2..8dca90cf25 100644 --- a/include/seqan3/core/detail/debug_stream_variant.hpp +++ b/include/seqan3/core/detail/debug_stream_variant.hpp @@ -35,7 +35,7 @@ namespace seqan3 */ template //!\cond - requires detail::is_type_specialisation_of_v, std::variant> + requires detail::is_type_specialisation_of_v, std::variant> //!\endcond inline debug_stream_type & operator<<(debug_stream_type & s, variant_type && v) { diff --git a/include/seqan3/core/detail/strong_type.hpp b/include/seqan3/core/detail/strong_type.hpp index b3df76a8c8..36e45c8297 100644 --- a/include/seqan3/core/detail/strong_type.hpp +++ b/include/seqan3/core/detail/strong_type.hpp @@ -111,9 +111,9 @@ SEQAN3_CONCEPT strong_type_specialisation = requires (strong_type_t && obj) //!\endcond //!\cond - requires std::derived_from, + requires std::derived_from, strong_type::value_type, - remove_cvref_t, + std::remove_cvref_t, std::remove_reference_t::skills>>; //!\endcond //!\cond diff --git a/include/seqan3/core/simd/debug_stream_simd.hpp b/include/seqan3/core/simd/debug_stream_simd.hpp index e0b78cfe1c..8345f2a2ed 100644 --- a/include/seqan3/core/simd/debug_stream_simd.hpp +++ b/include/seqan3/core/simd/debug_stream_simd.hpp @@ -29,11 +29,11 @@ namespace seqan3 */ template //!\cond - requires simd::simd_concept> + requires simd::simd_concept> //!\endcond inline debug_stream_type & operator<<(debug_stream_type & s, simd_t && simd) { - using simd_type = remove_cvref_t; + using simd_type = std::remove_cvref_t; constexpr size_t length = simd::simd_traits::length; using scalar_type = typename simd::simd_traits::scalar_type; diff --git a/include/seqan3/core/simd/view_to_simd.hpp b/include/seqan3/core/simd/view_to_simd.hpp index d595e9f0b9..ae55e25a45 100644 --- a/include/seqan3/core/simd/view_to_simd.hpp +++ b/include/seqan3/core/simd/view_to_simd.hpp @@ -131,7 +131,7 @@ class view_to_simd : public std::ranges::view_interface //!\cond - requires (!std::same_as, view_to_simd>) && + requires (!std::same_as, view_to_simd>) && (!std::same_as) && std::ranges::viewable_range //!\endcond diff --git a/include/seqan3/core/tuple_utility.hpp b/include/seqan3/core/tuple_utility.hpp index d63b6bec3d..43c2dbb1ca 100644 --- a/include/seqan3/core/tuple_utility.hpp +++ b/include/seqan3/core/tuple_utility.hpp @@ -148,9 +148,9 @@ constexpr auto tuple_split(tuple_t && t) template constexpr auto tuple_split(tuple_t && t) { - constexpr size_t pivot_c = list_traits::find>>; + constexpr size_t pivot_c = list_traits::find>>; - static_assert(pivot_c <= std::tuple_size_v>); + static_assert(pivot_c <= std::tuple_size_v>); return tuple_split(std::forward(t)); } @@ -178,7 +178,7 @@ constexpr auto tuple_split(tuple_t && t) template constexpr auto tuple_pop_front(tuple_t && t) { - static_assert(std::tuple_size_v> > 0); + static_assert(std::tuple_size_v> > 0); return std::get<1>(tuple_split<1>(std::forward(t))); } diff --git a/include/seqan3/core/type_traits/basic.hpp b/include/seqan3/core/type_traits/basic.hpp index 9c176e9758..f0d339ca73 100644 --- a/include/seqan3/core/type_traits/basic.hpp +++ b/include/seqan3/core/type_traits/basic.hpp @@ -13,6 +13,7 @@ #pragma once #include +#include #include #include @@ -138,14 +139,14 @@ using deferred_type_t = typename deferred_type::type; // ---------------------------------------------------------------------------- //!\brief Return the type of std::ignore with `const`, `volatile` and references removed (type trait). -using ignore_t = remove_cvref_t; +using ignore_t = std::remove_cvref_t; /*!\brief Return whether the input type with `const`, `volatile` and references removed is std::ignore's type. * (type trait). * \tparam t The type to operate on. */ template -constexpr bool decays_to_ignore_v = std::is_same_v, ignore_t>; +constexpr bool decays_to_ignore_v = std::is_same_v, ignore_t>; //!\} diff --git a/include/seqan3/core/type_traits/range.hpp b/include/seqan3/core/type_traits/range.hpp index 87633af368..ea9075309b 100644 --- a/include/seqan3/core/type_traits/range.hpp +++ b/include/seqan3/core/type_traits/range.hpp @@ -31,7 +31,7 @@ namespace seqan3::detail //!\cond template -SEQAN3_CONCEPT has_range_value_type = requires { typename std::ranges::range_value_t>; }; +SEQAN3_CONCEPT has_range_value_type = requires { typename std::ranges::range_value_t>; }; //!\endcond } // namespace seqan3::detail @@ -208,15 +208,15 @@ template struct range_innermost_value { //!\brief The return type (recursion not shown). - using type = std::ranges::range_value_t>; + using type = std::ranges::range_value_t>; }; //!\cond template - requires detail::has_range_value_type && detail::has_range_value_type>> + requires detail::has_range_value_type && detail::has_range_value_type>> struct range_innermost_value { - using type = typename range_innermost_value>>::type; + using type = typename range_innermost_value>>::type; }; //!\endcond @@ -247,8 +247,8 @@ constexpr size_t range_dimension_v = 1; //!\cond template - requires detail::has_range_value_type && detail::has_range_value_type>> -constexpr size_t range_dimension_v = range_dimension_v>> + 1; + requires detail::has_range_value_type && detail::has_range_value_type>> +constexpr size_t range_dimension_v = range_dimension_v>> + 1; //!\endcond // ---------------------------------------------------------------------------- diff --git a/include/seqan3/io/alignment_file/detail.hpp b/include/seqan3/io/alignment_file/detail.hpp index 01f85429fb..0ff11c074d 100644 --- a/include/seqan3/io/alignment_file/detail.hpp +++ b/include/seqan3/io/alignment_file/detail.hpp @@ -140,7 +140,7 @@ template uint32_t const query_end_pos = 0, bool const extended_cigar = false) //!\cond - requires (std::tuple_size_v> == 2) + requires (std::tuple_size_v> == 2) //!\endcond { using std::get; @@ -249,7 +249,7 @@ template uint32_t const query_end_pos = 0, bool const extended_cigar = false) //!\cond - requires (std::tuple_size_v> == 2) + requires (std::tuple_size_v> == 2) //!\endcond { return get_cigar_string(get_cigar_vector(alignment, query_start_pos, query_end_pos, extended_cigar)); @@ -330,7 +330,7 @@ template //!\cond - requires (std::tuple_size_v> == 2) && + requires (std::tuple_size_v> == 2) && detail::all_model_writable_aligned_seq> //!\endcond inline void alignment_from_cigar(alignment_type & alignment, std::vector const & cigar_vector) diff --git a/include/seqan3/io/alignment_file/format_bam.hpp b/include/seqan3/io/alignment_file/format_bam.hpp index 4105c0ba02..f4b95c36e4 100644 --- a/include/seqan3/io/alignment_file/format_bam.hpp +++ b/include/seqan3/io/alignment_file/format_bam.hpp @@ -639,16 +639,16 @@ inline void format_bam::write_alignment_record([[maybe_unused]] stream_type & s { static_assert((std::ranges::forward_range || std::integral> || - detail::is_type_specialisation_of_v, std::optional>), + detail::is_type_specialisation_of_v, std::optional>), "The ref_id object must be a std::ranges::forward_range " "over letters that model seqan3::alphabet or an integral or a std::optional."); } - static_assert(tuple_like>, + static_assert(tuple_like>, "The align object must be a std::pair of two ranges whose " "value_type is comparable to seqan3::gap"); - static_assert((std::tuple_size_v> == 2 && + static_assert((std::tuple_size_v> == 2 && std::equality_comparable_with(align))>> && std::equality_comparable_with(align))>>), "The align object must be a std::pair of two ranges whose " @@ -659,24 +659,24 @@ inline void format_bam::write_alignment_record([[maybe_unused]] stream_type & s "The qual object must be a std::ranges::forward_range " "over letters that model seqan3::alphabet."); - static_assert(tuple_like>, + static_assert(tuple_like>, "The mate object must be a std::tuple of size 3 with " "1) a std::ranges::forward_range with a value_type modelling seqan3::alphabet, " "2) a std::integral or std::optional, and " "3) a std::integral."); static_assert(((std::ranges::forward_range(mate))> || - std::integral(mate))>> || - detail::is_type_specialisation_of_v(mate))>, std::optional>) && - (std::integral(mate))>> || - detail::is_type_specialisation_of_v(mate))>, std::optional>) && - std::integral(mate))>>), + std::integral(mate))>> || + detail::is_type_specialisation_of_v(mate))>, std::optional>) && + (std::integral(mate))>> || + detail::is_type_specialisation_of_v(mate))>, std::optional>) && + std::integral(mate))>>), "The mate object must be a std::tuple of size 3 with " "1) a std::ranges::forward_range with a value_type modelling seqan3::alphabet, " "2) a std::integral or std::optional, and " "3) a std::integral."); - static_assert(std::same_as, sam_tag_dictionary>, + static_assert(std::same_as, sam_tag_dictionary>, "The tag_dict object must be of type seqan3::sam_tag_dictionary."); if constexpr (detail::decays_to_ignore_v) @@ -1136,7 +1136,7 @@ inline std::string format_bam::get_tag_dict_str(sam_tag_dictionary const & tag_d auto stream_variant_fn = [&result] (auto && arg) // helper to print an std::variant { // T is either char, int32_t, float, std::string, or a std::vector - using T = remove_cvref_t; + using T = std::remove_cvref_t; if constexpr (std::same_as) { diff --git a/include/seqan3/io/alignment_file/format_sam.hpp b/include/seqan3/io/alignment_file/format_sam.hpp index 5a2d24c0d1..f351d9427e 100644 --- a/include/seqan3/io/alignment_file/format_sam.hpp +++ b/include/seqan3/io/alignment_file/format_sam.hpp @@ -689,21 +689,21 @@ inline void format_sam::write_alignment_record(stream_type & stream, { static_assert((std::ranges::forward_range || std::integral> || - detail::is_type_specialisation_of_v, std::optional>), + detail::is_type_specialisation_of_v, std::optional>), "The ref_id object must be a std::ranges::forward_range " "over letters that model seqan3::alphabet."); - if constexpr (std::integral> || - detail::is_type_specialisation_of_v, std::optional>) + if constexpr (std::integral> || + detail::is_type_specialisation_of_v, std::optional>) static_assert(!detail::decays_to_ignore_v, "If you give indices as reference id information the header must also be present."); } - static_assert(tuple_like>, + static_assert(tuple_like>, "The align object must be a std::pair of two ranges whose " "value_type is comparable to seqan3::gap"); - static_assert((std::tuple_size_v> == 2 && + static_assert((std::tuple_size_v> == 2 && std::equality_comparable_with(align))>> && std::equality_comparable_with(align))>>), "The align object must be a std::pair of two ranges whose " @@ -714,29 +714,29 @@ inline void format_sam::write_alignment_record(stream_type & stream, "The qual object must be a std::ranges::forward_range " "over letters that model seqan3::alphabet."); - static_assert(tuple_like>, + static_assert(tuple_like>, "The mate object must be a std::tuple of size 3 with " "1) a std::ranges::forward_range with a value_type modelling seqan3::alphabet, " "2) a std::integral or std::optional, and " "3) a std::integral."); static_assert(((std::ranges::forward_range(mate))> || - std::integral(mate))>> || - detail::is_type_specialisation_of_v(mate))>, std::optional>) && - (std::integral(mate))>> || - detail::is_type_specialisation_of_v(mate))>, std::optional>) && - std::integral(mate))>>), + std::integral(mate))>> || + detail::is_type_specialisation_of_v(mate))>, std::optional>) && + (std::integral(mate))>> || + detail::is_type_specialisation_of_v(mate))>, std::optional>) && + std::integral(mate))>>), "The mate object must be a std::tuple of size 3 with " "1) a std::ranges::forward_range with a value_type modelling seqan3::alphabet, " "2) a std::integral or std::optional, and " "3) a std::integral."); - if constexpr (std::integral(mate))>> || - detail::is_type_specialisation_of_v(mate))>, std::optional>) + if constexpr (std::integral(mate))>> || + detail::is_type_specialisation_of_v(mate))>, std::optional>) static_assert(!detail::decays_to_ignore_v, "If you give indices as mate reference id information the header must also be present."); - static_assert(std::same_as, sam_tag_dictionary>, + static_assert(std::same_as, sam_tag_dictionary>, "The tag_dict object must be of type seqan3::sam_tag_dictionary."); // --------------------------------------------------------------------- @@ -878,7 +878,7 @@ inline void format_sam::write_alignment_record(stream_type & stream, stream << separator; - if constexpr (detail::is_type_specialisation_of_v(mate))>, std::optional>) + if constexpr (detail::is_type_specialisation_of_v(mate))>, std::optional>) { // SAM is 1 based, 0 indicates unmapped read if optional is not set stream << (get<1>(mate).value_or(-1) + 1) << separator; @@ -1099,7 +1099,7 @@ inline void format_sam::write_tag_fields(stream_t & stream, sam_tag_dictionary c { auto stream_variant_fn = [this, &stream] (auto && arg) // helper to print an std::variant { - using T = remove_cvref_t; + using T = std::remove_cvref_t; if constexpr (!container || std::same_as) { diff --git a/include/seqan3/io/alignment_file/format_sam_base.hpp b/include/seqan3/io/alignment_file/format_sam_base.hpp index c37570a652..037b0bb329 100644 --- a/include/seqan3/io/alignment_file/format_sam_base.hpp +++ b/include/seqan3/io/alignment_file/format_sam_base.hpp @@ -316,7 +316,7 @@ inline void format_sam_base::construct_alignment(align_type } else { - using unaligned_t = remove_cvref_t(align))>>; + using unaligned_t = std::remove_cvref_t(align))>>; auto dummy_seq = views::repeat_n(std::ranges::range_value_t{}, ref_length) | std::views::transform(detail::access_restrictor_fn{}); static_assert(std::same_as, @@ -340,7 +340,7 @@ inline void format_sam_base::construct_alignment(align_type } else { - using unaligned_t = remove_cvref_t(align))>>; + using unaligned_t = std::remove_cvref_t(align))>>; assign_unaligned(get<0>(align), views::repeat_n(std::ranges::range_value_t{}, 0) | std::views::transform(detail::access_restrictor_fn{})); } diff --git a/include/seqan3/io/alignment_file/output.hpp b/include/seqan3/io/alignment_file/output.hpp index a0bb8d95a2..5b16022185 100644 --- a/include/seqan3/io/alignment_file/output.hpp +++ b/include/seqan3/io/alignment_file/output.hpp @@ -483,7 +483,7 @@ class alignment_file_output void push_back(record_t && r) //!\cond requires tuple_like && - requires { requires detail::is_type_specialisation_of_v, record>; } + requires { requires detail::is_type_specialisation_of_v, record>; } //!\endcond { using default_align_t = std::pair>, std::span>>; diff --git a/include/seqan3/io/sequence_file/output.hpp b/include/seqan3/io/sequence_file/output.hpp index 1b93bcb496..b3a882ef9e 100644 --- a/include/seqan3/io/sequence_file/output.hpp +++ b/include/seqan3/io/sequence_file/output.hpp @@ -388,7 +388,7 @@ class sequence_file_output void push_back(record_t && r) //!\cond requires tuple_like && - requires { requires detail::is_type_specialisation_of_v, record>; } + requires { requires detail::is_type_specialisation_of_v, record>; } //!\endcond { write_record(detail::get_or_ignore(r), diff --git a/include/seqan3/io/structure_file/output.hpp b/include/seqan3/io/structure_file/output.hpp index 165b9a0a4f..72e53c43db 100644 --- a/include/seqan3/io/structure_file/output.hpp +++ b/include/seqan3/io/structure_file/output.hpp @@ -389,7 +389,7 @@ class structure_file_output void push_back(record_t && r) //!\cond requires tuple_like && - requires { requires detail::is_type_specialisation_of_v, record>; } + requires { requires detail::is_type_specialisation_of_v, record>; } //!\endcond { write_record(detail::get_or_ignore(r), diff --git a/include/seqan3/range/container/bitcompressed_vector.hpp b/include/seqan3/range/container/bitcompressed_vector.hpp index 7edc54abf1..a8d724a506 100644 --- a/include/seqan3/range/container/bitcompressed_vector.hpp +++ b/include/seqan3/range/container/bitcompressed_vector.hpp @@ -123,7 +123,7 @@ class bitcompressed_vector //!\cond //NOTE(h-2): it is entirely unclear to me why we need this template - requires std::is_same_v>, alphabet_type> + requires std::is_same_v>, alphabet_type> static constexpr bool has_same_value_type_v = true; //!\endcond diff --git a/include/seqan3/range/container/dynamic_bitset.hpp b/include/seqan3/range/container/dynamic_bitset.hpp index c221437a72..26c6821346 100644 --- a/include/seqan3/range/container/dynamic_bitset.hpp +++ b/include/seqan3/range/container/dynamic_bitset.hpp @@ -262,7 +262,7 @@ class dynamic_bitset */ template //!\cond - requires (!std::same_as, dynamic_bitset>) + requires (!std::same_as, dynamic_bitset>) //!\endcond explicit constexpr dynamic_bitset(other_range_t && range) noexcept : dynamic_bitset{std::ranges::begin(range), std::ranges::end(range)} diff --git a/include/seqan3/range/container/small_vector.hpp b/include/seqan3/range/container/small_vector.hpp index d569d0447b..e56bb89e2e 100644 --- a/include/seqan3/range/container/small_vector.hpp +++ b/include/seqan3/range/container/small_vector.hpp @@ -182,7 +182,7 @@ class small_vector */ template //!\cond - requires (!std::is_same_v, small_vector>) + requires (!std::is_same_v, small_vector>) /*ICE: && std::constructible_from>*/ //!\endcond explicit constexpr small_vector(other_range_t && range) noexcept(is_noexcept) : diff --git a/include/seqan3/range/decorator/gap_decorator.hpp b/include/seqan3/range/decorator/gap_decorator.hpp index 99f9507313..f9acdfb287 100644 --- a/include/seqan3/range/decorator/gap_decorator.hpp +++ b/include/seqan3/range/decorator/gap_decorator.hpp @@ -132,7 +132,7 @@ class gap_decorator template //!\cond requires (!std::same_as) && - std::same_as, remove_cvref_t> && + std::same_as, std::remove_cvref_t> && std::ranges::viewable_range // at end, otherwise it competes with the move ctor //!\endcond gap_decorator(other_range_t && range) : ungapped_view{views::type_reduce(std::forward(range))} diff --git a/include/seqan3/range/views/async_input_buffer.hpp b/include/seqan3/range/views/async_input_buffer.hpp index 7d32d37636..9b301a0357 100644 --- a/include/seqan3/range/views/async_input_buffer.hpp +++ b/include/seqan3/range/views/async_input_buffer.hpp @@ -117,7 +117,7 @@ class async_input_buffer_view : public std::ranges::view_interface //!\cond - requires (!std::same_as, async_input_buffer_view>) && // prevent recursive instantiation + requires (!std::same_as, async_input_buffer_view>) && // prevent recursive instantiation std::ranges::viewable_range && std::constructible_from>> //!\endcond diff --git a/include/seqan3/range/views/drop.hpp b/include/seqan3/range/views/drop.hpp index c525941730..749bfbf640 100644 --- a/include/seqan3/range/views/drop.hpp +++ b/include/seqan3/range/views/drop.hpp @@ -59,12 +59,12 @@ struct drop_fn } // string_view - if constexpr (is_type_specialisation_of_v, std::basic_string_view>) + if constexpr (is_type_specialisation_of_v, std::basic_string_view>) { return urange.substr(drop_size); } // string const & - else if constexpr (is_type_specialisation_of_v, std::basic_string> && + else if constexpr (is_type_specialisation_of_v, std::basic_string> && std::is_const_v>) { return std::basic_string_view{std::ranges::data(urange) + drop_size, new_size}; diff --git a/include/seqan3/range/views/enforce_random_access.hpp b/include/seqan3/range/views/enforce_random_access.hpp index 3da7290804..ecbd7490a5 100644 --- a/include/seqan3/range/views/enforce_random_access.hpp +++ b/include/seqan3/range/views/enforce_random_access.hpp @@ -67,7 +67,7 @@ class view_enforce_random_access : public std::ranges::view_interface //!\cond - requires (!std::same_as, view_enforce_random_access>) && + requires (!std::same_as, view_enforce_random_access>) && std::ranges::viewable_range && std::constructible_from>> //!\endcond diff --git a/include/seqan3/range/views/kmer_hash.hpp b/include/seqan3/range/views/kmer_hash.hpp index f96a2af0e2..1036f44caa 100644 --- a/include/seqan3/range/views/kmer_hash.hpp +++ b/include/seqan3/range/views/kmer_hash.hpp @@ -82,7 +82,7 @@ class kmer_hash_view : public std::ranges::view_interface */ template //!\cond - requires (!std::same_as, kmer_hash_view>) && + requires (!std::same_as, kmer_hash_view>) && std::ranges::viewable_range && std::constructible_from>> //!\endcond diff --git a/include/seqan3/range/views/move.hpp b/include/seqan3/range/views/move.hpp index c5ac42444f..7d2d2f6689 100644 --- a/include/seqan3/range/views/move.hpp +++ b/include/seqan3/range/views/move.hpp @@ -67,7 +67,7 @@ namespace seqan3::views */ inline auto const move = std::views::transform(detail::multi_invocable { - [] (auto && arg) -> remove_cvref_t { return std::move(arg); }, + [] (auto && arg) -> std::remove_cvref_t { return std::move(arg); }, [] (auto & arg) -> decltype(auto) { return std::move(arg); } }); //!\} diff --git a/include/seqan3/range/views/pairwise_combine.hpp b/include/seqan3/range/views/pairwise_combine.hpp index 14d83c6cb6..474e117c62 100644 --- a/include/seqan3/range/views/pairwise_combine.hpp +++ b/include/seqan3/range/views/pairwise_combine.hpp @@ -140,7 +140,7 @@ class pairwise_combine_view : public std::ranges::view_interface //!\cond - requires (!std::same_as, pairwise_combine_view>) && + requires (!std::same_as, pairwise_combine_view>) && std::ranges::viewable_range && // Must come after self type check to avoid conflicts with the move constructor. std::constructible_from>> diff --git a/include/seqan3/range/views/single_pass_input.hpp b/include/seqan3/range/views/single_pass_input.hpp index c38f4a0be2..4fd9fbfa44 100644 --- a/include/seqan3/range/views/single_pass_input.hpp +++ b/include/seqan3/range/views/single_pass_input.hpp @@ -94,7 +94,7 @@ class single_pass_input_view : public std::ranges::view_interface //!\cond - requires (!std::same_as, single_pass_input_view> && + requires (!std::same_as, single_pass_input_view> && std::ranges::viewable_range && // Must come after self type check to avoid conflicts with the move constructor. std::constructible_from>>) //!\endcond diff --git a/include/seqan3/range/views/take.hpp b/include/seqan3/range/views/take.hpp index 394d9eecf8..cd943a1567 100644 --- a/include/seqan3/range/views/take.hpp +++ b/include/seqan3/range/views/take.hpp @@ -496,12 +496,12 @@ struct take_fn } // string_view - if constexpr (is_type_specialisation_of_v, std::basic_string_view>) + if constexpr (is_type_specialisation_of_v, std::basic_string_view>) { return urange.substr(0, target_size); } // string const & - else if constexpr (is_type_specialisation_of_v, std::basic_string> && + else if constexpr (is_type_specialisation_of_v, std::basic_string> && std::is_const_v>) { return std::basic_string_view{std::ranges::data(urange), target_size}; diff --git a/include/seqan3/range/views/to_char.hpp b/include/seqan3/range/views/to_char.hpp index 64e28a684b..b8f5fe438f 100644 --- a/include/seqan3/range/views/to_char.hpp +++ b/include/seqan3/range/views/to_char.hpp @@ -64,7 +64,7 @@ namespace seqan3::views */ inline auto const to_char = deep{std::views::transform([] (auto const in) noexcept { - static_assert(alphabet>, "The value type of seqan3::views::to_char must model the seqan3::alphabet."); + static_assert(alphabet>, "The value type of seqan3::views::to_char must model the seqan3::alphabet."); return seqan3::to_char(in); })}; diff --git a/include/seqan3/range/views/to_lower.hpp b/include/seqan3/range/views/to_lower.hpp index f659c9eb57..0e9236c2ea 100644 --- a/include/seqan3/range/views/to_lower.hpp +++ b/include/seqan3/range/views/to_lower.hpp @@ -65,7 +65,7 @@ namespace seqan3::views */ inline auto const to_lower = deep{std::views::transform([] (auto const in) noexcept { - static_assert(builtin_character>, + static_assert(builtin_character>, "The value type of seqan3::views::to_lower must model seqan3::builtin_character."); return seqan3::to_lower(in); })}; diff --git a/include/seqan3/range/views/to_upper.hpp b/include/seqan3/range/views/to_upper.hpp index 10e3faafd4..af26977753 100644 --- a/include/seqan3/range/views/to_upper.hpp +++ b/include/seqan3/range/views/to_upper.hpp @@ -65,7 +65,7 @@ namespace seqan3::views */ inline auto const to_upper = deep{std::views::transform([] (auto const in) noexcept { - static_assert(builtin_character>, + static_assert(builtin_character>, "The value type of seqan3::views::to_upper must model the seqan3::builtin_character."); return seqan3::to_upper(in); })}; diff --git a/include/seqan3/range/views/translate.hpp b/include/seqan3/range/views/translate.hpp index ad00a92126..42f94e4404 100644 --- a/include/seqan3/range/views/translate.hpp +++ b/include/seqan3/range/views/translate.hpp @@ -223,7 +223,7 @@ class view_translate_single : public std::ranges::view_base */ template //!\cond - requires (!std::same_as, view_translate_single>) && + requires (!std::same_as, view_translate_single>) && std::ranges::viewable_range && std::constructible_from>> //!\endcond @@ -553,8 +553,8 @@ class view_translate : public std::ranges::view_base // unfortunately we cannot specialise the variable template so we have to add an auxiliary here template requires (range_dimension_v == range_dimension_v + 1) && - std::is_same_v>, - remove_cvref_t>> + std::is_same_v>, + std::remove_cvref_t>> static constexpr bool is_compatible_this_aux = true; //!\endcond //!\} @@ -598,7 +598,7 @@ class view_translate : public std::ranges::view_base */ template //!\cond - requires (!std::same_as, view_translate>) && + requires (!std::same_as, view_translate>) && std::ranges::viewable_range && std::constructible_from>> //!\endcond diff --git a/include/seqan3/range/views/translate_join.hpp b/include/seqan3/range/views/translate_join.hpp index 9a22dc1f1d..418b0a976e 100644 --- a/include/seqan3/range/views/translate_join.hpp +++ b/include/seqan3/range/views/translate_join.hpp @@ -132,7 +132,7 @@ class view_translate_join : public std::ranges::view_base */ template //!\cond - requires (!std::same_as, view_translate_join>) && + requires (!std::same_as, view_translate_join>) && std::ranges::viewable_range && std::constructible_from>> //!\endcond diff --git a/include/seqan3/range/views/trim_quality.hpp b/include/seqan3/range/views/trim_quality.hpp index 57e96ca938..662c2a9a02 100644 --- a/include/seqan3/range/views/trim_quality.hpp +++ b/include/seqan3/range/views/trim_quality.hpp @@ -48,16 +48,16 @@ struct trim_fn { static_assert(quality_alphabet>>, "views::trim_quality can only operate on ranges over seqan3::quality_alphabet."); - static_assert(std::same_as, - remove_cvref_t>> || - std::integral>, + static_assert(std::same_as, + std::remove_cvref_t>> || + std::integral>, "The threshold must either be a letter of the underlying alphabet or an integral type " "in which case it is compared with the underlying phred type."); return views::take_until(std::forward(irange), [threshold] (auto const value) { - if constexpr (std::same_as, - remove_cvref_t>>) + if constexpr (std::same_as, + std::remove_cvref_t>>) { return to_phred(value) < to_phred(threshold); } diff --git a/include/seqan3/range/views/type_reduce.hpp b/include/seqan3/range/views/type_reduce.hpp index bed7c32d67..a69ec283bb 100644 --- a/include/seqan3/range/views/type_reduce.hpp +++ b/include/seqan3/range/views/type_reduce.hpp @@ -54,12 +54,12 @@ class type_reduce_fn : public adaptor_base "The views::type_reduce adaptor can only be passed viewable_ranges, i.e. Views or &-to-non-View."); // views are always passed as-is - if constexpr (std::ranges::view>) + if constexpr (std::ranges::view>) { return std::views::all(std::forward(urange)); } // string const & - else if constexpr (is_type_specialisation_of_v, std::basic_string> && + else if constexpr (is_type_specialisation_of_v, std::basic_string> && std::is_const_v>) { return std::basic_string_view{std::ranges::data(urange), std::ranges::size(urange)}; diff --git a/include/seqan3/search/detail/search_traits.hpp b/include/seqan3/search/detail/search_traits.hpp index 4026e7cc00..d7c98f2f0f 100644 --- a/include/seqan3/search/detail/search_traits.hpp +++ b/include/seqan3/search/detail/search_traits.hpp @@ -36,7 +36,7 @@ struct search_traits using empty_search_result_type = search_result; //!\brief The configured search result type. using search_result_type = - typename remove_cvref_t().get_or( + typename std::remove_cvref_t().get_or( search_cfg::detail::result_type)) >::type; diff --git a/include/seqan3/search/search.hpp b/include/seqan3/search/search.hpp index 51a99504b9..a16ea3ae2f 100644 --- a/include/seqan3/search/search.hpp +++ b/include/seqan3/search/search.hpp @@ -40,7 +40,7 @@ struct search_configuration_validator template static void validate_query_type() { - using pure_query_t = remove_cvref_t; + using pure_query_t = std::remove_cvref_t; if constexpr(range_dimension_v == 1u) { static_assert(std::ranges::random_access_range, diff --git a/include/seqan3/search/search_result.hpp b/include/seqan3/search/search_result.hpp index c1fb994f38..b9c4715203 100644 --- a/include/seqan3/search/search_result.hpp +++ b/include/seqan3/search/search_result.hpp @@ -194,11 +194,11 @@ class search_result */ template //!\cond - requires detail::is_type_specialisation_of_v, search_result> + requires detail::is_type_specialisation_of_v, search_result> //!\endcond inline debug_stream_type & operator<<(debug_stream_type & stream, search_result_t && result) { - using result_type_list = detail::transfer_template_args_onto_t, type_list>; + using result_type_list = detail::transfer_template_args_onto_t, type_list>; stream << "<"; if constexpr (!std::same_as, detail::empty_type>) diff --git a/test/include/seqan3/test/cereal.hpp b/test/include/seqan3/test/cereal.hpp index 1099525581..b9d0f04611 100644 --- a/test/include/seqan3/test/cereal.hpp +++ b/test/include/seqan3/test/cereal.hpp @@ -56,7 +56,7 @@ void do_cerealisation(value_t && l) } { - remove_cvref_t in_l{}; + std::remove_cvref_t in_l{}; std::ifstream is{filename.get_path(), std::ios::binary}; in_archive_t iarchive{is}; iarchive(in_l); diff --git a/test/performance/range/gap_decorator_rand_read_benchmark.cpp b/test/performance/range/gap_decorator_rand_read_benchmark.cpp index 17c811c533..4a0c952415 100644 --- a/test/performance/range/gap_decorator_rand_read_benchmark.cpp +++ b/test/performance/range/gap_decorator_rand_read_benchmark.cpp @@ -31,7 +31,7 @@ void read_random(benchmark::State & state) { unsigned int seq_len = state.range(0); using size_type = typename gap_decorator_t::size_type; - using sequence_type = seqan3::remove_cvref_t>; + using sequence_type = std::remove_cvref_t>; sequence_type seq(seq_len, 'A'_dna4); // vector of sampled gap lengths for each position diff --git a/test/performance/range/gap_decorator_rand_write_benchmark.cpp b/test/performance/range/gap_decorator_rand_write_benchmark.cpp index f9f6d62c54..047e00aaf4 100644 --- a/test/performance/range/gap_decorator_rand_write_benchmark.cpp +++ b/test/performance/range/gap_decorator_rand_write_benchmark.cpp @@ -35,7 +35,7 @@ void insert_random(benchmark::State & state) { unsigned int seq_len = state.range(0); using size_type = typename gap_decorator_t::size_type; - using sequence_type = seqan3::remove_cvref_t>; + using sequence_type = std::remove_cvref_t>; sequence_type seq(seq_len, 'A'_dna4); // vector of sampled gap lengths for each position std::vector gaps(seq_len, 0); @@ -92,7 +92,7 @@ void delete_random(benchmark::State & state) unsigned int seq_len = state.range(0); using iterator_type = std::ranges::iterator_t; using size_type = typename gap_decorator_t::size_type; - using sequence_type = seqan3::remove_cvref_t>; + using sequence_type = std::remove_cvref_t>; sequence_type seq(seq_len, 'A'_dna4); // vector of sampled gap lengths for each position diff --git a/test/performance/range/gap_decorator_seq_read_benchmark.cpp b/test/performance/range/gap_decorator_seq_read_benchmark.cpp index 086114a8a6..da17b42772 100644 --- a/test/performance/range/gap_decorator_seq_read_benchmark.cpp +++ b/test/performance/range/gap_decorator_seq_read_benchmark.cpp @@ -32,7 +32,7 @@ void read_left2right(benchmark::State & state) // get target sequence length from current range state unsigned int seq_len = state.range(0); using size_type = typename gap_decorator_t::size_type; - using sequence_type = seqan3::remove_cvref_t>; + using sequence_type = std::remove_cvref_t>; sequence_type seq(seq_len, 'A'_dna4); // vector of sampled gap lengths for each position diff --git a/test/performance/range/gap_decorator_seq_write_benchmark.cpp b/test/performance/range/gap_decorator_seq_write_benchmark.cpp index 9cc1c2bae3..1d0cfa8d3f 100644 --- a/test/performance/range/gap_decorator_seq_write_benchmark.cpp +++ b/test/performance/range/gap_decorator_seq_write_benchmark.cpp @@ -34,7 +34,7 @@ void insert_left2right(benchmark::State & state) { unsigned int seq_len = state.range(0); using size_type = typename gap_decorator_t::size_type; - using sequence_type = seqan3::remove_cvref_t>; + using sequence_type = std::remove_cvref_t>; sequence_type seq(seq_len, 'A'_dna4); // vector of sampled gap lengths for each position @@ -81,7 +81,7 @@ void insert_right2left(benchmark::State & state) unsigned int seq_len = state.range(0); assert(seq_len > 0); using size_type = typename gap_decorator_t::size_type; - using sequence_type = seqan3::remove_cvref_t>; + using sequence_type = std::remove_cvref_t>; sequence_type seq(seq_len, 'A'_dna4); // vector of sampled gap lengths for each position std::vector gaps(seq_len, 0); diff --git a/test/snippet/io/alignment_file/sam_tag_dictionary/unknown_tag.cpp b/test/snippet/io/alignment_file/sam_tag_dictionary/unknown_tag.cpp index 1f70a19dab..4b48aea7f8 100644 --- a/test/snippet/io/alignment_file/sam_tag_dictionary/unknown_tag.cpp +++ b/test/snippet/io/alignment_file/sam_tag_dictionary/unknown_tag.cpp @@ -7,7 +7,7 @@ // a lambda helper function that prints every type in the std::variant<...allowed SAM tag types...> auto print_fn = [] (auto && arg) { - using T = seqan3::remove_cvref_t; // the type T of arg. + using T = std::remove_cvref_t; // the type T of arg. if constexpr (!seqan3::container) // If T is not a container, { diff --git a/test/unit/alignment/aligned_sequence_test_template.hpp b/test/unit/alignment/aligned_sequence_test_template.hpp index fb2e4c61c6..140e366d2b 100644 --- a/test/unit/alignment/aligned_sequence_test_template.hpp +++ b/test/unit/alignment/aligned_sequence_test_template.hpp @@ -36,7 +36,7 @@ TYPED_TEST_P(aligned_sequence, fulfills_concept) TYPED_TEST_P(aligned_sequence, assign_unaligned_sequence) { - using unaligned_seq_type = seqan3::remove_cvref_t>; + using unaligned_seq_type = std::remove_cvref_t>; unaligned_seq_type unaligned_seq{}; if constexpr (seqan3::sequence_container) @@ -57,7 +57,7 @@ TYPED_TEST_P(aligned_sequence, assign_unaligned_sequence) TYPED_TEST_P(aligned_sequence, assign_empty_unaligned_sequence) { - using unaligned_seq_type = seqan3::remove_cvref_t>; + using unaligned_seq_type = std::remove_cvref_t>; unaligned_seq_type unaligned_seq{}; TypeParam aligned_seq{}; @@ -221,7 +221,7 @@ TYPED_TEST_P(aligned_sequence, erase_multiple_gaps) TYPED_TEST_P(aligned_sequence, insert_erase_on_empty_sequence) { - using unaligned_seq_type = seqan3::remove_cvref_t>; + using unaligned_seq_type = std::remove_cvref_t>; unaligned_seq_type unaligned{}; TypeParam aligned_seq{}; diff --git a/test/unit/alignment/configuration/align_config_output_test.cpp b/test/unit/alignment/configuration/align_config_output_test.cpp index c25bbd0caa..5d7f93fc51 100644 --- a/test/unit/alignment/configuration/align_config_output_test.cpp +++ b/test/unit/alignment/configuration/align_config_output_test.cpp @@ -30,37 +30,37 @@ INSTANTIATE_TYPED_TEST_SUITE_P(output, pipeable_config_element_test, test_types, TEST(align_config_output, score) { - EXPECT_TRUE((std::same_as, + EXPECT_TRUE((std::same_as, seqan3::align_cfg::output_score_tag>)); } TEST(align_config_output, end_position) { - EXPECT_TRUE((std::same_as, + EXPECT_TRUE((std::same_as, seqan3::align_cfg::output_end_position_tag>)); } TEST(align_config_output, begin_position) { - EXPECT_TRUE((std::same_as, + EXPECT_TRUE((std::same_as, seqan3::align_cfg::output_begin_position_tag>)); } TEST(align_config_output, alignment) { - EXPECT_TRUE((std::same_as, + EXPECT_TRUE((std::same_as, seqan3::align_cfg::output_alignment_tag>)); } TEST(align_config_output, sequence1_id) { - EXPECT_TRUE((std::same_as, + EXPECT_TRUE((std::same_as, seqan3::align_cfg::output_sequence1_id_tag>)); } TEST(align_config_output, sequence2_id) { - EXPECT_TRUE((std::same_as, + EXPECT_TRUE((std::same_as, seqan3::align_cfg::output_sequence2_id_tag>)); } diff --git a/test/unit/alignment/configuration/align_config_score_test.cpp b/test/unit/alignment/configuration/align_config_score_test.cpp index b23eae8d69..700c8fc1b4 100644 --- a/test/unit/alignment/configuration/align_config_score_test.cpp +++ b/test/unit/alignment/configuration/align_config_score_test.cpp @@ -51,7 +51,7 @@ TEST(align_config_score, invoke) EXPECT_EQ(std::get<0>(cfg).value.score('I'_aa27, 'V'_aa27), 3); using aminoacid_scoring_scheme_cfg = seqan3::detail::align_config_score>; - EXPECT_TRUE((std::is_same_v, + EXPECT_TRUE((std::is_same_v, seqan3::detail::configuration>)); } diff --git a/test/unit/alignment/configuration/align_config_score_type_test.cpp b/test/unit/alignment/configuration/align_config_score_type_test.cpp index 6edfb320a2..15d175b1d6 100644 --- a/test/unit/alignment/configuration/align_config_score_type_test.cpp +++ b/test/unit/alignment/configuration/align_config_score_type_test.cpp @@ -25,7 +25,7 @@ INSTANTIATE_TYPED_TEST_SUITE_P(score_type, pipeable_config_element_test, test_ty TEST(align_config_score_type, score_type) { - EXPECT_TRUE((std::same_as)>, + EXPECT_TRUE((std::same_as)>, seqan3::align_cfg::score_type_tag>)); // default case EXPECT_TRUE((std::same_as)::score_type, int32_t>)); // default case diff --git a/test/unit/alignment/configuration/align_config_sequence_ends_test.cpp b/test/unit/alignment/configuration/align_config_sequence_ends_test.cpp index 2a95e00aa1..f90ec20a43 100644 --- a/test/unit/alignment/configuration/align_config_sequence_ends_test.cpp +++ b/test/unit/alignment/configuration/align_config_sequence_ends_test.cpp @@ -47,7 +47,7 @@ TEST(align_config_sequence_ends, invoke) EXPECT_NE(free_ends_at::none, get<0>(cfg).value & free_ends_at::seq1_back); EXPECT_EQ(free_ends_at::none, get<0>(cfg).value & free_ends_at::seq2_back); - EXPECT_TRUE((std::is_same_v, + EXPECT_TRUE((std::is_same_v, seqan3::detail::configuration>)); } @@ -62,7 +62,7 @@ TEST(align_config_sequence_ends, invoke_static) using free_ends_align_config = seqan3::detail::align_config_sequence_ends>; - EXPECT_TRUE((std::is_same_v, seqan3::detail::configuration)); + EXPECT_TRUE((std::is_same_v, seqan3::detail::configuration)); } TEST(align_config_sequence_ends, get_by_enum) diff --git a/test/unit/core/my_tuple.hpp b/test/unit/core/my_tuple.hpp index 20849771ad..9d7b6d85a8 100644 --- a/test/unit/core/my_tuple.hpp +++ b/test/unit/core/my_tuple.hpp @@ -113,7 +113,7 @@ struct tuple_size template struct tuple_element { - using type = seqan3::remove_cvref_t(std::declval()))>; + using type = std::remove_cvref_t(std::declval()))>; }; } // namespace std diff --git a/test/unit/core/type_traits/basic_test.cpp b/test/unit/core/type_traits/basic_test.cpp index 886fbfc329..4b32efbfa6 100644 --- a/test/unit/core/type_traits/basic_test.cpp +++ b/test/unit/core/type_traits/basic_test.cpp @@ -24,18 +24,18 @@ TEST(type_trait, remove_cvref_t) { - EXPECT_TRUE((std::is_same_v>)); - EXPECT_TRUE((std::is_same_v>)); - EXPECT_TRUE((std::is_same_v>)); - EXPECT_TRUE((std::is_same_v>)); - EXPECT_TRUE((std::is_same_v>)); - EXPECT_TRUE((std::is_same_v>)); - EXPECT_TRUE((std::is_same_v>)); - EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); + EXPECT_TRUE((std::is_same_v>)); // don't decay pointers and arrays: - EXPECT_FALSE((std::is_same_v>)); // type stays same - EXPECT_FALSE((std::is_same_v>)); // type stays same - EXPECT_FALSE((std::is_same_v>)); // type stays same + EXPECT_FALSE((std::is_same_v>)); // type stays same + EXPECT_FALSE((std::is_same_v>)); // type stays same + EXPECT_FALSE((std::is_same_v>)); // type stays same // the last example would be true for std::decay_t } From 46a5f91b087db2109a796cbbaa63c81c283dee69 Mon Sep 17 00:00:00 2001 From: wvandertoorn Date: Sun, 30 Aug 2020 11:46:38 +0200 Subject: [PATCH 3/4] [MISC] deprecate seqan3::remove_cvref --- include/seqan3/core/type_traits/basic.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/seqan3/core/type_traits/basic.hpp b/include/seqan3/core/type_traits/basic.hpp index f0d339ca73..b49032f620 100644 --- a/include/seqan3/core/type_traits/basic.hpp +++ b/include/seqan3/core/type_traits/basic.hpp @@ -43,7 +43,7 @@ namespace seqan3 * \tparam t The type to operate on. */ template -using remove_cvref_t = std::remove_cv_t>; +using remove_cvref_t SEQAN3_DEPRECATED_310 = std::remove_cv_t>; // ---------------------------------------------------------------------------- // remove_rvalue_reference From 6441c2ad13e5a800f62fbf6061ebad57c039b6fb Mon Sep 17 00:00:00 2001 From: marehr Date: Wed, 16 Sep 2020 11:35:09 +0200 Subject: [PATCH 4/4] [FIX] workaround gcc versions that forgot to define __cpp_lib_remove_cvref --- include/seqan3/std/type_traits | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/seqan3/std/type_traits b/include/seqan3/std/type_traits index 717aeccbe8..cc626ad345 100644 --- a/include/seqan3/std/type_traits +++ b/include/seqan3/std/type_traits @@ -15,13 +15,25 @@ #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. +#ifndef SEQAN3_WORKAROUND_CPP_LIB_REMOVE_CVREF +# if defined(__cpp_lib_remove_cvref) +# define SEQAN3_WORKAROUND_CPP_LIB_REMOVE_CVREF 1 +# elif defined(__GNUC__) && ((__GNUC__ == 9) && (__GNUC_MINOR__ < 4)) && __cplusplus > 201703L +# define SEQAN3_WORKAROUND_CPP_LIB_REMOVE_CVREF 1 +# else +# define SEQAN3_WORKAROUND_CPP_LIB_REMOVE_CVREF 0 +# endif +#endif + namespace std { // ---------------------------------------------------------------------------- // remove_cvref_t // ---------------------------------------------------------------------------- -#ifndef __cpp_lib_remove_cvref +#if !SEQAN3_WORKAROUND_CPP_LIB_REMOVE_CVREF /*!\brief Return the input type with `const`, `volatile` and references removed. * \tparam t The type to operate on. */ @@ -42,7 +54,7 @@ struct remove_cvref // needed for gcc-9, it defines std::remove_cvref but doe */ template using remove_cvref_t = typename remove_cvref::type; -#endif // __cpp_lib_remove_cvref +#endif // !SEQAN3_WORKAROUND_CPP_LIB_REMOVE_CVREF // ---------------------------------------------------------------------------- // type_identity