12 template <rng::input_range R,
typename ProjectBound,
typename ProjectRange>
requires (rng::view<R> && is_vertex<rng::range_value_t<R>>)
16 using edge_type = std::pair<vertex_type, vertex_type>;
30 base_range(std::move(base_range)),
31 bind_vertex(bind_vertex)
34 [[nodiscard]]
constexpr auto begin(
void)
const {
return iterator { rng::begin(base_range), bind_vertex }; }
35 [[nodiscard]]
constexpr auto end (
void)
const {
return iterator { rng::end(base_range), bind_vertex }; }
37 [[nodiscard]]
constexpr auto size(
void)
const requires rng::sized_range<const R> {
38 return rng::size(base_range);
42 vertex_type bind_vertex;
49 constexpr iterator(
void) =
default;
50 constexpr iterator(
detail::const_iterator_t<R> base_iterator, vertex_type bind_vertex) : base(std::move(base_iterator)), bind_vertex(bind_vertex) {}
52 friend class wrapping_iterator<iterator, detail::const_iterator_t<R>, edge_type>;
55 vertex_type bind_vertex;
58 constexpr auto get(void) const {
59 auto* provided_vertex = *base::wrapped_iterator;
62 ProjectBound{}(result) = bind_vertex;
63 ProjectRange{}(result) = provided_vertex;
constexpr edge_from_vertex_view(R base_range, vertex_type bind_vertex)
std::pair< vertex_type, vertex_type > edge_type
constexpr auto size(void) const
typename rng::range_value_t< R > vertex_type
constexpr auto end(void) const
constexpr auto begin(void) const
decltype(rng::cbegin(std::declval< R & >())) const_iterator_t