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_element<I, pair<T1, T2> >::type
14
15#include <utility>
16
17void f() {
18 typedef std::pair<int, short> T;
19 std::tuple_element<2, T>::type foo; // expected-error@*:* {{Index out of bounds in std::tuple_element<std::pair<T1, T2>>}}
20}
21

source code of libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.verify.cpp