Files
cxx/test/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp
Justin Bogner 464da3b76c test: Make it possible to opt in to use_clang_verify per test
This modifies the use_clang_verify parameter I added in r217009 to
only apply to tests that specifically ask for it via // USE_VERIFY.
This allows us to incrementally convert tests, but start enjoying the
benefits right away.

Suggested by Eric Fiselier in code review.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217017 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 06:01:52 +00:00

40 lines
944 B
C++

//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <memory>
// unique_ptr
// Test unique_ptr default ctor
// default unique_ptr ctor should require default Deleter ctor
// USE_VERIFY
#include <memory>
class Deleter
{
// expected-error@memory:* {{base class 'Deleter' has private default constructor}}
// expected-note@memory:* + {{in instantiation of member function}}
Deleter() {} // expected-note {{implicitly declared private here}}
public:
Deleter(Deleter&) {}
Deleter& operator=(Deleter&) { return *this; }
void operator()(void*) const {}
};
int main()
{
std::unique_ptr<int[], Deleter> p;
}