Debian Codegraph @

libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.tuple_element.verify.cpp

raw
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
17 void f() {
18 typedef std::pair<int, double> P;
19 std::tuple_element<2, P>::type foo; // expected-note {{requested here}}
20 // expected-error-re@*:* {{static assertion failed{{( due to requirement '2U[L]{0,2} < 2')?}}{{.*}}Index out of bounds in std::tuple_element<std::pair<T1, T2>>}}
21 }