blob: ddf558cfc8d468572320c9b10ba51ea0e535ddca [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
Howard Hinnant5b08a8a2010-05-11 21:36:01 +00003// The LLVM Compiler Infrastructure
Howard Hinnant3e519522010-05-11 19:42:16 +00004//
Howard Hinnant412dbeb2010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant3e519522010-05-11 19:42:16 +00007//
8//===----------------------------------------------------------------------===//
9
10// <tuple>
11
12// template <class... Types> class tuple;
13
14// This is not a portable test
15
16#include <tuple>
17
18struct A {};
19
20struct B {};
21
22int main()
23{
24 {
25 typedef std::tuple<int, A> T;
26 static_assert((sizeof(T) == sizeof(int)), "");
27 }
28 {
29 typedef std::tuple<A, int> T;
30 static_assert((sizeof(T) == sizeof(int)), "");
31 }
32 {
33 typedef std::tuple<A, int, B> T;
34 static_assert((sizeof(T) == sizeof(int)), "");
35 }
36 {
37 typedef std::tuple<A, B, int> T;
38 static_assert((sizeof(T) == sizeof(int)), "");
39 }
40 {
41 typedef std::tuple<int, A, B> T;
42 static_assert((sizeof(T) == sizeof(int)), "");
43 }
44}