diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2011-05-11 20:21:19 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2011-05-11 20:21:19 +0000 |
| commit | f738497500640f2da52748844d1b0acbd39d31c0 (patch) | |
| tree | e3f39abd50a872509632c1657474b882064bb9eb /libcxx/test/utilities | |
| parent | 08ad63b580f5175a0671a1447d1ddf5aee0daaef (diff) | |
| download | bcm5719-llvm-f738497500640f2da52748844d1b0acbd39d31c0.tar.gz bcm5719-llvm-f738497500640f2da52748844d1b0acbd39d31c0.zip | |
Corrected some bugs in both memory and the tests. Preparing for being able to turn on support for alias templates.
llvm-svn: 131199
Diffstat (limited to 'libcxx/test/utilities')
2 files changed, 5 insertions, 5 deletions
diff --git a/libcxx/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp b/libcxx/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp index 6b2d546df49..7e1500b7311 100644 --- a/libcxx/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp +++ b/libcxx/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp @@ -64,7 +64,7 @@ public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&&) {++move_only_constructed;} - move_only& operator=(move_only&&) {} + move_only& operator=(move_only&&) {return *this;} #else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv<move_only> () {return std::__rv<move_only>(*this);} move_only(std::__rv<move_only>) {++move_only_constructed;} diff --git a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp index 1f54e6e38c8..21cdf4a13e4 100644 --- a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp +++ b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp @@ -47,7 +47,7 @@ int main() A* ptrA = pA.get(); { std::shared_ptr<B> pB(new B); - pB = pA; + pB = std::move(pA); assert(B::count == 1); assert(A::count == 1); assert(pB.use_count() == 1); @@ -64,7 +64,7 @@ int main() A* ptrA = pA.get(); { std::shared_ptr<B> pB(new B); - pB = pA; + pB = std::move(pA); assert(B::count == 0); assert(A::count == 0); assert(pB.use_count() == 1); @@ -81,7 +81,7 @@ int main() A* ptrA = pA.get(); { std::shared_ptr<B> pB; - pB = pA; + pB = std::move(pA); assert(B::count == 1); assert(A::count == 1); assert(pB.use_count() == 1); @@ -98,7 +98,7 @@ int main() A* ptrA = pA.get(); { std::shared_ptr<B> pB; - pB = pA; + pB = std::move(pA); assert(B::count == 0); assert(A::count == 0); assert(pB.use_count() == 1); |

