13template<concepts::View View,
typename Pred>
14requires(concepts::InputContainer<View> && concepts::Object<Pred> &&
15 concepts::IndirectUnaryPredicate<Pred const, meta::ContainerIterator<View>>)
18 template<
bool is_const>
21 template<
bool is_const>
24 template<
bool is_const>
29 constexpr explicit Sentinel(Sent<is_const>
base, Pred
const* predicate)
30 : m_base(
base), m_predicate(predicate) {}
32 constexpr Sentinel(Sentinel<!is_const> other)
34 : m_base(other.base()), m_predicate(other.m_predicate) {}
36 constexpr auto base()
const -> Sent<is_const> {
return m_base; }
39 constexpr friend auto operator==(Iter<is_const>
const& a, Sentinel
const& b) ->
bool {
43 Sent<is_const> m_base {};
44 Pred
const* m_predicate {
nullptr };
60 constexpr auto base() && ->
View {
return util::move(m_base); }
62 constexpr auto pred() const -> Pred const& {
return m_predicate.value(); }
71 requires(
concepts::Container<
View const> &&
concepts::IndirectUnaryPredicate<Pred const, Iter<true>>)
79 return Sentinel<false>(
container::end(m_base), util::addressof(m_predicate.value()));
82 constexpr auto end() const
83 requires(
concepts::Container<
View const> &&
concepts::IndirectUnaryPredicate<Pred const, Iter<true>>)
85 return Sentinel<true>(
container::end(m_base), util::addressof(m_predicate.value()));
82 constexpr auto end() const {
…}
93template<
typename Con,
typename Pred>
Definition take_while_view.h:16
constexpr auto base() const &-> View requires(concepts::CopyConstructible< View >)
Definition take_while_view.h:55
constexpr TakeWhileView(View base, Pred predicate)
Definition take_while_view.h:52
constexpr auto base() &&-> View
Definition take_while_view.h:60
constexpr auto begin()
Definition take_while_view.h:64
constexpr auto pred() const -> Pred const &
Definition take_while_view.h:62
constexpr auto end()
Definition take_while_view.h:76
constexpr auto end() const
Definition take_while_view.h:82
constexpr auto begin() const
Definition take_while_view.h:70
Definition view_interface.h:26
Definition rebindable_box.h:42
Definition operations.h:99
Definition operations.h:27
Definition simple_view.h:11
Definition any_storable.h:9
constexpr auto move
Definition move.h:38
TakeWhileView(Con &&, Pred) -> TakeWhileView< meta::AsView< Con >, Pred >
constexpr auto operator==(MoveIterator< Iter > const &a, MoveIterator< U > const &b) -> bool
Definition move_iterator.h:85
constexpr auto end
Definition end.h:47
constexpr auto begin
Definition begin.h:44
constexpr auto invoke
Definition invoke.h:100