ta)(*r_); }
      };
     
      template<class R>
        ref_view(R&) -> ref_view<R>;
    }

####  [ [ edit
](/mwiki/index.php?title=Template:cpp/synopsis/ranges&action=edit&section=T-28
"Template:cpp/synopsis/ranges") ]  Class template  std::ranges::owning_view

    
    
    namespace std::ranges {
      template<range R>
        requires movable<R> && (!__is_initializer_list<R>)
      class owning_view : public view_interface<owning_view<R>> {
      private:
        R r_ = R();         // exposition only
      public:
        owning_view() requires default_initializable<R> = default;
        constexpr owning_view(R&& t);
     
        owning_view(owning_view&&) = default;
        owning_view& operator=(owning_view&&) = default;
     
        constexpr R& base() & noexcept { return r_; }
        constexpr const R& base() const & noexcept { return r_; }
        constexpr R&& base() && noexcept { return std::move(r_); }
        constexpr const R&& base() const && noexcept { return std::move(r_); }
     
        constexpr iterator_t<R> begin() { return [ranges::begin](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin)(r_); }
        constexpr sentinel_t<R> end() { return [ranges::end](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/end)(r_); }
     
        constexpr auto begin() const requires range<const R>
        { return [ranges::begin](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin)(r_); }
        constexpr auto end() const requires range<const R>
        { return [ranges::end](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/end)(r_); }
     
        constexpr bool empty() requires requires { [ranges::empty](http://en.cppreference.com/w/cpp/ranges/empty)(r_); }
        { return [ranges::empty](http://en.cppreference.com/w/cpp/ranges/empty)(r_); }
        constexpr bool empty() const requires requires { [ranges::empty](http://en.cppreference.com/w/cpp/ranges/empty)(r_); }
        { return [ranges::empty](http://en.cppreference.com/w/cpp/ranges/empty)(r_); }
     
        constexpr auto size() requires sized_range<R>
        { return [ranges::size](http://en.cppreference.com/w/cpp/ranges/size)(r_); }
        constexpr auto size() const requires sized_range<const R>
        { return [ranges::size](http://en.cppreference.com/w/cpp/ranges/size)(r_); }
     
        constexpr auto data() requires contiguous_range<R>
        { return [ranges::data](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/data)(r_); }
        constexpr auto data() const requires contiguous_range<const R>
        { return [ranges::data](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/data)(r_); }
      };
    }

####  [ [ edit
](/mwiki/index.php?title=Template:cpp/synopsis/ranges&action=edit&section=T-29
"Template:cpp/synopsis/ranges") ]  Class template  std::ranges::as_rvalue_view

    
    
    namespace std::ranges {
      template<view V>
        requires input_range<V>
      class as_rvalue_view : public view_interface<as_rvalue_view<V>> {
        V base_ = V();      // exposition only
     
      public:
        as_rvalue_view() requires default_initializable<V> = default;
        constexpr explicit as_rvalue_view(V base);
     
        constexpr V base() const & requires copy_constructible<V> { return base_; }
        constexpr V base() && { return std::move(base_); }
     
        constexpr auto begin() requires (!__simple_view<V>)
        { return move_iterator([ranges::begin](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin)(base_)); }
        constexpr auto begin() const requires range<const V>
        { return move_iterator([ranges::begin](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin)(base_)); }
     
        constexpr auto end() requires (!__simple_view<V>) {
          if constexpr (common_range<V>) {
            return move_iterator([ranges::end](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/end)(base_));
          }