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 | // template<size_t I, class T1, class T2> |
14 | // const typename tuple_element<I, std::pair<T1, T2> >::type& |
15 | // get(const pair<T1, T2>&); |
16 | |
17 | #include <utility> |
18 | |
19 | void f() { |
20 | typedef std::pair<int, short> P; |
21 | const P p(3, 4); |
22 | std::get<0>(in: p) = 5; // expected-error {{cannot assign to return value}} |
23 | } |
24 | |