3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5 <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../../../index.html" title="Chapter 1. Range 2.0">
8 <link rel="up" href="../mutating.html" title="Mutating algorithms">
9 <link rel="prev" href="copy_backward.html" title="copy_backward">
10 <link rel="next" href="fill_n.html" title="fill_n">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="copy_backward.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mutating.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fill_n.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h5 class="title">
27 <a name="range.reference.algorithms.mutating.fill"></a><a class="link" href="fill.html" title="fill">fill</a>
28 </h5></div></div></div>
30 <a name="range.reference.algorithms.mutating.fill.h0"></a>
31 <span class="phrase"><a name="range.reference.algorithms.mutating.fill.prototype"></a></span><a class="link" href="fill.html#range.reference.algorithms.mutating.fill.prototype">Prototype</a>
35 <pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">></span>
36 <span class="identifier">ForwardRange</span><span class="special">&</span> <span class="identifier">fill</span><span class="special">(</span> <span class="identifier">ForwardRange</span><span class="special">&</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&</span> <span class="identifier">val</span> <span class="special">);</span>
41 <a name="range.reference.algorithms.mutating.fill.h1"></a>
42 <span class="phrase"><a name="range.reference.algorithms.mutating.fill.description"></a></span><a class="link" href="fill.html#range.reference.algorithms.mutating.fill.description">Description</a>
45 <code class="computeroutput"><span class="identifier">fill</span></code> assigns the value
46 <code class="computeroutput"><span class="identifier">val</span></code> to every element
47 in the range <code class="computeroutput"><span class="identifier">rng</span></code>.
50 <a name="range.reference.algorithms.mutating.fill.h2"></a>
51 <span class="phrase"><a name="range.reference.algorithms.mutating.fill.definition"></a></span><a class="link" href="fill.html#range.reference.algorithms.mutating.fill.definition">Definition</a>
54 Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">fill</span><span class="special">.</span><span class="identifier">hpp</span></code>
57 <a name="range.reference.algorithms.mutating.fill.h3"></a>
58 <span class="phrase"><a name="range.reference.algorithms.mutating.fill.requirements"></a></span><a class="link" href="fill.html#range.reference.algorithms.mutating.fill.requirements">Requirements</a>
60 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
62 <code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a
63 model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward
67 <code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
70 <code class="computeroutput"><span class="identifier">Value</span></code> is a model
71 of the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
74 <code class="computeroutput"><span class="identifier">Value</span></code> is convertible
75 to <code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s
80 <a name="range.reference.algorithms.mutating.fill.h4"></a>
81 <span class="phrase"><a name="range.reference.algorithms.mutating.fill.complexity"></a></span><a class="link" href="fill.html#range.reference.algorithms.mutating.fill.complexity">Complexity</a>
84 Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> assignments are performed.
87 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
88 <td align="left"></td>
89 <td align="right"><div class="copyright-footer">Copyright © 2003-2010 Thorsten Ottosen,
91 Distributed under the Boost Software License, Version 1.0. (See accompanying
92 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
97 <div class="spirit-nav">
98 <a accesskey="p" href="copy_backward.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mutating.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fill_n.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>