From c6934a38d5c2ed189b88de97f9ea9901d052d93b Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 31 Oct 2017 00:05:17 +0000 Subject: [PATCH] Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316969 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../meta.trans.other/aligned_union.fail.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp diff --git a/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp b/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp new file mode 100644 index 000000000..efee5064c --- /dev/null +++ b/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_union.fail.cpp @@ -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 + +#include + +class A; // Incomplete + +int main() +{ + typedef std::aligned_union<10, A>::type T1; +}