1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 // <utility>
10
11 // template <class T1, class T2> struct pair
12
13 // tuple_size<pair<T1, T2> >::value
14
15 #include <utility>
16
17 #include "test_macros.h"
18
main(int,char **)19 int main(int, char**)
20 {
21 {
22 typedef std::pair<int, short> P1;
23 static_assert((std::tuple_size<P1>::value == 2), "");
24 }
25 {
26 typedef std::pair<int, short> const P1;
27 static_assert((std::tuple_size<P1>::value == 2), "");
28 }
29 {
30 typedef std::pair<int, short> volatile P1;
31 static_assert((std::tuple_size<P1>::value == 2), "");
32 }
33 {
34 typedef std::pair<int, short> const volatile P1;
35 static_assert((std::tuple_size<P1>::value == 2), "");
36 }
37
38 return 0;
39 }
40