• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <tuple>
11 
12 // template <class... Types> class tuple;
13 
14 // UNSUPPORTED: c++98, c++03
15 
16 // This is not a portable test
17 
18 #include <tuple>
19 
20 struct A {};
21 
22 struct B {};
23 
main()24 int main()
25 {
26     {
27         typedef std::tuple<int, A> T;
28         static_assert((sizeof(T) == sizeof(int)), "");
29     }
30     {
31         typedef std::tuple<A, int> T;
32         static_assert((sizeof(T) == sizeof(int)), "");
33     }
34     {
35         typedef std::tuple<A, int, B> T;
36         static_assert((sizeof(T) == sizeof(int)), "");
37     }
38     {
39         typedef std::tuple<A, B, int> T;
40         static_assert((sizeof(T) == sizeof(int)), "");
41     }
42     {
43         typedef std::tuple<int, A, B> T;
44         static_assert((sizeof(T) == sizeof(int)), "");
45     }
46 }
47