Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/mpl/doc/refmanual/is-sequence.html @ 29

Last change on this file since 29 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 8.7 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<!-- Copyright Aleksey Gurtovoy 2006. Distributed under the Boost -->
5<!-- Software License, Version 1.0. (See accompanying -->
6<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
7<head>
8<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
10<title>The MPL Reference Manual: is_sequence</title>
11<link rel="stylesheet" href="../style.css" type="text/css" />
12</head>
13<body class="docframe refmanual">
14<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./insert-range.html" class="navigation-link">Prev</a>&nbsp;<a href="./key-type.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./insert-range.html" class="navigation-link">Back</a>&nbsp;<a href="./key-type.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
15<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./is-sequence.html" class="navigation-link">is_sequence</a></td>
16</tr></table><div class="header-separator"></div>
17<div class="section" id="is-sequence">
18<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id366" name="is-sequence">is_sequence</a></h1>
19<div class="section" id="is-synopsis">
20<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
21<pre class="literal-block">
22template&lt;
23      typename X
24    &gt;
25struct <a href="./is-sequence.html" class="identifier">is_sequence</a>
26{
27    typedef <em>unspecified</em> type;
28};
29</pre>
30</div>
31<div class="section" id="is-description">
32<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
33<p>Returns a boolean <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and
34only if <tt class="literal"><span class="pre">X</span></tt> is a model of <a class="reference" href="./forward-sequence.html">Forward Sequence</a>.</p>
35</div>
36<div class="section" id="is-header">
37<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
38<pre class="literal-block">
39#include &lt;<a href="../../../../boost/mpl/is_sequence.hpp" class="header">boost/mpl/is_sequence.hpp</a>&gt;
40</pre>
41</div>
42<div class="section" id="is-parameters">
43<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
44<table border="1" class="table">
45<colgroup>
46<col width="19%" />
47<col width="23%" />
48<col width="58%" />
49</colgroup>
50<thead valign="bottom">
51<tr><th>Parameter</th>
52<th>Requirement</th>
53<th>Description</th>
54</tr>
55</thead>
56<tbody valign="top">
57<tr><td><tt class="literal"><span class="pre">X</span></tt></td>
58<td>Any type</td>
59<td>The type to query.</td>
60</tr>
61</tbody>
62</table>
63</div>
64<div class="section" id="is-expression-semantics">
65<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
66<pre class="literal-block">
67typedef <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt;X&gt;::type c;
68</pre>
69<table class="field-list" frame="void" rules="none">
70<col class="field-name" />
71<col class="field-body" />
72<tbody valign="top">
73<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean <a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
74</tr>
75<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
76<pre class="last literal-block">
77typedef <a href="./not.html" class="identifier">not_</a>&lt; is_same&lt; <a href="./begin.html" class="identifier">begin</a>&lt;T&gt;::type,<a href="./void.html" class="identifier">void_</a> &gt; &gt;::type c;
78</pre>
79</td>
80</tr>
81</tbody>
82</table>
83</div>
84<div class="section" id="is-complexity">
85<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
86<p>Amortized constant time.</p>
87</div>
88<div class="section" id="is-example">
89<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
90<pre class="literal-block">
91struct UDT {};
92
93<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; std::<a href="./vector.html" class="identifier">vector</a>&lt;int&gt; &gt; ));
94<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; int &gt; ));
95<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; int&amp; &gt; ));
96<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; UDT &gt; ));
97<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; UDT* &gt; ));
98<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,0&gt; &gt; ));
99<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; <a href="./list.html" class="identifier">list</a>&lt;&gt; &gt; ));
100<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; <a href="./list.html" class="identifier">list</a>&lt;int&gt; &gt; ));
101<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; <a href="./vector.html" class="identifier">vector</a>&lt;&gt; &gt; ));
102<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./is-sequence.html" class="identifier">is_sequence</a>&lt; <a href="./vector.html" class="identifier">vector</a>&lt;int&gt; > ));
103</pre>
104</div>
105<div class="section" id="is-see-also">
106<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
107<p><a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a>, <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a>, <a class="refentry reference" href="./list.html"><tt class="refentry literal"><span class="pre">list</span></tt></a>, <a class="refentry reference" href="./range-c.html"><tt class="refentry literal"><span class="pre">range_c</span></tt></a></p>
108<!-- modtime: November 13, 2004 01:29:30 +0000 -->
109<!-- Sequences/Intrinsic Metafunctions//key_type -->
110</div>
111</div>
112
113<div class="footer-separator"></div>
114<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./insert-range.html" class="navigation-link">Prev</a>&nbsp;<a href="./key-type.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./insert-range.html" class="navigation-link">Back</a>&nbsp;<a href="./key-type.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
115</tr></table></body>
116</html>
Note: See TracBrowser for help on using the repository browser.