Merge pull request #296 from kpx1894/kpx1894-patch-1

fixes to code examples in C.61
This commit is contained in:
Gabriel Dos Reis 2015-10-09 10:54:47 -07:00
commit 552855c17a

View File

@ -4414,7 +4414,7 @@ After a copy `x` and `y` can be independent objects (value semantics, the way no
bool operator==(const X& a, const X& b)
{
return sz == a.sz && equal(p, p + sz, a.p, a.p + sz);
return a.sz == b.sz && equal(a.p, a.p + a.sz, b.p, b.p + b.sz);
}
X::X(const X& a)
@ -4445,7 +4445,7 @@ After a copy `x` and `y` can be independent objects (value semantics, the way no
bool operator==(const X2& a, const X2& b)
{
return sz == a.sz && p == a.p;
return a.sz == b.sz && a.p == b.p;
}
X2 x;