summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/memory
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/utilities/memory')
-rw-r--r--libcxx/test/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/libcxx/test/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp b/libcxx/test/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp
new file mode 100644
index 00000000000..5d1cf1ff498
--- /dev/null
+++ b/libcxx/test/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/void.fail.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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>
+
+// default_delete
+
+// Test that default_delete's operator() requires a complete type
+
+#include <memory>
+#include <cassert>
+
+int main()
+{
+ std::default_delete<const void> d;
+ const void* p = 0;
+ d(p);
+}
OpenPOWER on IntegriCloud