diff options
Diffstat (limited to 'libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp')
| -rw-r--r-- | libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp index ef62c139a7e..01047a22978 100644 --- a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp +++ b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/default.pass.cpp @@ -1 +1,25 @@ -//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <memory>
// template<class T> class weak_ptr
// weak_ptr();
#include <memory>
#include <cassert>
struct A;
int main()
{
std::weak_ptr<A> p;
assert(p.use_count() == 0);
}
\ 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> + +// template<class T> class weak_ptr + +// weak_ptr(); + +#include <memory> +#include <cassert> + +struct A; + +int main() +{ + std::weak_ptr<A> p; + assert(p.use_count() == 0); +} |

