Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

fill_n
PrevUpHomeNext
Prototype

template<class ForwardRange, class Size, class Value>
ForwardRange& fill( ForwardRange& rng, Size n, const Value& val );

Description

fill_n assigns the value val to n elements in the range rng beginning with boost::begin(rng).

Definition

Defined in the header file boost/range/algorithm/fill_n.hpp

Requirements
  • ForwardRange is a model of the Forward Range Concept.
  • ForwardRange is mutable.
  • Value is a model of the AssignableConcept.
  • Value is convertible to ForwardRange's value type.
Complexity

Linear. Exactly n assignments are performed.


PrevUpHomeNext