Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / fusion / doc / html / fusion / sequence / operator / comparison / greater_than.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>greater than</title>
5 <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Fusion 2.2">
8 <link rel="up" href="../comparison.html" title="Comparison">
9 <link rel="prev" href="less_than_equal.html" title="less than equal">
10 <link rel="next" href="greater_than_equal.html" title="greater than equal">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="less_than_equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><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="greater_than_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h5 class="title">
27 <a name="fusion.sequence.operator.comparison.greater_than"></a><a class="link" href="greater_than.html" title="greater than">greater
28           than</a>
29 </h5></div></div></div>
30 <p>
31             Lexicographically compare two sequences.
32           </p>
33 <h6>
34 <a name="fusion.sequence.operator.comparison.greater_than.h0"></a>
35             <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.synopsis"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.synopsis">Synopsis</a>
36           </h6>
37 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">&gt;</span>
38 <span class="keyword">bool</span>
39 <span class="keyword">operator</span><span class="special">&gt;(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">Seq2</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">);</span>
40 </pre>
41 <h6>
42 <a name="fusion.sequence.operator.comparison.greater_than.h1"></a>
43             <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.parameters"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.parameters">Parameters</a>
44           </h6>
45 <div class="informaltable"><table class="table">
46 <colgroup>
47 <col>
48 <col>
49 <col>
50 </colgroup>
51 <thead><tr>
52 <th>
53                     <p>
54                       Parameter
55                     </p>
56                   </th>
57 <th>
58                     <p>
59                       Requirement
60                     </p>
61                   </th>
62 <th>
63                     <p>
64                       Description
65                     </p>
66                   </th>
67 </tr></thead>
68 <tbody><tr>
69 <td>
70                     <p>
71                       <code class="computeroutput"><span class="identifier">a</span><span class="special">,</span>
72                       <span class="identifier">b</span></code>
73                     </p>
74                   </td>
75 <td>
76                     <p>
77                       Instances of <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>
78                     </p>
79                   </td>
80 <td>
81                     <p>
82                       <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) to compare
83                     </p>
84                   </td>
85 </tr></tbody>
86 </table></div>
87 <h6>
88 <a name="fusion.sequence.operator.comparison.greater_than.h2"></a>
89             <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.expression_semantics"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.expression_semantics">Expression
90             Semantics</a>
91           </h6>
92 <pre class="programlisting"><span class="identifier">a</span> <span class="special">&gt;</span> <span class="identifier">b</span>
93 </pre>
94 <p>
95             <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code>
96           </p>
97 <p>
98             <span class="bold"><strong>Requirements</strong></span>:
99           </p>
100 <p>
101             For each element, <code class="computeroutput"><span class="identifier">e1</span></code>,
102             in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for
103             each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in
104             sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">a</span> <span class="special">&lt;</span> <span class="identifier">b</span></code> is a valid expression returning a
105             type that is convertible to bool.
106           </p>
107 <p>
108             An attempt to compare two Sequences of different lengths results in a
109             compile time error.
110           </p>
111 <p>
112             <span class="bold"><strong>Semantics</strong></span>: Returns b &lt; a.
113           </p>
114 <h6>
115 <a name="fusion.sequence.operator.comparison.greater_than.h3"></a>
116             <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.header"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.header">Header</a>
117           </h6>
118 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">/</span><span class="identifier">less_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
119 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">less_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
120 </pre>
121 <h6>
122 <a name="fusion.sequence.operator.comparison.greater_than.h4"></a>
123             <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.example"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.example">Example</a>
124           </h6>
125 <pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">&gt;</span> <span class="identifier">v1</span><span class="special">(</span><span class="number">4</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span>
126 <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special">&lt;</span><span class="keyword">short</span><span class="special">,</span> <span class="keyword">float</span><span class="special">&gt;</span> <span class="identifier">v2</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span>
127 <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special">&lt;</span><span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">v3</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">4.4</span><span class="special">);</span>
128 <span class="identifier">assert</span><span class="special">(</span><span class="identifier">v2</span> <span class="special">&gt;</span> <span class="identifier">v1</span><span class="special">);</span>
129 <span class="identifier">assert</span><span class="special">(</span><span class="identifier">v3</span> <span class="special">&gt;</span> <span class="identifier">v2</span><span class="special">);</span>
130 </pre>
131 </div>
132 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
133 <td align="left"></td>
134 <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2006, 2011, 2012 Joel de Guzman,
135       Dan Marsden, Tobias Schwinger<p>
136         Distributed under the Boost Software License, Version 1.0. (See accompanying
137         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>)
138       </p>
139 </div></td>
140 </tr></table>
141 <hr>
142 <div class="spirit-nav">
143 <a accesskey="p" href="less_than_equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><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="greater_than_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
144 </div>
145 </body>
146 </html>