mirror of
https://github.com/boostorg/mpl.git
synced 2026-01-26 17:02:20 +01:00
45 lines
2.3 KiB
HTML
45 lines
2.3 KiB
HTML
<!doctype html public "-//ietf//dtd html//en">
|
|
<html><head><title>boost::mpl::Reference/list</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>list</h1><h3>Synopsis</h3>
|
|
<p>
|
|
<pre>
|
|
template<
|
|
typename T1 = <em>implementation-defined</em>
|
|
, typename T2 = <em>implementation-defined</em>
|
|
, ...
|
|
, typename Tn = <em>implementation-defined</em>
|
|
>
|
|
struct list
|
|
{
|
|
};
|
|
</pre>
|
|
<p>
|
|
<h3>Description</h3>
|
|
<p>
|
|
A <code>list</code> is a <a href="../Forward_Sequence.html">Forward Sequence</a> of types. It's also an <a href="../Extensible_Sequence.html">Extensible Sequence</a> that supports constant time insertion and removal of elements at the beginning (through <code><a href="../Reference/push_front.html">push_front</a></code>), and linear time insertion and removal of elements at the end or in the middle (through <code><a href="../Reference/insert.html">insert</a></code>/<code><a href="../Reference/erase.html">erase</a></code> algorithms).
|
|
<p>
|
|
<h3>Example</h3>
|
|
<p>
|
|
<pre>
|
|
typedef list<float,double,long double> floats;
|
|
typedef <a href="../Reference/push_front.html">push_front</a><floating_types,my_float>::type ext_floats;
|
|
BOOST_STATIC_ASSERT((boost::is_same< <a href="../Reference/front.html">front</a><ext_floats>::type, my_float >::value));
|
|
</pre>
|
|
<p>
|
|
<h3>Definition</h3>
|
|
<p>
|
|
<pre>
|
|
#include "<a href="../../../../../\boost/mpl/list.hpp">boost/mpl/list.hpp</a>"
|
|
#include "<a href="../../../../../\boost/mpl/list/list0.hpp">boost/mpl/list/list0.hpp</a>"
|
|
#include "<a href="../../../../../\boost/mpl/list/list10.hpp">boost/mpl/list/list10.hpp</a>"
|
|
...
|
|
#include "<a href="../../../../../\boost/mpl/list/list50.hpp">boost/mpl/list/list50.hpp</a>"
|
|
</pre>
|
|
<p>
|
|
<h3>See also</h3>
|
|
<p>
|
|
<a href="../Forward_Sequence.html">Forward Sequence</a>, <code><a href="../Reference/list_c.html">list_c</a></code>, <code><a href="../Reference/vector.html">vector</a></code>, <code><a href="../Reference/vector_c.html">vector_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:05 am</body></html> |