SignedInteger.html 10 KB

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