diff options
Diffstat (limited to 'libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp')
-rw-r--r-- | libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp index 3e3da51e446..429e7e9d58a 100644 --- a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp +++ b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/unique.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <memory>
// shared_ptr
// bool unique() const;
#include <memory>
#include <cassert>
int main()
{
const std::shared_ptr<int> p(new int(32));
assert(p.unique());
{
std::shared_ptr<int> p2 = p;
assert(!p.unique());
}
assert(p.unique());
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <memory>
// shared_ptr
// bool unique() const;
#include <memory>
#include <cassert>
int main()
{
const std::shared_ptr<int> p(new int(32));
assert(p.unique());
{
std::shared_ptr<int> p2 = p;
assert(!p.unique());
}
assert(p.unique());
}
\ No newline at end of file |