Skip to content

Commit

Permalink
Merge pull request #3329 from eseiler/misc/workarounds
Browse files Browse the repository at this point in the history
[MISC] Remove workarounds
  • Loading branch information
eseiler authored Jan 23, 2025
2 parents 31a4a3e + cc23031 commit 799f3b5
Show file tree
Hide file tree
Showing 29 changed files with 59 additions and 493 deletions.
1 change: 0 additions & 1 deletion doc/cookbook/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ Search for keywords with `Strg + F`.
\include test/snippet/core/debug_stream_set_underlying_stream.cpp
\include test/snippet/core/debug_stream_set_underlying_stream2.cpp
\include test/snippet/core/debug_stream_usage.cpp
\include test/snippet/core/detail/copyable_wrapper.cpp
\include test/snippet/core/detail/customisation_point.cpp
\include test/snippet/core/detail/deferred_crtp_base.cpp
\include test/snippet/core/detail/is_class_template_declarable_with.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <type_traits>

#include <seqan3/alignment/configuration/detail.hpp>
#include <seqan3/contrib/std/detail/movable_box.hpp>
#include <seqan3/core/configuration/pipeable_config_element.hpp>
#include <seqan3/core/detail/copyable_wrapper.hpp>

namespace seqan3::align_cfg
{
Expand All @@ -22,7 +22,7 @@ namespace seqan3::align_cfg
* \ingroup alignment_configuration
*
* \tparam callback_t The type of the callback; must model std::invocable with the generated seqan3::alignment_result
* and std::copy_constructible.
* and std::move_constructible.
*
* \details
*
Expand All @@ -35,7 +35,7 @@ namespace seqan3::align_cfg
* function, you need to make sure that the referenced function object outlives the call to the alignment algorithm.
*
* \if DEV
* The given callback is wrapped inside a seqan3::detail::copyable_wrapper wrapper type. This allows to also
* The given callback is wrapped inside a seqan::stl::detail::movable_box wrapper type. This allows to also
* use lambdas with a capture block, which otherwise are not std::copy_assignable and therefore invalidate the
* requirements for the configuration element (must model std::semiregular).
* \endif
Expand All @@ -46,12 +46,12 @@ namespace seqan3::align_cfg
*
* \include test/snippet/alignment/configuration/align_cfg_on_result.cpp
*/
template <std::copy_constructible callback_t>
template <std::move_constructible callback_t>
class on_result : private seqan3::pipeable_config_element
{
public:
//!\brief The stored callable which will be invoked with the alignment result.
seqan3::detail::copyable_wrapper_t<callback_t> callback; // Allows lambdas with capture blocks.
seqan::stl::detail::movable_box_t<callback_t> callback; // Allows lambdas with capture blocks.

/*!\name Constructors, destructor and assignment
* \{
Expand Down Expand Up @@ -79,7 +79,7 @@ class on_result : private seqan3::pipeable_config_element
* \{
*/
//!\brief Deduces the callback type from a forwarding constructor argument.
template <std::copy_constructible callback_t>
template <std::move_constructible callback_t>
on_result(callback_t &&) -> on_result<std::decay_t<callback_t>>;
//!\}
} // namespace seqan3::align_cfg
5 changes: 2 additions & 3 deletions include/seqan3/alignment/pairwise/align_pairwise.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <seqan3/alignment/pairwise/detail/type_traits.hpp>
#include <seqan3/core/algorithm/algorithm_result_generator_range.hpp>
#include <seqan3/core/algorithm/detail/algorithm_executor_blocking.hpp>
#include <seqan3/core/detail/all_view.hpp>
#include <seqan3/utility/simd/simd.hpp>
#include <seqan3/utility/simd/simd_traits.hpp>
#include <seqan3/utility/type_traits/basic.hpp>
Expand Down Expand Up @@ -163,8 +162,8 @@ constexpr auto align_pairwise(sequence_t && sequences, alignment_config_t const
static_assert(std::ranges::random_access_range<second_seq_t> && std::ranges::sized_range<second_seq_t>,
"Alignment configuration error: The sequence must model random_access_range and sized_range.");

// Pipe with seqan3::detail::all to allow rvalue non-view ranges.
auto seq_view = std::forward<sequence_t>(sequences) | seqan3::detail::all;
// Pipe with std::views::all to allow rvalue non-view ranges.
auto seq_view = std::forward<sequence_t>(sequences) | std::views::all;
// Configure the alignment algorithm.
auto && [algorithm, complete_config] = detail::alignment_configurator::configure<decltype(seq_view)>(config);

Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/alignment/pairwise/detail/concept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ concept align_pairwise_single_input =
* a) An lvalue range, whose reference type is a tuple like lvalue reference,
* b) A range, whose reference type is a tuple over viewable ranges.
* This covers also transforming and non-transforming views (e.g. views::zip, or views::take).
* Only a temporary non-view range piped with seqan3::detail::all can't be handled securely.
* Only a temporary non-view range piped with std::views::all can't be handled securely.
*/
//!\cond
template <typename t>
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/core/configuration/detail/concept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ inline constexpr std::array<std::array<void *, 0>, 0> compatibility_table{};
* \brief Concept for an algorithm configuration element.
* \ingroup core_configuration
*
* \extends std::copyable
* \extends std::movable
* \implements seqan3::pipeable_config_element
*/

Expand All @@ -64,7 +64,7 @@ inline constexpr std::array<std::array<void *, 0>, 0> compatibility_table{};
template <typename config_t>
concept config_element = requires {
requires std::is_base_of_v<seqan3::pipeable_config_element, config_t>;
requires std::copyable<config_t>;
requires std::movable<config_t>;
{ config_t::id };
};
//!\endcond
Expand Down
42 changes: 0 additions & 42 deletions include/seqan3/core/detail/all_view.hpp

This file was deleted.

Loading

0 comments on commit 799f3b5

Please sign in to comment.