1f8c16417SMarshall Clow //===----------------------------------------------------------------------===//
2f8c16417SMarshall Clow //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6f8c16417SMarshall Clow //
7f8c16417SMarshall Clow //===----------------------------------------------------------------------===//
8f8c16417SMarshall Clow 
9f8c16417SMarshall Clow // <utility>
10f8c16417SMarshall Clow 
11f8c16417SMarshall Clow // template <class T1, class T2> struct pair
12f8c16417SMarshall Clow 
13f8c16417SMarshall Clow // tuple_element<I, pair<T1, T2> >::type
14f8c16417SMarshall Clow 
15f8c16417SMarshall Clow #include <utility>
16f8c16417SMarshall Clow 
main(int,char **)172df59c50SJF Bastien int main(int, char**)
18f8c16417SMarshall Clow {
19f8c16417SMarshall Clow     typedef std::pair<int, short> T;
20*69d5a666SChristopher Di Bella     std::tuple_element<2, T>::type foo; // expected-error@*:* {{Index out of bounds in std::tuple_element<std::pair<T1, T2>>}}
212df59c50SJF Bastien 
222df59c50SJF Bastien     return 0;
23f8c16417SMarshall Clow }
24