• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>overwrite</title>
5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../../index.html" title="Chapter 1. Range 2.0">
8<link rel="up" href="../new.html" title="New algorithms">
9<link rel="prev" href="is_sorted.html" title="is_sorted">
10<link rel="next" href="push_back.html" title="push_back">
11</head>
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>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="is_sorted.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../new.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="push_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="range.reference.algorithms.new.overwrite"></a><a class="link" href="overwrite.html" title="overwrite">overwrite</a>
28</h5></div></div></div>
29<h6>
30<a name="range.reference.algorithms.new.overwrite.h0"></a>
31            <span class="phrase"><a name="range.reference.algorithms.new.overwrite.prototype"></a></span><a class="link" href="overwrite.html#range.reference.algorithms.new.overwrite.prototype">Prototype</a>
32          </h6>
33<p>
34</p>
35<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
36    <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
37    <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span>
38    <span class="special">&gt;</span>
39<span class="keyword">void</span> <span class="identifier">overwrite</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span>
40               <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">);</span>
41</pre>
42<p>
43          </p>
44<h6>
45<a name="range.reference.algorithms.new.overwrite.h1"></a>
46            <span class="phrase"><a name="range.reference.algorithms.new.overwrite.description"></a></span><a class="link" href="overwrite.html#range.reference.algorithms.new.overwrite.description">Description</a>
47          </h6>
48<p>
49            <code class="computeroutput"><span class="identifier">overwrite</span></code> assigns the
50            values from the range <code class="computeroutput"><span class="identifier">from</span></code>
51            into the range <code class="computeroutput"><span class="identifier">to</span></code>.
52          </p>
53<h6>
54<a name="range.reference.algorithms.new.overwrite.h2"></a>
55            <span class="phrase"><a name="range.reference.algorithms.new.overwrite.definition"></a></span><a class="link" href="overwrite.html#range.reference.algorithms.new.overwrite.definition">Definition</a>
56          </h6>
57<p>
58            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_ext</span><span class="special">/</span><span class="identifier">overwrite</span><span class="special">.</span><span class="identifier">hpp</span></code>
59          </p>
60<h6>
61<a name="range.reference.algorithms.new.overwrite.h3"></a>
62            <span class="phrase"><a name="range.reference.algorithms.new.overwrite.requirements"></a></span><a class="link" href="overwrite.html#range.reference.algorithms.new.overwrite.requirements">Requirements</a>
63          </h6>
64<div class="orderedlist"><ol class="orderedlist" type="1">
65<li class="listitem">
66                <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>
67                is a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
68                Pass Range</a> Concept.
69              </li>
70<li class="listitem">
71                <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>
72                is a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
73                Pass Range</a> Concept.
74              </li>
75<li class="listitem">
76                <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>
77                is mutable.
78              </li>
79<li class="listitem">
80                <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">)</span>
81                <span class="special">&lt;=</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">SinglePassRange2</span><span class="special">)</span></code>
82              </li>
83<li class="listitem">
84                <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
85                value type is convertible to <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
86                value type.
87              </li>
88</ol></div>
89<h6>
90<a name="range.reference.algorithms.new.overwrite.h4"></a>
91            <span class="phrase"><a name="range.reference.algorithms.new.overwrite.complexity"></a></span><a class="link" href="overwrite.html#range.reference.algorithms.new.overwrite.complexity">Complexity</a>
92          </h6>
93<p>
94            Linear. <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code>
95            assignments are performed.
96          </p>
97</div>
98<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
99<td align="left"></td>
100<td align="right"><div class="copyright-footer">Copyright © 2003-2010 Thorsten Ottosen,
101      Neil Groves<p>
102        Distributed under the Boost Software License, Version 1.0. (See accompanying
103        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>)
104      </p>
105</div></td>
106</tr></table>
107<hr>
108<div class="spirit-nav">
109<a accesskey="p" href="is_sorted.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../new.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="push_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
110</div>
111</body>
112</html>
113