Merge pull request #473 from mpark/C.61

C.61: Fixed example to use `new[]` instead to allocate an array.
This commit is contained in:
hsutter 2015-12-22 19:39:37 -05:00
commit a1f7cdfc6e

View File

@ -4625,7 +4625,7 @@ After a copy `x` and `y` can be independent objects (value semantics, the way no
}
X::X(const X& a)
:p{new T}, sz{a.sz}
:p{new T[a.sz]}, sz{a.sz}
{
copy(a.p, a.p + sz, a.p);
}