Exercise rvalue arguements to make_shared for C++11 mode.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e1642e1c00
commit
01198b313c
@ -62,5 +62,16 @@ int main()
|
||||
assert(p->get_int() == 67);
|
||||
assert(p->get_char() == 'e');
|
||||
}
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
nc = new_count;
|
||||
{
|
||||
char c = 'e';
|
||||
std::shared_ptr<A> p = std::make_shared<A>(67, c);
|
||||
assert(new_count == nc+1);
|
||||
assert(A::count == 1);
|
||||
assert(p->get_int() == 67);
|
||||
assert(p->get_char() == 'e');
|
||||
}
|
||||
#endif
|
||||
assert(A::count == 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user