```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 ``` ```X0: construct Direct initialization from lvalue X a(( lvalue() )) =========== X1: <- X0: **copy** X1: destroy ----------- 1/1 possible copies made 0/0 possible moves made 0/0 possible elisions performed Direct initialization from rvalue X a(( rvalue() )) =========== X2: construct X2: destroy ----------- 0/1 possible copies made 0/1 possible moves made 1/1 possible elisions performed Direct initialization from rvalue, constructed with vector X a(( rvalue(vector()) )) =========== X3: construct (with vector) X4: <- X3: **move** X3: destroy X4: destroy ----------- 0/1 possible copies made 1/1 possible moves made 0/1 possible elisions performed *** 1 possible elisions missed! *** Copy initialization from lvalue X a = lvalue() =========== X5: <- X0: **copy** X5: destroy ----------- 1/1 possible copies made 0/0 possible moves made 0/0 possible elisions performed Copy initialization from rvalue X a = rvalue() =========== X6: construct X6: destroy ----------- 0/1 possible copies made 0/1 possible moves made 1/1 possible elisions performed Copy initialization from rvalue, constructed with vector X a = rvalue(vector()) =========== X7: construct (with vector) X8: <- X7: **move** X7: destroy X8: destroy ----------- 0/1 possible copies made 1/1 possible moves made 0/1 possible elisions performed *** 1 possible elisions missed! *** Pass lvalue by value sink( lvalue() ) =========== X9: <- X0: **copy** ->: sink <-: sink X9: destroy ----------- 1/1 possible copies made 0/0 possible moves made 0/0 possible elisions performed Pass rvalue by value sink( rvalue() ) =========== X10: construct ->: sink <-: sink X10: destroy ----------- 0/1 possible copies made 0/1 possible moves made 1/1 possible elisions performed Pass rvalue by value, constructed with vector sink( rvalue(vector()) ) =========== X11: construct (with vector) X12: <- X11: **move** ->: sink <-: sink X12: destroy X11: destroy ----------- 0/1 possible copies made 1/1 possible moves made 0/1 possible elisions performed *** 1 possible elisions missed! *** Named return value optimization (NRVO) nrvo_source() =========== ->: nrvo_source X13: construct <-: nrvo_source X13: destroy ----------- 0/1 possible copies made 0/1 possible moves made 1/1 possible elisions performed Named return value optimization (NRVO), constructed with vector nrvo_source_vector() =========== ->: nrvo_source_vector X14: construct (with vector) <-: nrvo_source_vector X14: destroy ----------- 0/1 possible copies made 0/1 possible moves made 1/1 possible elisions performed Unnamed return value optimization (URVO) urvo_source() =========== ->: urvo_source X15: construct <-: urvo_source X15: destroy ----------- 0/1 possible copies made 0/1 possible moves made 1/1 possible elisions performed Unnamed return value optimization (URVO), constructed with vector urvo_source_vector() =========== ->: urvo_source_vector X16: construct (with vector) X17: <- X16: **move** X16: destroy <-: urvo_source_vector X17: destroy ----------- 0/1 possible copies made 1/1 possible moves made 0/1 possible elisions performed *** 1 possible elisions missed! *** Return value used as ctor arg X a(urvo_source()) =========== ->: urvo_source X18: construct <-: urvo_source X18: destroy ----------- 0/2 possible copies made 0/2 possible moves made 2/2 possible elisions performed Return rvalue passed by value identity( rvalue() ) =========== X19: construct ->: identity X20: <- X19: **move** <-: identity X19: destroy X20: destroy ----------- 0/2 possible copies made 1/2 possible moves made 1/2 possible elisions performed *** 1 possible elisions missed! *** X0: destroy Press any key to continue . . . ```