Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC

llvm-svn: 316969
This commit is contained in:
Marshall Clow 2017-10-31 00:05:17 +00:00
parent 5552f503d5
commit 30631ea6aa
1 changed files with 23 additions and 0 deletions

View File

@ -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;
}