Skip to content

Latest commit

 

History

History
13 lines (13 loc) · 549 Bytes

13.4.md

File metadata and controls

13 lines (13 loc) · 549 Bytes
Point global;
Point foo_bar(Point arg)  // copy initialize `arg` may use copy constructor
{
  Point local = arg, *heap = new Point(global);
  // copy initialize `local` may use copy constructor
  // copy initialize `heap` may use copy constructor
  *heap = local;
  Point pa[ 4 ] = { local, *heap };
  // brace initialize the elements in array `pa` will use copy
  // initialization, which may use copy constructor
  return *heap;
  // copy initialize the return object may use copy constructor
}