Fix for LWG Issue 2415: Inconsistency between unique_ptr and shared_ptr

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@236953 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-05-10 13:59:45 +00:00
parent 928735abf1
commit 0ad232a882
3 changed files with 37 additions and 11 deletions

View File

@@ -67,7 +67,7 @@ int main()
pB = std::move(pA);
assert(B::count == 0);
assert(A::count == 0);
assert(pB.use_count() == 1);
// assert(pB.use_count() == 1); // no longer true due to LWG 2415
assert(pA.get() == 0);
assert(pB.get() == ptrA);
}
@@ -101,7 +101,7 @@ int main()
pB = std::move(pA);
assert(B::count == 0);
assert(A::count == 0);
assert(pB.use_count() == 1);
// assert(pB.use_count() == 1); // no longer true due to LWG 2415
assert(pA.get() == 0);
assert(pB.get() == ptrA);
}