14#ifndef RANGES_V3_VIEW_TAKE_LAST_HPP
15#define RANGES_V3_VIEW_TAKE_LAST_HPP
26#include <range/v3/detail/prologue.hpp>
37 template(
typename Rng)(
39 auto operator()(Rng && rng, range_difference_t<Rng> n)
const
41 auto sz = ranges::distance(rng);
42 return drop_exactly(
static_cast<Rng &&
>(rng), sz > n ? sz - n : 0);
48 using take_last_base_fn::operator();
50 template(
typename Int)(
51 requires detail::integer_like_<Int>)
52 constexpr auto operator()(Int n)
const
64#include <range/v3/detail/epilogue.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: take_last.hpp:36
Definition: take_last.hpp:47