Skip to content
Snippets Groups Projects
Commit 7f062a8f authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: return plain List instead of shrinking the DynamicList

  Using 'return List<T>(std::move(dynList))' for transfer of content
  (with implicit shrinking) into a plain List, and leave copy elision
  to do the rest. The implicit transfer (move construct List from
  DynamicList) will normally invoke resize (new/delete and moving
  elements).

  With 'return dynList.shrink()', it will first invoke an internal
  resize (new/delete and moving elements), followed by a copy
  construct as a plain list.

STYLE: avoid implicit cast to 'const List&' in constructors
parent f13a0537
No related branches found
No related tags found
Loading
Showing
with 50 additions and 46 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment