Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MISC] Deprecate views::take_until #2604

Merged
merged 3 commits into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ regression test suite and patches at https://github.com/seqan/seqan3/tree/master
[\#2541](https://github.com/seqan/seqan3/pull/2541).
* We deprecated `seqan3::views::take_line` and it will be removed in 3.1.0
[\#2525](https://github.com/seqan/seqan3/pull/2525).
* We deprecated `seqan3::views::take_until` and it will be removed in 3.1.0. Use
`std::views::take_while(std::not_fn(predicate))` instead ([\#2604](https://github.com/seqan/seqan3/pull/2604)).
* We deprecated `seqan3::views::to_upper` and it will be removed in 3.1.0, use
`std::views::transform([](auto && chr){return std::toupper(chr)})`.
([\#2540](https://github.com/seqan/seqan3/pull/2538))
eseiler marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/alphabet/views/trim_quality.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <seqan3/std/ranges>

#include <seqan3/alphabet/quality/qualified.hpp>
#include <seqan3/range/views/take_until.hpp>
#include <seqan3/io/detail/take_until_view.hpp>
#include <seqan3/utility/views/deep.hpp>

namespace seqan3::detail
Expand Down Expand Up @@ -55,7 +55,7 @@ struct trim_fn
"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 score type.");

return views::take_until(std::forward<irng_t>(irange), [threshold] (auto const value)
return detail::take_until(std::forward<irng_t>(irange), [threshold] (auto const value)
{
if constexpr (std::same_as<std::remove_cvref_t<threshold_t>,
std::remove_cvref_t<std::ranges::range_reference_t<irng_t>>>)
Expand Down
6 changes: 3 additions & 3 deletions include/seqan3/io/detail/take_line_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#pragma once

#include <seqan3/range/views/take_until.hpp>
#include <seqan3/io/detail/take_until_view.hpp>
#include <seqan3/utility/char_operations/predicate.hpp>

// ============================================================================
Expand Down Expand Up @@ -75,7 +75,7 @@ namespace seqan3::detail
* On single pass std::ranges::input_range it can be used to tokenise the input stream line-wise:
* \include test/snippet/io/detail/take_line_view_tokenise.cpp
*/
inline auto constexpr take_line = views::take_until_and_consume(is_char<'\r'> || is_char<'\n'>);
inline auto constexpr take_line = detail::take_until_and_consume(is_char<'\r'> || is_char<'\n'>);

// ============================================================================
// detail::take_line_or_throw (adaptor instance definition)
Expand All @@ -87,7 +87,7 @@ inline auto constexpr take_line = views::take_until_and_consume(is_char<'\r'> ||
*
* \copydetails seqan3::detail::take_line
*/
inline auto constexpr take_line_or_throw = views::take_until_or_throw_and_consume(is_char<'\r'> || is_char<'\n'>);
inline auto constexpr take_line_or_throw = detail::take_until_or_throw_and_consume(is_char<'\r'> || is_char<'\n'>);

//!\}

Expand Down
Loading