libycxx

function object

std::ranges::views::repeat

Header
<ranges>
Scope
std::ranges::views
cppreference
<ranges> nearest page

Synopsis

inline constexpr /* implementation-defined */ repeat = {};

Call signatures

repeat is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.

  1. template<class T>
      requires requires { std::ranges::repeat_view<std::decay_t<T>>(std::declval<T>()); }
    [[nodiscard]] constexpr auto repeat(
        T&& value) noexcept(noexcept(std::ranges::repeat_view<std::decay_t<T>>(static_cast<T &&>(value))));
    (1)
  2. template<class T, class B>
      requires requires { std::ranges::repeat_view(
        std::declval<T>(),
        std::declval<B>()); }
    [[nodiscard]] constexpr auto repeat(
        T&& value,
        B&& y_bound) noexcept(noexcept(std::ranges::repeat_view(static_cast<T &&>(value), static_cast<B &&>(y_bound))));
    (2)