| 1 | <HTML> |
|---|
| 2 | <!-- |
|---|
| 3 | -- Copyright (c) Jeremy Siek 2000 |
|---|
| 4 | -- |
|---|
| 5 | -- Permission to use, copy, modify, distribute and sell this software |
|---|
| 6 | -- and its documentation for any purpose is hereby granted without fee, |
|---|
| 7 | -- provided that the above copyright notice appears in all copies and |
|---|
| 8 | -- that both that copyright notice and this permission notice appear |
|---|
| 9 | -- in supporting documentation. Silicon Graphics makes no |
|---|
| 10 | -- representations about the suitability of this software for any |
|---|
| 11 | -- purpose. It is provided "as is" without express or implied warranty. |
|---|
| 12 | --> |
|---|
| 13 | <Head> |
|---|
| 14 | <Title>Assignable</Title> |
|---|
| 15 | </HEAD> |
|---|
| 16 | <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" |
|---|
| 17 | ALINK="#ff0000"> |
|---|
| 18 | <IMG SRC="../../boost.png" |
|---|
| 19 | ALT="C++ Boost" width="277" height="86"> |
|---|
| 20 | <!--end header--> |
|---|
| 21 | <BR Clear> |
|---|
| 22 | <H1>Assignable</H1> |
|---|
| 23 | |
|---|
| 24 | <h3>Description</h3> |
|---|
| 25 | A type is Assignable if it is possible to assign one object of the type |
|---|
| 26 | to another object of that type. |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | <h3>Notation</h3> |
|---|
| 30 | <Table> |
|---|
| 31 | <TR> |
|---|
| 32 | <TD VAlign=top> |
|---|
| 33 | <tt>T</tt> |
|---|
| 34 | </TD> |
|---|
| 35 | <TD VAlign=top> |
|---|
| 36 | is type that is a model of Assignable |
|---|
| 37 | </TD> |
|---|
| 38 | </TR> |
|---|
| 39 | |
|---|
| 40 | <TR> |
|---|
| 41 | <TD VAlign=top> |
|---|
| 42 | <tt>t</tt> |
|---|
| 43 | </TD> |
|---|
| 44 | <TD VAlign=top> |
|---|
| 45 | is an object of type <tt>T</tt> |
|---|
| 46 | </TD> |
|---|
| 47 | </tr> |
|---|
| 48 | |
|---|
| 49 | <TR> |
|---|
| 50 | <TD VAlign=top> |
|---|
| 51 | <tt>u</tt> |
|---|
| 52 | </TD> |
|---|
| 53 | <TD VAlign=top> |
|---|
| 54 | is an object of type <tt>T</tt> or possibly <tt>const T</tt> |
|---|
| 55 | </TD> |
|---|
| 56 | </tr> |
|---|
| 57 | |
|---|
| 58 | </table> |
|---|
| 59 | <h3>Definitions</h3> |
|---|
| 60 | <h3>Valid expressions</h3> |
|---|
| 61 | <Table border> |
|---|
| 62 | <TR> |
|---|
| 63 | <TH> |
|---|
| 64 | Name |
|---|
| 65 | </TH> |
|---|
| 66 | <TH> |
|---|
| 67 | Expression |
|---|
| 68 | </TH> |
|---|
| 69 | <TH> |
|---|
| 70 | Return type |
|---|
| 71 | </TH> |
|---|
| 72 | <TH> |
|---|
| 73 | Semantics |
|---|
| 74 | </TH> |
|---|
| 75 | </TR> |
|---|
| 76 | <TR> |
|---|
| 77 | <TD VAlign=top> |
|---|
| 78 | Assignment |
|---|
| 79 | </TD> |
|---|
| 80 | <TD VAlign=top> |
|---|
| 81 | <tt>t = u</tt> |
|---|
| 82 | </TD> |
|---|
| 83 | <TD VAlign=top> |
|---|
| 84 | <tt>T&</tt> |
|---|
| 85 | </TD> |
|---|
| 86 | <TD VAlign=top> |
|---|
| 87 | <tt>t</tt> is equivalent to <tt>u</tt> |
|---|
| 88 | </TD> |
|---|
| 89 | </TR> |
|---|
| 90 | |
|---|
| 91 | </table> |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | </table> |
|---|
| 95 | <h3>Models</h3> |
|---|
| 96 | |
|---|
| 97 | <UL> |
|---|
| 98 | <LI><tt>int</tt> |
|---|
| 99 | <LI><tt>std::pair</tt> |
|---|
| 100 | </UL> |
|---|
| 101 | |
|---|
| 102 | <h3>See also</h3> |
|---|
| 103 | <a href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</A> |
|---|
| 104 | and |
|---|
| 105 | <A href="./CopyConstructible.html">CopyConstructible</A> |
|---|
| 106 | |
|---|
| 107 | <br> |
|---|
| 108 | <HR> |
|---|
| 109 | <TABLE> |
|---|
| 110 | <TR valign=top> |
|---|
| 111 | <TD nowrap>Copyright © 2000</TD><TD> |
|---|
| 112 | <A HREF=http://www.lsc.nd.edu/~jsiek>Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>) |
|---|
| 113 | </TD></TR></TABLE> |
|---|
| 114 | |
|---|
| 115 | </BODY> |
|---|
| 116 | </HTML> |
|---|