• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>basic_static_string::assign (6 of 9 overloads)</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="Boost.StaticString">
8<link rel="up" href="../assign.html" title="basic_static_string::assign">
9<link rel="prev" href="overload5.html" title="basic_static_string::assign (5 of 9 overloads)">
10<link rel="next" href="overload7.html" title="basic_static_string::assign (7 of 9 overloads)">
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="overload5.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../assign.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="overload7.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="static_string.ref.boost__static_strings__basic_static_string.assign.overload6"></a><a class="link" href="overload6.html" title="basic_static_string::assign (6 of 9 overloads)">basic_static_string::assign
28          (6 of 9 overloads)</a>
29</h5></div></div></div>
30<p>
31            Assign to the string.
32          </p>
33<h6>
34<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h0"></a>
35            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.synopsis"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.synopsis">Synopsis</a>
36          </h6>
37<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
38    <span class="special">[</span><span class="identifier">role</span> <span class="identifier">red</span> <span class="identifier">error</span><span class="special">.</span><span class="identifier">param</span> <span class="identifier">neither</span> <span class="identifier">has</span> <span class="identifier">a</span> <span class="identifier">declname</span> <span class="identifier">nor</span> <span class="identifier">a</span> <span class="char">'class '</span> <span class="identifier">prefix</span> <span class="identifier">in</span> <span class="identifier">the</span> <span class="identifier">type</span><span class="special">][</span><span class="identifier">role</span> <span class="identifier">red</span> <span class="identifier">error</span><span class="special">.</span><span class="identifier">param</span> <span class="identifier">neither</span> <span class="identifier">has</span> <span class="identifier">a</span> <span class="identifier">declname</span> <span class="identifier">nor</span> <span class="identifier">a</span> <span class="char">'class '</span> <span class="identifier">prefix</span> <span class="identifier">in</span> <span class="identifier">the</span> <span class="identifier">type</span><span class="special">][</span><span class="identifier">role</span> <span class="identifier">red</span> <span class="identifier">error</span><span class="special">.</span><span class="identifier">param</span> <span class="identifier">neither</span> <span class="identifier">has</span> <span class="identifier">a</span> <span class="identifier">declname</span> <span class="identifier">nor</span> <span class="identifier">a</span> <span class="char">'class '</span> <span class="identifier">prefix</span> <span class="identifier">in</span> <span class="identifier">the</span> <span class="identifier">type</span><span class="special">][</span><span class="identifier">role</span> <span class="identifier">red</span> <span class="identifier">error</span><span class="special">.</span><span class="identifier">param</span> <span class="identifier">neither</span> <span class="identifier">has</span> <span class="identifier">a</span> <span class="identifier">declname</span> <span class="identifier">nor</span> <span class="identifier">a</span> <span class="char">'class '</span> <span class="identifier">prefix</span> <span class="identifier">in</span> <span class="identifier">the</span> <span class="identifier">type</span><span class="special">]&gt;</span>
39<span class="keyword">constexpr</span> <span class="identifier">basic_static_string</span><span class="special">&amp;</span>
40<span class="identifier">assign</span><span class="special">(</span>
41    <span class="identifier">InputIterator</span> <span class="identifier">first</span><span class="special">,</span>
42    <span class="identifier">InputIterator</span> <span class="identifier">last</span><span class="special">);</span>
43</pre>
44<h6>
45<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h1"></a>
46            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.description"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.description">Description</a>
47          </h6>
48<p>
49            Replaces the contents with the characters in the range <code class="computeroutput"><span class="special">{</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">)</span></code>.
50          </p>
51<h6>
52<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h2"></a>
53            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.complexity"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.complexity">Complexity</a>
54          </h6>
55<p>
56            Linear in <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">)</span></code>.
57          </p>
58<h6>
59<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h3"></a>
60            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.exception_safety"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.exception_safety">Exception
61            Safety</a>
62          </h6>
63<p>
64            Strong guarantee.
65          </p>
66<h6>
67<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h4"></a>
68            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.template_parameters"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.template_parameters">Template
69            Parameters</a>
70          </h6>
71<div class="informaltable"><table class="table">
72<colgroup>
73<col>
74<col>
75</colgroup>
76<thead><tr>
77<th>
78                    <p>
79                      Type
80                    </p>
81                  </th>
82<th>
83                    <p>
84                      Description
85                    </p>
86                  </th>
87</tr></thead>
88<tbody><tr>
89<td>
90                    <p>
91                      <code class="computeroutput"><span class="identifier">InputIterator</span></code>
92                    </p>
93                  </td>
94<td>
95                    <p>
96                      The type of the iterators.
97                    </p>
98                  </td>
99</tr></tbody>
100</table></div>
101<h6>
102<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h5"></a>
103            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.constraints"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.constraints">Constraints</a>
104          </h6>
105<p>
106            <code class="computeroutput"><span class="identifier">InputIterator</span></code>satisfies
107            <span class="bold"><strong>InputIterator</strong></span>.
108          </p>
109<h6>
110<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h6"></a>
111            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.return_value"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.return_value">Return
112            Value</a>
113          </h6>
114<p>
115            <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>
116          </p>
117<h6>
118<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h7"></a>
119            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.parameters"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.parameters">Parameters</a>
120          </h6>
121<div class="informaltable"><table class="table">
122<colgroup>
123<col>
124<col>
125</colgroup>
126<thead><tr>
127<th>
128                    <p>
129                      Name
130                    </p>
131                  </th>
132<th>
133                    <p>
134                      Description
135                    </p>
136                  </th>
137</tr></thead>
138<tbody>
139<tr>
140<td>
141                    <p>
142                      <code class="computeroutput"><span class="identifier">first</span></code>
143                    </p>
144                  </td>
145<td>
146                    <p>
147                      An iterator referring to the first character to assign.
148                    </p>
149                  </td>
150</tr>
151<tr>
152<td>
153                    <p>
154                      <code class="computeroutput"><span class="identifier">last</span></code>
155                    </p>
156                  </td>
157<td>
158                    <p>
159                      An iterator past the end of the range to assign from.
160                    </p>
161                  </td>
162</tr>
163</tbody>
164</table></div>
165<h6>
166<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.h8"></a>
167            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload6.exceptions"></a></span><a class="link" href="overload6.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload6.exceptions">Exceptions</a>
168          </h6>
169<div class="informaltable"><table class="table">
170<colgroup>
171<col>
172<col>
173</colgroup>
174<thead><tr>
175<th>
176                    <p>
177                      Type
178                    </p>
179                  </th>
180<th>
181                    <p>
182                      Thrown On
183                    </p>
184                  </th>
185</tr></thead>
186<tbody><tr>
187<td>
188                    <p>
189                      <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">length_error</span></code>
190                    </p>
191                  </td>
192<td>
193                    <p>
194                      std::distance(first, last) &gt; <a class="link" href="../max_size.html" title="basic_static_string::max_size"><code class="computeroutput"><span class="identifier">max_size</span><span class="special">()</span></code></a>.
195                    </p>
196                  </td>
197</tr></tbody>
198</table></div>
199</div>
200<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
201<td align="left"></td>
202<td align="right"><div class="copyright-footer">Copyright © 2019, 2020 Krystian Stasiowski<br>Copyright © 2016-2019 Vinnie
203      Falco<p>
204        Distributed under the Boost Software License, Version 1.0. (See accompanying
205        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>)
206      </p>
207</div></td>
208</tr></table>
209<hr>
210<div class="spirit-nav">
211<a accesskey="p" href="overload5.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../assign.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="overload7.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
212</div>
213</body>
214</html>
215