The type returned by seqan3::views::take_until and seqan3::views::take_until_or_throw. More...
#include <seqan3/range/views/take_until.hpp>
Classes | |
class | basic_consume_iterator |
Special iterator type used when consuming behaviour is selected. More... | |
class | basic_iterator |
The iterator type inherits from the underlying type, but overwrites several operators. More... | |
class | basic_sentinel |
The sentinel type of take_until, provides the comparison operators. More... | |
Public Member Functions | |
Constructors, destructor and assignment | |
view_take_until ()=default | |
Defaulted. | |
constexpr | view_take_until (view_take_until const &rhs)=default |
Defaulted. | |
constexpr | view_take_until (view_take_until &&rhs)=default |
Defaulted. | |
constexpr view_take_until & | operator= (view_take_until const &rhs)=default |
Defaulted. | |
constexpr view_take_until & | operator= (view_take_until &&rhs)=default |
Defaulted. | |
~view_take_until ()=default | |
Defaulted. | |
view_take_until (urng_t _urange, fun_t _fun) | |
Construct from another range. More... | |
template<std::ranges::viewable_range rng_t> | |
view_take_until (rng_t &&_urange, fun_t _fun) | |
Construct from another viewable_range. More... | |
Iterators | |
iterator | begin () noexcept |
Returns an iterator to the first element of the container. More... | |
const_iterator | begin () const noexcept requires const _iterable |
Returns an iterator to the first element of the container. More... | |
auto | end () noexcept |
Returns an iterator to the element following the last element of the range. More... | |
auto | end () const noexcept requires const _iterable |
Returns an iterator to the element following the last element of the range. More... | |
Private Types | |
Associated types | |
using | iterator = std::conditional_t< and_consume &&!std::ranges::forward_range< urng_t >, basic_consume_iterator< urng_t >, basic_iterator< urng_t > > |
The iterator type of this view (a random access iterator). | |
using | const_iterator = basic_iterator< urng_t const > |
The const_iterator type is equal to the iterator type if the underlying range is const-iterable. | |
Private Attributes | |
ranges::semiregular_t< fun_t > | fun |
The functor. | |
urng_t | urange |
The underlying range. | |
Static Private Attributes | |
static constexpr bool | const_iterable |
Whether this view is const_iterable or not. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename urng_t , typename fun_t , bool or_throw = false, bool and_consume = false> | |
view_take_until (urng_t &&, fun_t) -> view_take_until< std::views::all_t< urng_t >, fun_t, or_throw, and_consume > | |
Type deduction guide that strips references. | |
The type returned by seqan3::views::take_until and seqan3::views::take_until_or_throw.
urng_t | The type of the underlying range, must model std::ranges::view. |
fun_t | Type of the callable that will be evaluated on every member; must model std::invocable with std::ranges::range_reference_t<urng_t> as argument and return bool . |
or_throw | Whether to throw an exception when the input is exhausted before the end of line is reached. |
Note that most members of this class are generated by ranges::view_interface which is not yet documented here.
|
inline |
Construct from another range.
[in] | _urange | The underlying range. |
[in] | _fun | The functor that acts as termination criterium. |
|
inline |
Construct from another viewable_range.
rng_t | Type of the passed range; urng_t must be constructible from this. |
[in] | _urange | The underlying range. |
[in] | _fun | The functor that acts as termination criterium. |
|
inlinenoexcept |
Returns an iterator to the first element of the container.
If the container is empty, the returned iterator will be equal to seqan3::views::take_until::end().
Constant.
No-throw guarantee.
|
inlinenoexcept |
Returns an iterator to the first element of the container.
If the container is empty, the returned iterator will be equal to seqan3::views::take_until::end().
Constant.
No-throw guarantee.
|
inlinenoexcept |
Returns an iterator to the element following the last element of the range.
This element acts as a placeholder; attempting to dereference it results in undefined behaviour.
Constant.
No-throw guarantee.
|
inlinenoexcept |
Returns an iterator to the element following the last element of the range.
This element acts as a placeholder; attempting to dereference it results in undefined behaviour.
Constant.
No-throw guarantee.
|
staticconstexprprivate |
Whether this view is const_iterable or not.