SignedInteger.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <?xml version="1.0"?>
  2. <concept name="SignedInteger" category="Utility"><!--
  3. Based on concepts from the SGI Standard Template Library documentation:
  4. Copyright (c) 1996-1999
  5. Silicon Graphics Computer Systems, Inc.
  6. Copyright (c) 1994
  7. Hewlett-Packard Company
  8. --><!--
  9. Copyright 2000-2001 University of Notre Dame du Lac.
  10. Copyright 2001-2002 Indiana University.
  11. Some concepts based on versions from the MTL draft manual and Boost Graph
  12. and Property Map documentation:
  13. Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
  14. -->
  15. <param name="T" role="integral-type"/>
  16. <models-sentence>Integer type <arg num="1"/> must be a model of <self/>.</models-sentence>
  17. <refines const="no" concept="CopyConstructible"/>
  18. <refines const="no" concept="Assignable"/>
  19. <refines const="no" concept="DefaultConstructible"/>
  20. <refines const="no" concept="EqualityComparable"/>
  21. <refines const="no" concept="LessThanComparable"/>
  22. <notation variables="x y z">
  23. <sample-value><type name="T"/></sample-value>
  24. </notation>
  25. <notation variables="a b">
  26. <sample-value><type name="int"/></sample-value>
  27. </notation>
  28. <!--
  29. <valid-type-expression name="int-ness">
  30. <documentation>Should this really be required?</documentation>
  31. <type name="T"/>
  32. <return-type>
  33. <require-same-type>
  34. <type name="int"/>
  35. </require-same-type>
  36. </return-type>
  37. </valid-type-expression>
  38. -->
  39. <valid-expression name="Conversion from int">
  40. <construct template-parameters="">
  41. <type name="T"/>
  42. <sample-value><type name="int"/></sample-value>
  43. </construct>
  44. <return-type><require-same-type testable="yes">
  45. <type name="T"/>
  46. </require-same-type></return-type>
  47. </valid-expression>
  48. <valid-expression name="Preincrement">
  49. <preincrement>
  50. <sample-value>
  51. <reference-to><type name="T"/></reference-to>
  52. </sample-value>
  53. </preincrement>
  54. <return-type>
  55. <require-same-type testable="yes">
  56. <reference-to><type name="T"/></reference-to>
  57. </require-same-type>
  58. </return-type>
  59. </valid-expression>
  60. <valid-expression name="Predecrement">
  61. <predecrement>
  62. <sample-value>
  63. <reference-to><type name="T"/></reference-to>
  64. </sample-value>
  65. </predecrement>
  66. <return-type>
  67. <require-same-type testable="yes">
  68. <reference-to><type name="T"/></reference-to>
  69. </require-same-type>
  70. </return-type>
  71. </valid-expression>
  72. <valid-expression name="Postincrement">
  73. <postincrement>
  74. <sample-value>
  75. <reference-to><type name="T"/></reference-to>
  76. </sample-value>
  77. </postincrement>
  78. <return-type>
  79. <require-same-type testable="yes">
  80. <type name="T"/>
  81. </require-same-type>
  82. </return-type>
  83. </valid-expression>
  84. <valid-expression name="Postdecrement">
  85. <postdecrement>
  86. <sample-value>
  87. <reference-to><type name="T"/></reference-to>
  88. </sample-value>
  89. </postdecrement>
  90. <return-type>
  91. <require-same-type testable="yes">
  92. <type name="T"/>
  93. </require-same-type>
  94. </return-type>
  95. </valid-expression>
  96. <valid-expression name="Sum">
  97. <add>
  98. <sample-value>
  99. <type name="T"/>
  100. </sample-value>
  101. <sample-value>
  102. <type name="T"/>
  103. </sample-value>
  104. </add>
  105. <return-type>
  106. <require-same-type testable="yes">
  107. <type name="T"/>
  108. </require-same-type>
  109. </return-type>
  110. </valid-expression>
  111. <valid-expression name="Sum with int">
  112. <add>
  113. <sample-value>
  114. <type name="T"/>
  115. </sample-value>
  116. <sample-value>
  117. <type name="int"/>
  118. </sample-value>
  119. </add>
  120. <return-type>
  121. <require-same-type testable="yes">
  122. <type name="T"/>
  123. </require-same-type>
  124. </return-type>
  125. </valid-expression>
  126. <valid-expression name="Sum-assignment">
  127. <add-assign>
  128. <sample-value>
  129. <reference-to><type name="T"/></reference-to>
  130. </sample-value>
  131. <sample-value>
  132. <type name="T"/>
  133. </sample-value>
  134. </add-assign>
  135. <return-type>
  136. <require-same-type testable="yes">
  137. <reference-to><type name="T"/></reference-to>
  138. </require-same-type>
  139. </return-type>
  140. </valid-expression>
  141. <valid-expression name="Sum-assignment with int">
  142. <add-assign>
  143. <sample-value>
  144. <reference-to><type name="T"/></reference-to>
  145. </sample-value>
  146. <sample-value>
  147. <type name="int"/>
  148. </sample-value>
  149. </add-assign>
  150. <return-type>
  151. <require-same-type testable="yes">
  152. <reference-to><type name="T"/></reference-to>
  153. </require-same-type>
  154. </return-type>
  155. </valid-expression>
  156. <valid-expression name="Difference">
  157. <subtract>
  158. <sample-value>
  159. <type name="T"/>
  160. </sample-value>
  161. <sample-value>
  162. <type name="T"/>
  163. </sample-value>
  164. </subtract>
  165. <return-type>
  166. <require-same-type testable="yes">
  167. <type name="T"/>
  168. </require-same-type>
  169. </return-type>
  170. </valid-expression>
  171. <valid-expression name="Difference with int">
  172. <subtract>
  173. <sample-value>
  174. <type name="T"/>
  175. </sample-value>
  176. <sample-value>
  177. <type name="int"/>
  178. </sample-value>
  179. </subtract>
  180. <return-type>
  181. <require-same-type testable="yes">
  182. <type name="T"/>
  183. </require-same-type>
  184. </return-type>
  185. </valid-expression>
  186. <valid-expression name="Product">
  187. <multiply>
  188. <sample-value>
  189. <type name="T"/>
  190. </sample-value>
  191. <sample-value>
  192. <type name="T"/>
  193. </sample-value>
  194. </multiply>
  195. <return-type>
  196. <require-same-type testable="yes">
  197. <type name="T"/>
  198. </require-same-type>
  199. </return-type>
  200. </valid-expression>
  201. <valid-expression name="Product with int">
  202. <multiply>
  203. <sample-value>
  204. <type name="T"/>
  205. </sample-value>
  206. <sample-value>
  207. <type name="int"/>
  208. </sample-value>
  209. </multiply>
  210. <return-type>
  211. <require-same-type testable="yes">
  212. <type name="T"/>
  213. </require-same-type>
  214. </return-type>
  215. </valid-expression>
  216. <valid-expression name="Product-assignment with int">
  217. <multiply-assign>
  218. <sample-value>
  219. <reference-to><type name="T"/></reference-to>
  220. </sample-value>
  221. <sample-value>
  222. <type name="int"/>
  223. </sample-value>
  224. </multiply-assign>
  225. <return-type>
  226. <require-same-type testable="yes">
  227. <reference-to><type name="T"/></reference-to>
  228. </require-same-type>
  229. </return-type>
  230. </valid-expression>
  231. <valid-expression name="Product with int on left">
  232. <multiply>
  233. <sample-value>
  234. <type name="int"/>
  235. </sample-value>
  236. <sample-value>
  237. <type name="T"/>
  238. </sample-value>
  239. </multiply>
  240. <return-type>
  241. <require-same-type testable="yes">
  242. <type name="T"/>
  243. </require-same-type>
  244. </return-type>
  245. </valid-expression>
  246. <valid-expression name="Quotient">
  247. <divide>
  248. <sample-value>
  249. <type name="T"/>
  250. </sample-value>
  251. <sample-value>
  252. <type name="T"/>
  253. </sample-value>
  254. </divide>
  255. <return-type>
  256. <require-same-type testable="yes">
  257. <type name="T"/>
  258. </require-same-type>
  259. </return-type>
  260. </valid-expression>
  261. <valid-expression name="Quotient with int">
  262. <divide>
  263. <sample-value>
  264. <type name="T"/>
  265. </sample-value>
  266. <sample-value>
  267. <type name="int"/>
  268. </sample-value>
  269. </divide>
  270. <return-type>
  271. <require-same-type testable="yes">
  272. <type name="T"/>
  273. </require-same-type>
  274. </return-type>
  275. </valid-expression>
  276. <valid-expression name="Right-shift">
  277. <shift-right>
  278. <sample-value>
  279. <type name="T"/>
  280. </sample-value>
  281. <sample-value>
  282. <type name="T"/>
  283. </sample-value>
  284. </shift-right>
  285. <return-type>
  286. <require-same-type testable="yes">
  287. <type name="T"/>
  288. </require-same-type>
  289. </return-type>
  290. </valid-expression>
  291. <valid-expression name="Right-shift with int">
  292. <shift-right>
  293. <sample-value>
  294. <type name="T"/>
  295. </sample-value>
  296. <sample-value>
  297. <type name="int"/>
  298. </sample-value>
  299. </shift-right>
  300. <return-type>
  301. <require-same-type testable="yes">
  302. <type name="T"/>
  303. </require-same-type>
  304. </return-type>
  305. </valid-expression>
  306. <valid-expression name="Right-shift-assignment with int">
  307. <shift-right-assign>
  308. <sample-value>
  309. <reference-to><type name="T"/></reference-to>
  310. </sample-value>
  311. <sample-value>
  312. <type name="int"/>
  313. </sample-value>
  314. </shift-right-assign>
  315. <return-type>
  316. <require-same-type testable="yes">
  317. <reference-to><type name="T"/></reference-to>
  318. </require-same-type>
  319. </return-type>
  320. </valid-expression>
  321. <valid-expression name="Less-than comparison">
  322. <less-than>
  323. <sample-value>
  324. <type name="T"/>
  325. </sample-value>
  326. <sample-value>
  327. <type name="T"/>
  328. </sample-value>
  329. </less-than>
  330. <return-type>
  331. <convertible-to testable="yes">
  332. <type name="bool"/>
  333. </convertible-to>
  334. </return-type>
  335. </valid-expression>
  336. <valid-expression name="Less-than comparison with int">
  337. <less-than>
  338. <sample-value>
  339. <type name="T"/>
  340. </sample-value>
  341. <sample-value>
  342. <type name="int"/>
  343. </sample-value>
  344. </less-than>
  345. <return-type>
  346. <convertible-to testable="yes">
  347. <type name="bool"/>
  348. </convertible-to>
  349. </return-type>
  350. </valid-expression>
  351. <valid-expression name="Less-than comparison with size_t">
  352. <less-than>
  353. <sample-value>
  354. <type name="T"/>
  355. </sample-value>
  356. <sample-value>
  357. <type name="std::size_t"/>
  358. </sample-value>
  359. </less-than>
  360. <return-type>
  361. <convertible-to testable="yes">
  362. <type name="bool"/>
  363. </convertible-to>
  364. </return-type>
  365. </valid-expression>
  366. <valid-expression name="Greater-than comparison">
  367. <greater-than>
  368. <sample-value>
  369. <type name="T"/>
  370. </sample-value>
  371. <sample-value>
  372. <type name="T"/>
  373. </sample-value>
  374. </greater-than>
  375. <return-type>
  376. <convertible-to testable="yes">
  377. <type name="bool"/>
  378. </convertible-to>
  379. </return-type>
  380. </valid-expression>
  381. <valid-expression name="Greater-than comparison with int">
  382. <greater-than>
  383. <sample-value>
  384. <type name="T"/>
  385. </sample-value>
  386. <sample-value>
  387. <type name="int"/>
  388. </sample-value>
  389. </greater-than>
  390. <return-type>
  391. <convertible-to testable="yes">
  392. <type name="bool"/>
  393. </convertible-to>
  394. </return-type>
  395. </valid-expression>
  396. <valid-expression name="Less-than-or-equal comparison">
  397. <less-than-or-equal>
  398. <sample-value>
  399. <type name="T"/>
  400. </sample-value>
  401. <sample-value>
  402. <type name="T"/>
  403. </sample-value>
  404. </less-than-or-equal>
  405. <return-type>
  406. <convertible-to testable="yes">
  407. <type name="bool"/>
  408. </convertible-to>
  409. </return-type>
  410. </valid-expression>
  411. <valid-expression name="Less-than-or-equal comparison with int">
  412. <less-than-or-equal>
  413. <sample-value>
  414. <type name="T"/>
  415. </sample-value>
  416. <sample-value>
  417. <type name="int"/>
  418. </sample-value>
  419. </less-than-or-equal>
  420. <return-type>
  421. <convertible-to testable="yes">
  422. <type name="bool"/>
  423. </convertible-to>
  424. </return-type>
  425. </valid-expression>
  426. <valid-expression name="Greater-than-or-equal comparison">
  427. <greater-than-or-equal>
  428. <sample-value>
  429. <type name="T"/>
  430. </sample-value>
  431. <sample-value>
  432. <type name="T"/>
  433. </sample-value>
  434. </greater-than-or-equal>
  435. <return-type>
  436. <convertible-to testable="yes">
  437. <type name="bool"/>
  438. </convertible-to>
  439. </return-type>
  440. </valid-expression>
  441. <valid-expression name="Greater-than-or-equal comparison with int">
  442. <greater-than-or-equal>
  443. <sample-value>
  444. <type name="T"/>
  445. </sample-value>
  446. <sample-value>
  447. <type name="int"/>
  448. </sample-value>
  449. </greater-than-or-equal>
  450. <return-type>
  451. <convertible-to testable="yes">
  452. <type name="bool"/>
  453. </convertible-to>
  454. </return-type>
  455. </valid-expression>
  456. <valid-expression name="Greater-than-or-equal comparison with int on left">
  457. <greater-than-or-equal>
  458. <sample-value>
  459. <type name="int"/>
  460. </sample-value>
  461. <sample-value>
  462. <type name="T"/>
  463. </sample-value>
  464. </greater-than-or-equal>
  465. <return-type>
  466. <convertible-to testable="yes">
  467. <type name="bool"/>
  468. </convertible-to>
  469. </return-type>
  470. </valid-expression>
  471. <valid-expression name="Equality comparison">
  472. <equal-to>
  473. <sample-value>
  474. <type name="T"/>
  475. </sample-value>
  476. <sample-value>
  477. <type name="T"/>
  478. </sample-value>
  479. </equal-to>
  480. <return-type>
  481. <convertible-to testable="yes">
  482. <type name="bool"/>
  483. </convertible-to>
  484. </return-type>
  485. </valid-expression>
  486. <valid-expression name="Equality comparison with int">
  487. <equal-to>
  488. <sample-value>
  489. <type name="T"/>
  490. </sample-value>
  491. <sample-value>
  492. <type name="int"/>
  493. </sample-value>
  494. </equal-to>
  495. <return-type>
  496. <convertible-to testable="yes">
  497. <type name="bool"/>
  498. </convertible-to>
  499. </return-type>
  500. </valid-expression>
  501. <valid-type-expression name="Conversion to int">
  502. <documentation/>
  503. <type name="T"/>
  504. <return-type>
  505. <convertible-to testable="yes">
  506. <type name="int"/>
  507. </convertible-to>
  508. </return-type>
  509. </valid-type-expression>
  510. </concept>