Assignable.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Concept Assignable</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="index.html" title="Concept reference">
  10. <link rel="next" href="InputIterator.html" title="Concept InputIterator">
  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="index.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><a accesskey="n" href="InputIterator.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="refentry">
  26. <a name="Assignable"></a><div class="titlepage"></div>
  27. <div class="refnamediv">
  28. <h2><span class="refentrytitle">Concept Assignable</span></h2>
  29. <p>Assignable</p>
  30. </div>
  31. <div class="refsect1">
  32. <a name="idm45853371076016"></a><h2>Description</h2>
  33. <p>Assignable types must have copy constructors,
  34. <code class="computeroutput">operator=</code> for assignment, and the <code class="computeroutput">swap()</code>
  35. function defined.</p>
  36. </div>
  37. <div class="refsect1">
  38. <a name="idm45853371073472"></a><h2>Refinement of</h2>
  39. <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="link" href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a></p></li></ul></div>
  40. </div>
  41. <div class="refsect1">
  42. <a name="idm45853371071920"></a><h2>Notation</h2>
  43. <div class="variablelist"><dl class="variablelist">
  44. <dt><span class="term">X</span></dt>
  45. <dd>A type playing the role of assignable-type in the <a class="link" href="Assignable.html" title="Concept Assignable">Assignable</a> concept.</dd>
  46. <dt>
  47. <span class="term"><code class="varname">x</code>, </span><span class="term"><code class="varname">y</code></span>
  48. </dt>
  49. <dd>Objects of type X</dd>
  50. </dl></div>
  51. </div>
  52. <div class="refsect1">
  53. <a name="idm45853371068336"></a><h2>Valid expressions</h2>
  54. <div class="informaltable"><table class="table">
  55. <colgroup>
  56. <col>
  57. <col>
  58. <col>
  59. <col>
  60. </colgroup>
  61. <thead><tr>
  62. <th>Name</th>
  63. <th>Expression</th>
  64. <th>Type</th>
  65. <th>Semantics</th>
  66. </tr></thead>
  67. <tbody>
  68. <tr>
  69. <td><p>Assignment</p></td>
  70. <td><p>x = y</p></td>
  71. <td><p><span class="type">X &amp;</span></p></td>
  72. <td><p>Require <code class="computeroutput">operator=</code></p></td>
  73. </tr>
  74. <tr>
  75. <td><p>Swap</p></td>
  76. <td><p>swap(x, y)</p></td>
  77. <td><p><span class="type">void</span></p></td>
  78. <td><p>Require <code class="computeroutput">swap()</code> function</p></td>
  79. </tr>
  80. </tbody>
  81. </table></div>
  82. </div>
  83. <div class="refsect1">
  84. <a name="idm45853371060608"></a><h2>Models</h2>
  85. <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><span class="simplelist"><span class="type">int</span></span></li></ul></div>
  86. </div>
  87. <div class="refsect1">
  88. <a name="idm45853371059152"></a><h2>See also</h2>
  89. <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="link" href="CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a></p></li></ul></div>
  90. </div>
  91. </div>
  92. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  93. <td align="left"></td>
  94. <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.
  95. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at
  96. <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  97. </p>
  98. <p>This product includes software developed at the University
  99. of Notre Dame and the Pervasive Technology Labs at Indiana
  100. University. For technical information contact Andrew Lumsdaine
  101. at the Pervasive Technology Labs at Indiana University. For
  102. administrative and license questions contact the Advanced
  103. Research and Technology Institute at 351 West 10th Street.
  104. Indianapolis, Indiana 46202, phone 317-278-4100, fax
  105. 317-274-5902.</p>
  106. <p>Some concepts based on versions from the MTL draft manual
  107. and Boost Graph and Property Map documentation, the SGI Standard
  108. Template Library documentation and the Hewlett-Packard STL,
  109. under the following license:
  110. </p>
  111. <div class="blockquote"><blockquote class="blockquote"><p>Permission to use, copy, modify, distribute and
  112. sell this software and its documentation for any purpose is
  113. hereby granted without fee, provided that the above copyright
  114. notice appears in all copies and that both that copyright
  115. notice and this permission notice appear in supporting
  116. documentation. Silicon Graphics makes no representations
  117. about the suitability of this software for any purpose. It is
  118. provided "as is" without express or implied
  119. warranty.</p></blockquote></div>
  120. </div></td>
  121. </tr></table>
  122. <hr>
  123. <div class="spirit-nav">
  124. <a accesskey="p" href="index.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><a accesskey="n" href="InputIterator.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
  125. </div>
  126. </body>
  127. </html>