[libcxx] r261874 - Add test to ensure that the converting constructor in N4089 is present and working

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 25 07:25:30 PST 2016


Author: marshall
Date: Thu Feb 25 09:25:29 2016
New Revision: 261874

URL: http://llvm.org/viewvc/llvm-project?rev=261874&view=rev
Log:
Add test to ensure that the converting constructor in N4089 is present and working

Added:
    libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp

Added: libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp?rev=261874&view=auto
==============================================================================
--- libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp (added)
+++ libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp Thu Feb 25 09:25:29 2016
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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[]
+
+// template <class U>
+//   default_delete(const default_delete<U[]>&);
+//
+// This constructor shall not participate in overload resolution unless
+//   U(*)[] is convertible to T(*)[].
+
+#include <memory>
+#include <cassert>
+
+int main()
+{
+    std::default_delete<int[]> d1;
+    std::default_delete<const int[]> d2;
+}




More information about the cfe-commits mailing list