14#ifndef RANGES_V3_VIEW_DELIMIT_HPP
15#define RANGES_V3_VIEW_DELIMIT_HPP
25#include <range/v3/utility/static_const.hpp>
31#include <range/v3/detail/prologue.hpp>
37 template<
typename Rng,
typename Val>
40 is_finite<Rng>::value ? finite : unknown>
48 sentinel_adaptor() =
default;
49 sentinel_adaptor(Val value)
50 : value_(std::move(value))
52 template<
class I,
class S>
53 bool empty(I
const & it, S
const & last)
const
55 return it == last || *it == value_;
60 sentinel_adaptor end_adaptor()
const
68 : delimit_view::view_adaptor{std::move(rng)}
69 , value_(std::move(value))
75 template<
typename Rng,
typename Val>
76 RANGES_INLINE_VAR
constexpr bool enable_borrowed_range<delimit_view<Rng, Val>> =
77 enable_borrowed_range<Rng>;
79#if RANGES_CXX_DEDUCTION_GUIDES >= RANGES_CXX_DEDUCTION_GUIDES_17
80 template(
typename Rng,
typename Val)(
81 requires copy_constructible<Val>)
90 template(
typename I_,
typename Val,
typename I = detail::decay_t<I_>)(
93 equality_comparable_with<Val, iter_reference_t<I>>)
94 constexpr auto operator()(I_ && begin_, Val value)
const
97 return {{
static_cast<I_ &&
>(begin_), {}}, std::move(value)};
100 template(
typename Rng,
typename Val)(
102 Val> AND equality_comparable_with<Val, range_reference_t<Rng>>)
103 constexpr auto operator()(Rng && rng, Val value)
const
106 return {all(
static_cast<Rng &&
>(rng)), std::move(value)};
112 using delimit_base_fn::operator();
114 template<
typename Val>
115 constexpr auto operator()(Val value)
const
128#include <range/v3/detail/epilogue.hpp>
129#include <range/v3/detail/satisfy_boost_range.hpp>
The viewable_range concept.
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector > >, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
defer< bind_back, Fn, Ts... > bind_back
Definition: meta.hpp:994
Definition: adaptor.hpp:110
Definition: delimit.hpp:41
Definition: subrange.hpp:196
Definition: adaptor.hpp:475
CPP_member constexpr auto empty() const noexcept -> CPP_ret(bool)()
Test whether a range can be empty:
Definition: interface.hpp:154
Definition: delimit.hpp:89
Definition: delimit.hpp:111