16db379a2SMarshall Clow //===----------------------------------------------------------------------===//
26db379a2SMarshall 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
66db379a2SMarshall Clow //
76db379a2SMarshall Clow //===----------------------------------------------------------------------===//
86db379a2SMarshall Clow 
96db379a2SMarshall Clow // <array>
106db379a2SMarshall Clow 
116db379a2SMarshall Clow // tuple_element<I, array<T, N> >::type
126db379a2SMarshall Clow 
136db379a2SMarshall Clow #include <array>
146db379a2SMarshall Clow #include <cassert>
156db379a2SMarshall Clow 
main(int,char **)162df59c50SJF Bastien int main(int, char**)
176db379a2SMarshall Clow {
186db379a2SMarshall Clow     {
196db379a2SMarshall Clow         typedef double T;
206db379a2SMarshall Clow         typedef std::array<T, 3> C;
216db379a2SMarshall Clow         std::tuple_element<3, C> foo; // expected-note {{requested here}}
22*76476efdSMuhammad Usman Shahid         // expected-error-re@array:* {{{{(static_assert|static assertion)}} failed{{( due to requirement '3U[L]{0,2} < 3U[L]{0,2}')?}}{{.*}}Index out of bounds in std::tuple_element<> (std::array)}}
236db379a2SMarshall Clow     }
242df59c50SJF Bastien 
252df59c50SJF Bastien   return 0;
266db379a2SMarshall Clow }
27