1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Concept SignedInteger</title> 6<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="concept_check.html#concepts.reference" title="Concept reference"> 10<link rel="prev" href="LessThanComparable.html" title="Concept LessThanComparable"> 11<link rel="next" href="tools.html" title="Part II. Boost Tools"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td> 16<td align="center"><a href="../../index.html">Home</a></td> 17<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="LessThanComparable.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="concept_check.html#concepts.reference"><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="tools.html"><img src="../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="SignedInteger"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Concept SignedInteger</span></h2> 30<p>SignedInteger</p> 31</div> 32<div class="refsect1"> 33<a name="id-1.3.49.3.14.3"></a><h2>Refinement of</h2> 34<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 35<li class="listitem"><p><a class="link" href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a></p></li> 36<li class="listitem"><p><a class="link" href="Assignable.html" title="Concept Assignable">Assignable</a></p></li> 37<li class="listitem"><p><a class="link" href="DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a></p></li> 38<li class="listitem"><p><a class="link" href="EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a></p></li> 39<li class="listitem"><p><a class="link" href="LessThanComparable.html" title="Concept LessThanComparable">LessThanComparable</a></p></li> 40</ul></div> 41</div> 42<div class="refsect1"> 43<a name="id-1.3.49.3.14.4"></a><h2>Notation</h2> 44<div class="variablelist"><dl class="variablelist"> 45<dt><span class="term">T</span></dt> 46<dd>A type playing the role of integral-type in the <a class="link" href="SignedInteger.html" title="Concept SignedInteger">SignedInteger</a> concept.</dd> 47<dt> 48<span class="term"><code class="varname">x</code>, </span><span class="term"><code class="varname">y</code>, </span><span class="term"><code class="varname">z</code></span> 49</dt> 50<dd>Objects of type T</dd> 51<dt> 52<span class="term"><code class="varname">a</code>, </span><span class="term"><code class="varname">b</code></span> 53</dt> 54<dd>Objects of type int</dd> 55</dl></div> 56</div> 57<div class="refsect1"> 58<a name="id-1.3.49.3.14.5"></a><h2>Type expressions</h2> 59<div class="variablelist"><dl class="variablelist"> 60<dt><span class="term">Conversion to int</span></dt> 61<dd><p><span class="type">T</span> must be 62 convertible to <span class="type">int</span>. 63 </p></dd> 64</dl></div> 65</div> 66<div class="refsect1"> 67<a name="id-1.3.49.3.14.6"></a><h2>Valid expressions</h2> 68<div class="informaltable"><table class="table"> 69<colgroup> 70<col> 71<col> 72<col> 73</colgroup> 74<thead><tr> 75<th>Name</th> 76<th>Expression</th> 77<th>Type</th> 78</tr></thead> 79<tbody> 80<tr> 81<td><p>Conversion from int</p></td> 82<td><p>T(a)</p></td> 83<td><p><span class="type">T</span></p></td> 84</tr> 85<tr> 86<td><p>Preincrement</p></td> 87<td><p>++x</p></td> 88<td><p><span class="type">T &</span></p></td> 89</tr> 90<tr> 91<td><p>Predecrement</p></td> 92<td><p>--x</p></td> 93<td><p><span class="type">T &</span></p></td> 94</tr> 95<tr> 96<td><p>Postincrement</p></td> 97<td><p>x++</p></td> 98<td><p><span class="type">T</span></p></td> 99</tr> 100<tr> 101<td><p>Postdecrement</p></td> 102<td><p>x--</p></td> 103<td><p><span class="type">T</span></p></td> 104</tr> 105<tr> 106<td><p>Sum</p></td> 107<td><p>x + y</p></td> 108<td><p><span class="type">T</span></p></td> 109</tr> 110<tr> 111<td><p>Sum with int</p></td> 112<td><p>x + a</p></td> 113<td><p><span class="type">T</span></p></td> 114</tr> 115<tr> 116<td><p>Sum-assignment</p></td> 117<td><p>x += y</p></td> 118<td><p><span class="type">T &</span></p></td> 119</tr> 120<tr> 121<td><p>Sum-assignment with int</p></td> 122<td><p>x += a</p></td> 123<td><p><span class="type">T &</span></p></td> 124</tr> 125<tr> 126<td><p>Difference</p></td> 127<td><p>x - y</p></td> 128<td><p><span class="type">T</span></p></td> 129</tr> 130<tr> 131<td><p>Difference with int</p></td> 132<td><p>x - a</p></td> 133<td><p><span class="type">T</span></p></td> 134</tr> 135<tr> 136<td><p>Product</p></td> 137<td><p>x * y</p></td> 138<td><p><span class="type">T</span></p></td> 139</tr> 140<tr> 141<td><p>Product with int</p></td> 142<td><p>x * a</p></td> 143<td><p><span class="type">T</span></p></td> 144</tr> 145<tr> 146<td><p>Product-assignment with int</p></td> 147<td><p>x *= a</p></td> 148<td><p><span class="type">T &</span></p></td> 149</tr> 150<tr> 151<td><p>Product with int on left</p></td> 152<td><p>a * x</p></td> 153<td><p><span class="type">T</span></p></td> 154</tr> 155<tr> 156<td><p>Quotient</p></td> 157<td><p>x / y</p></td> 158<td><p><span class="type">T</span></p></td> 159</tr> 160<tr> 161<td><p>Quotient with int</p></td> 162<td><p>x / a</p></td> 163<td><p><span class="type">T</span></p></td> 164</tr> 165<tr> 166<td><p>Right-shift</p></td> 167<td><p>x >> y</p></td> 168<td><p><span class="type">T</span></p></td> 169</tr> 170<tr> 171<td><p>Right-shift with int</p></td> 172<td><p>x >> a</p></td> 173<td><p><span class="type">T</span></p></td> 174</tr> 175<tr> 176<td><p>Right-shift-assignment with int</p></td> 177<td><p>x >>= a</p></td> 178<td><p><span class="type">T &</span></p></td> 179</tr> 180<tr> 181<td><p>Less-than comparison</p></td> 182<td><p>x < y</p></td> 183<td><p>Convertible to <span class="type">bool</span></p></td> 184</tr> 185<tr> 186<td><p>Less-than comparison with int</p></td> 187<td><p>x < a</p></td> 188<td><p>Convertible to <span class="type">bool</span></p></td> 189</tr> 190<tr> 191<td><p>Less-than comparison with size_t</p></td> 192<td><p>x < boost::sample_value < std::size_t >()</p></td> 193<td><p>Convertible to <span class="type">bool</span></p></td> 194</tr> 195<tr> 196<td><p>Greater-than comparison</p></td> 197<td><p>x > y</p></td> 198<td><p>Convertible to <span class="type">bool</span></p></td> 199</tr> 200<tr> 201<td><p>Greater-than comparison with int</p></td> 202<td><p>x > a</p></td> 203<td><p>Convertible to <span class="type">bool</span></p></td> 204</tr> 205<tr> 206<td><p>Less-than-or-equal comparison</p></td> 207<td><p>x <= y</p></td> 208<td><p>Convertible to <span class="type">bool</span></p></td> 209</tr> 210<tr> 211<td><p>Less-than-or-equal comparison with int</p></td> 212<td><p>x <= a</p></td> 213<td><p>Convertible to <span class="type">bool</span></p></td> 214</tr> 215<tr> 216<td><p>Greater-than-or-equal comparison</p></td> 217<td><p>x >= y</p></td> 218<td><p>Convertible to <span class="type">bool</span></p></td> 219</tr> 220<tr> 221<td><p>Greater-than-or-equal comparison with int</p></td> 222<td><p>x >= a</p></td> 223<td><p>Convertible to <span class="type">bool</span></p></td> 224</tr> 225<tr> 226<td><p>Greater-than-or-equal comparison with int on left</p></td> 227<td><p>a >= x</p></td> 228<td><p>Convertible to <span class="type">bool</span></p></td> 229</tr> 230<tr> 231<td><p>Equality comparison</p></td> 232<td><p>x == y</p></td> 233<td><p>Convertible to <span class="type">bool</span></p></td> 234</tr> 235<tr> 236<td><p>Equality comparison with int</p></td> 237<td><p>x == a</p></td> 238<td><p>Convertible to <span class="type">bool</span></p></td> 239</tr> 240</tbody> 241</table></div> 242</div> 243</div> 244<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 245<td align="left"></td> 246<td align="right"><div class="copyright-footer">Copyright © 2001, 2002 Indiana University<br>Copyright © 2000, 2001 University of Notre Dame du Lac<br>Copyright © 2000 Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine<br>Copyright © 1996-1999 Silicon Graphics Computer Systems, Inc.<br>Copyright © 1994 Hewlett-Packard Company<p>Distributed under the Boost Software License, Version 1.0. 247 (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at 248 <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 249 </p> 250<p>This product includes software developed at the University 251 of Notre Dame and the Pervasive Technology Labs at Indiana 252 University. For technical information contact Andrew Lumsdaine 253 at the Pervasive Technology Labs at Indiana University. For 254 administrative and license questions contact the Advanced 255 Research and Technology Institute at 351 West 10th Street. 256 Indianapolis, Indiana 46202, phone 317-278-4100, fax 257 317-274-5902.</p> 258<p>Some concepts based on versions from the MTL draft manual 259 and Boost Graph and Property Map documentation, the SGI Standard 260 Template Library documentation and the Hewlett-Packard STL, 261 under the following license: 262 </p> 263<div class="blockquote"><blockquote class="blockquote"><p>Permission to use, copy, modify, distribute and 264 sell this software and its documentation for any purpose is 265 hereby granted without fee, provided that the above copyright 266 notice appears in all copies and that both that copyright 267 notice and this permission notice appear in supporting 268 documentation. Silicon Graphics makes no representations 269 about the suitability of this software for any purpose. It is 270 provided "as is" without express or implied 271 warranty.</p></blockquote></div> 272</div></td> 273</tr></table> 274<hr> 275<div class="spirit-nav"> 276<a accesskey="p" href="LessThanComparable.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="concept_check.html#concepts.reference"><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="tools.html"><img src="../../doc/src/images/next.png" alt="Next"></a> 277</div> 278</body> 279</html> 280