Cleanup move/forward tests and remove references to __rv.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2015-05-27 00:51:08 +00:00
parent 8f1d85fde5
commit ee6bfb2117
3 changed files with 15 additions and 30 deletions

View File

@@ -9,6 +9,8 @@
// test move
// UNSUPPORTED: c++98, c++03
#include <utility>
#include <cassert>
@@ -17,25 +19,13 @@ int move_ctor = 0;
class A
{
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#else
#endif
public:
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
A(const A&) {++copy_ctor;}
A& operator=(const A&);
A(A&&) {++move_ctor;}
A& operator=(A&&);
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
A(const A&) {++copy_ctor;}
A& operator=(A&);
operator std::__rv<A> () {return std::__rv<A>(*this);}
A(std::__rv<A>) {++move_ctor;}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
A() {}
};