absl::c_fill_n

Container-based version of the <algorithm> std::fill_n() function to fill the first N elements in a container with some value.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename Size,
    typename T>
constexpr
void
c_fill_n(
    C&& c,
    Size n,
    T const& value)
requires container_algorithm_internal::IsPermissibleDestinationRange<C>::value;

Parameters

NameDescription
cThe container to fill.
nThe number of elements to fill.
valueThe value assigned to each element.