14#ifndef RANGES_V3_VIEW_REF_HPP
15#define RANGES_V3_VIEW_REF_HPP
24#include <range/v3/utility/addressof.hpp>
27#include <range/v3/detail/prologue.hpp>
31 template<
typename Rng>
34 template<
typename Rng>
35 RANGES_INLINE_VAR
constexpr bool enable_borrowed_range<ref_view<Rng>> =
true;
39 template<
typename Rng>
44 static_assert(std::is_object<Rng>::value,
"");
47 constexpr ref_view()
noexcept =
default;
48 constexpr ref_view(Rng & rng) noexcept
49 : rng_(detail::addressof(rng))
51 constexpr Rng & base()
const noexcept
55 constexpr iterator_t<Rng> begin()
const noexcept(
noexcept(ranges::begin(*rng_)))
57 return ranges::begin(*rng_);
59 constexpr sentinel_t<Rng> end()
const noexcept(
noexcept(ranges::end(*rng_)))
61 return ranges::end(*rng_);
64 constexpr auto empty()
const noexcept(
noexcept(
ranges::empty(*rng_)))
66 requires detail::can_empty_<Rng>)
71 constexpr auto CPP_fun(size)()(
const
78 constexpr auto CPP_fun(data)()(
const
79 noexcept(
noexcept(ranges::data(*rng_)))
82 return ranges::data(*rng_);
86#if RANGES_CXX_DEDUCTION_GUIDES >= RANGES_CXX_DEDUCTION_GUIDES_17
97 template(
typename Rng)(
103 template<
typename Rng>
104 void operator()(Rng
const && rng)
const =
delete;
114 template(
typename Rng)(
115 requires std::is_object<Rng>::value)
120#include <range/v3/detail/satisfy_boost_range.hpp>
123#include <range/v3/detail/epilogue.hpp>
The contiguous_range concept.
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
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
meta::size_t< L::size()> size
An integral constant wrapper that is the size of the meta::list L.
Definition: meta.hpp:1696
bool_< 0==size< L >::type::value > empty
An Boolean integral constant wrapper around true if L is an empty type list; false,...
Definition: meta.hpp:2231
Definition: interface.hpp:129