[libcxx] r316969 - Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 17:05:17 PDT 2017


Author: marshall
Date: Mon Oct 30 17:05:17 2017
New Revision: 316969

URL: http://llvm.org/viewvc/llvm-project?rev=316969&view=rev
Log:
Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC

Added:
    libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp

Added: libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp?rev=316969&view=auto
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp (added)
+++ libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp Mon Oct 30 17:05:17 2017
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03
+
+// type_traits
+
+// aligned_union<size_t Len, class ...Types>
+
+#include <type_traits>
+
+class A; // Incomplete
+
+int main()
+{
+    typedef std::aligned_union<10, A>::type T1;
+}




More information about the cfe-commits mailing list