Add a test for uniqueptr having either NULL and nullptr

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow 2016-05-16 16:57:15 +00:00
parent eaba7bb5ac
commit 5d98497d0b

View File

@ -40,4 +40,10 @@ int main()
assert(s.get_deleter().state() == 0);
}
assert(A::count == 0);
{ // LWG#2520 says that nullptr is a valid input as well as null
std::unique_ptr<A[], Deleter<A[]> > s1(NULL, Deleter<A[]>());
std::unique_ptr<A[], Deleter<A[]> > s2(nullptr, Deleter<A[]>());
}
assert(A::count == 0);
}