blob: 1375d4eea5dd01c435b984b737dc18fefecd1553 [file] [log] [blame]
Brian Silverman598d0292018-08-04 23:56:47 -07001[/
2 Copyright 2010 Neil Groves
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5/]
6[section:fill_n fill_n]
7
8[heading Prototype]
9
10``
11template<class ForwardRange, class Size, class Value>
12ForwardRange& fill( ForwardRange& rng, Size n, const Value& val );
13``
14
15[heading Description]
16
17`fill_n` assigns the value `val` to `n` elements in the range `rng` beginning with `boost::begin(rng)`.
18
19[heading Definition]
20
21Defined in the header file `boost/range/algorithm/fill_n.hpp`
22
23[heading Requirements]
24
25* `ForwardRange` is a model of the __forward_range__ Concept.
26* `ForwardRange` is mutable.
27* `Value` is a model of the `AssignableConcept`.
28* `Value` is convertible to `ForwardRange`'s value type.
29
30[heading Complexity]
31
32Linear. Exactly `n` assignments are performed.
33
34[endsect]
35
36