mirror of
https://github.com/boostorg/iterator.git
synced 2025-05-11 21:43:54 +00:00
50 lines
2.0 KiB
HTML
50 lines
2.0 KiB
HTML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="generator" content="Docutils 0.3.1: http://docutils.sourceforge.net/" />
|
|
<title>Swappable Iterator Concept</title>
|
|
<link rel="stylesheet" href="default.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div class="document" id="swappable-iterator-concept">
|
|
<h1 class="title">Swappable Iterator Concept</h1>
|
|
<p>A class or built-in type <tt class="literal"><span class="pre">X</span></tt> models the <em>Swappable Iterator</em> concept
|
|
if, in addition to <tt class="literal"><span class="pre">X</span></tt> being Copy Constructible, the following
|
|
expressions are valid and respect the stated semantics.</p>
|
|
<table border class="table">
|
|
<colgroup>
|
|
<col width="37%" />
|
|
<col width="19%" />
|
|
<col width="43%" />
|
|
</colgroup>
|
|
<thead valign="bottom">
|
|
<tr><th colspan="3">Swappable Iterator Requirements (in addition to Copy Constructible)</th>
|
|
</tr>
|
|
<tr><th>Expression</th>
|
|
<th>Return Type</th>
|
|
<th>Postcondition</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr><td><tt class="literal"><span class="pre">iter_swap(a,</span> <span class="pre">b)</span></tt></td>
|
|
<td><tt class="literal"><span class="pre">void</span></tt></td>
|
|
<td>the pointed to values are
|
|
exchanged</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl>
|
|
<dt>[<em>Note:</em> An iterator that is a model of the <em>Readable</em> and <em>Writable Iterator</em> concepts</dt>
|
|
<dd>is also a model of <em>Swappable Iterator</em>. <em>--end note</em>]</dd>
|
|
</dl>
|
|
</div>
|
|
<hr class="footer" />
|
|
<div class="footer">
|
|
<a class="reference" href="SwappableIterator.rst">View document source</a>.
|
|
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
|
</div>
|
|
</body>
|
|
</html>
|