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 // template<size_t I, class T1, class T2>
14 // const typename tuple_element<I, std::pair<T1, T2> >::type&
15 // get(const pair<T1, T2>&);
16
17 #include <utility>
18 #include <cassert>
19
main(int,char **)20 int main(int, char**)
21 {
22 {
23 typedef std::pair<int, short> P;
24 const P p(3, 4);
25 assert(std::get<0>(p) == 3);
26 assert(std::get<1>(p) == 4);
27 std::get<0>(p) = 5;
28 }
29
30 return 0;
31 }
32