Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC
authorMarshall Clow <mclow.lists@gmail.com>
Tue, 31 Oct 2017 00:05:17 +0000 (00:05 +0000)
committerMarshall Clow <mclow.lists@gmail.com>
Tue, 31 Oct 2017 00:05:17 +0000 (00:05 +0000)
llvm-svn: 316969

libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp [new file with mode: 0644]

diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp
new file mode 100644 (file)
index 0000000..efee506
--- /dev/null
@@ -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;
+}