1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Function swap</title> 6<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../any/reference.html#header.boost.any_hpp" title="Header <boost/any.hpp>"> 10<link rel="prev" href="any.html" title="Class any"> 11<link rel="next" href="any_cast.html" title="Function any_cast"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td> 16<td align="center"><a href="../../../index.html">Home</a></td> 17<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="any.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any/reference.html#header.boost.any_hpp"><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="any_cast.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.swap_1_3_5_5_2_1_3"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Function swap</span></h2> 30<p>boost::swap</p> 31</div> 32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../any/reference.html#header.boost.any_hpp" title="Header <boost/any.hpp>">boost/any.hpp</a>> 34 35</span> 36<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><a class="link" href="any.html" title="Class any">any</a> <span class="special">&</span> lhs<span class="special">,</span> <a class="link" href="any.html" title="Class any">any</a> <span class="special">&</span> rhs<span class="special">)</span><span class="special">;</span></pre></div> 37<div class="refsect1"> 38<a name="id-1.3.5.5.3.5.4"></a><h2>Description</h2> 39<div class="variablelist"><table border="0" class="variablelist compact"> 40<colgroup> 41<col align="left" valign="top"> 42<col> 43</colgroup> 44<tbody> 45<tr> 46<td><p><span class="term">Effects:</span></p></td> 47<td>Exchange of the contents of 48 <code class="computeroutput">lhs</code> and 49 <code class="computeroutput">rhs</code>.</td> 50</tr> 51<tr> 52<td><p><span class="term">Throws:</span></p></td> 53<td>Nothing.</td> 54</tr> 55</tbody> 56</table></div> 57</div> 58</div> 59<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 60<td align="left"></td> 61<td align="right"><div class="copyright-footer">Copyright © 2001 Kevlin Henney<br>Copyright © 2013-2020 Antony Polukhin<p>Distributed under the Boost Software License, Version 1.0. 62 (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at 63 <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 64 </p> 65</div></td> 66</tr></table> 67<hr> 68<div class="spirit-nav"> 69<a accesskey="p" href="any.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any/reference.html#header.boost.any_hpp"><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="any_cast.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 70</div> 71</body> 72</html> 73