[ create a new paste ] login | about

Link: http://codepad.org/XFT5qVyE    [ raw code | fork ]

Plain Text, pasted on May 4:
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 . . .


Create a new paste based on this one


Comments: