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// <tuple>
10
11// template <class... Types> class tuple;
12
13// template <size_t I, class... Types>
14// struct tuple_element<I, tuple<Types...> >
15// {
16// typedef Ti type;
17// };
18
19// UNSUPPORTED: c++03
20
21#include <tuple>
22
23using T = std::tuple<int, long, void*>;
24using E1 = typename std::tuple_element<1, T &>::type; // expected-error{{undefined template}}
25using E2 = typename std::tuple_element<3, T>::type;
26using E3 = typename std::tuple_element<4, T const>::type; // expected-error@*:* 2 {{static assertion failed}}
27

source code of libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.verify.cpp