24 Ranges library [ranges]

24.7 Range adaptors [range.adaptors]

24.7.7 Take while view [range.take.while]

24.7.7.3 Class template take_Β­while_Β­view​::​sentinel [range.take.while.sentinel]

namespace std::ranges {
  template<view V, class Pred>
    requires input_range<V> && is_object_v<Pred> &&
             indirect_unary_predicate<const Pred, iterator_t<V>>
  template<bool Const>
  class take_while_view<V, Pred>::sentinel {            // exposition only
    using Base = conditional_t<Const, const V, V>;      // exposition only

    sentinel_t<Base> end_ = sentinel_t<Base>();         // exposition only
    const Pred* pred_ = nullptr;                        // exposition only
  public:
    sentinel() = default;
    constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
    constexpr sentinel(sentinel<!Const> s)
      requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;

    constexpr sentinel_t<Base> base() const { return end_; }

    friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
  };
}
constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
Effects: Initializes end_Β­ with end and pred_Β­ with pred.
constexpr sentinel(sentinel<!Const> s) requires Const && convertible_Β­to<sentinel_t<V>, sentinel_t<Base>>;
Effects: Initializes end_Β­ with s.end_Β­ and pred_Β­ with s.pred_Β­.
friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
Effects: Equivalent to: return y.end_Β­ == x || !invoke(*y.pred_Β­, *x);