blob: c9b35b84e923b02b0623d8d544ef20986a5dd41b [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//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
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}