Commit e5205c86 authored by Mark Olesen's avatar Mark Olesen
Browse files

minor docu change

parent c5b38a72
......@@ -41,7 +41,7 @@ Description
xferMoveTo() functions can prove useful. An example is transferring
from a DynamicList to a List. Since the
List\<T\>::transfer(List\<T\>&) method could result in some allocated
memory becoming inaccessible, the xferMoveTo() function can be used to
memory becoming inaccessible, the xferMoveTo() function should be used to
invoke the correct List\<T\>::transfer(DynamicList\<T\>&) method.
@code
......@@ -50,6 +50,16 @@ Description
labelList plainLst( xferMoveTo<labelList>(dynLst) );
@endcode
Of course, since this example is a very common operation, the
DynamicList::xfer() method transfers to a plain List anyhow.
It would thus be simpler (and clearer) just to use the following code:
@code
DynamicList<label> dynLst;
...
labelList plainLst(dynLst.xfer());
@endcode
SeeAlso
xferCopy, xferCopyTo, xferMove, xferMoveTo, xferTmp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment