blob: 2f97fcb0f562bd94797c8f7d39ab71e7dbf5dac7 [file] [log] [blame]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template small_vector_base</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_container_header_reference.html#header.boost.container.small_vector_hpp" title="Header &lt;boost/container/small_vector.hpp&gt;">
<link rel="prev" href="small_vector_allocator/rebind.html" title="Struct template rebind">
<link rel="next" href="stable_vector.html" title="Class template stable_vector">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="small_vector_allocator/rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#header.boost.container.small_vector_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="stable_vector.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.container.small_vector_base"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template small_vector_base</span></h2>
<p>boost::container::small_vector_base</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_container_header_reference.html#header.boost.container.small_vector_hpp" title="Header &lt;boost/container/small_vector.hpp&gt;">boost/container/small_vector.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> SecondaryAllocator<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">:</span> <span class="keyword">public</span> boost::container::vector&lt; T, small_vector_allocator&lt; SecondaryAllocator &gt; &gt;
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// <a class="link" href="small_vector_base.html#boost.container.small_vector_baseconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span> <a class="link" href="small_vector_base.html#idp31297088-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span> <a class="link" href="small_vector_base.html#idp31299088-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="small_vector_base.html#idp31294544-bb">public member functions</a></span>
<span class="keyword">void</span> <a class="link" href="small_vector_base.html#idp31295104-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp163243504"></a><h2>Description</h2>
<p>This class consists of common code from all small_vector&lt;T, N&gt; types that don't depend on the "N" template parameter. This class is non-copyable and non-destructible, so this class tipically used as reference argument to functions that read or write small vectors. Since <code class="computeroutput"><a class="link" href="small_vector.html" title="Class template small_vector">small_vector</a>&lt;T, N&gt;</code> derives from <code class="computeroutput"><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a>&lt;T&gt;</code>, the conversion to <code class="computeroutput"><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a></code> is implicit: <code class="computeroutput"></code></p>
<p><code class="computeroutput">//Clients can pass any small_vector&lt;Foo, N&gt;. void read_any_small_vector_of_foo(const small_vector_base&lt;Foo&gt; &amp;in_parameter); void modify_any_small_vector_of_foo(small_vector_base&lt;Foo&gt; &amp;out_parameter);</code></p>
<p><code class="computeroutput">void some_function() { small_vector&lt;Foo, 8&gt; myvector; read_any_small_vector_of_foo(myvector); // Reads myvector modify_any_small_vector_of_foo(myvector); // Modifies myvector } </code></p>
<p>All <code class="computeroutput">boost::container:vector</code> member functions are inherited. See <code class="computeroutput">vector</code> documentation for details. </p>
<div class="refsect2">
<a name="idp163253040"></a><h3>
<a name="boost.container.small_vector_baseconstruct-copy-destruct"></a><code class="computeroutput">small_vector_base</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span> <a name="idp31297088-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span> other<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span> <a name="idp31299088-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;&amp;</span> other<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idp163270656"></a><h3>
<a name="idp31294544-bb"></a><code class="computeroutput">small_vector_base</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="idp31295104-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="small_vector_base.html" title="Class template small_vector_base">small_vector_base</a> <span class="special">&amp;</span> other<span class="special">)</span><span class="special">;</span></pre></li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2013 Ion Gaztanaga<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="small_vector_allocator/rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#header.boost.container.small_vector_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="stable_vector.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>