mirror of
https://github.com/boostorg/mpl.git
synced 2026-01-26 17:02:20 +01:00
58 lines
2.2 KiB
HTML
58 lines
2.2 KiB
HTML
<!doctype html public "-//ietf//dtd html//en">
|
|
<html><head><title>boost::mpl::vector_c</title>
|
|
<link rel="stylesheet" href="../mpl_wiki.css">
|
|
</head><body bgcolor="white">
|
|
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>vector_c</h1><h3>Synopsis</h3>
|
|
<p>
|
|
<pre>
|
|
template<
|
|
typename T
|
|
, T C1 = <em>implementation-defined</em>
|
|
, T C2 = <em>implementation-defined</em>
|
|
, ...
|
|
, T CN = <em>implementation-defined</em>
|
|
>
|
|
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<unsigned long,-1,0,1,1,-1,0,0,1,-1> 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<
|
|
integral_c<unsigned long,-1>
|
|
, integral_c<unsigned long,0>
|
|
, integral_c<unsigned long,1>
|
|
, integral_c<unsigned long,1>
|
|
, integral_c<unsigned long,-1>
|
|
, integral_c<unsigned long,0>
|
|
, integral_c<unsigned long,0>
|
|
, integral_c<unsigned long,1>
|
|
, integral_c<unsigned long,-1>
|
|
> 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_Contents.html">Table of Contents</a><br>Last edited July 17, 2002 8:01 am</body></html> |