Files
mpl/doc/ref/Reference/vector_c.html
Dave Abrahams 01d61922bc Added libs/mpl
[SVN r15384]
2002-09-16 19:25:33 +00:00

58 lines
2.2 KiB
HTML

<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::Reference/vector c</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Content.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>vector_c</h1><h3>Synopsis</h3>
<p>
<pre>
template&lt;
typename T
, T C1 = <em>implementation-defined</em>
, T C2 = <em>implementation-defined</em>
, ...
, T CN = <em>implementation-defined</em>
&gt;
struct vector_c
{
};
</pre>
<p>
<h3>Description</h3>
<p>
<code>vector_c</code> is a shorcut interface whose whole purpose is to make the creation of a <code>vector</code> of <a href="../Integral_Constant.html">Integral Constant</a>s less verbose:
<p>
<pre>
typedef vector_c&lt;unsigned long,-1,0,1,1,-1,0,0,1,-1&gt; data;
</pre>
<p>
If <code>vector_c</code> didn't exist, instead of the above line you would have to write this:
<p>
<pre>
typedef vector&lt;
integral_c&lt;unsigned long,-1&gt;
, integral_c&lt;unsigned long,0&gt;
, integral_c&lt;unsigned long,1&gt;
, integral_c&lt;unsigned long,1&gt;
, integral_c&lt;unsigned long,-1&gt;
, integral_c&lt;unsigned long,0&gt;
, integral_c&lt;unsigned long,0&gt;
, integral_c&lt;unsigned long,1&gt;
, integral_c&lt;unsigned long,-1&gt;
&gt; data;
</pre>
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../\boost/mpl/vector_c.hpp">boost/mpl/vector_c.hpp</a>"
#include "<a href="../../../../../\boost/mpl/vector/vector0_c.hpp">boost/mpl/vector/vector0_c.hpp</a>"
#include "<a href="../../../../../\boost/mpl/vector/vector10_c.hpp">boost/mpl/vector/vector10_c.hpp</a>"
...
#include "<a href="../../../../../\boost/mpl/vector/vector50_c.hpp">boost/mpl/vector/vector50_c.hpp</a>"
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Random_Access_Sequence.html">Random Access Sequence</a>, <code><a href="../Reference/vector.html">vector</a></code>, <code><a href="../Reference/list.html">list</a></code>, <code><a href="../Reference/list_c.html">list_c</a></code>, <code><a href="../Reference/range_c.html">range_c</a></code>
<p><hr>
<a href="../Table_of_Content.html">Table of Content</a> | <a href="../Reference.html">Reference</a><br>Last edited July 17, 2002 8:01 am</body></html>