[AMDGPU] Mark AGPR tuple implicit in the first instr of AGPR spills. (#115285)
[llvm-project.git] / libcxx / test / std / utilities / utility / forward / forward.verify.cpp
blob64c20ae6f526a834dc8bf78720e96d171f18a1dc
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 //===----------------------------------------------------------------------===//
9 // test forward
11 #include <utility>
13 #include "test_macros.h"
15 struct A
19 A source() {return A();}
20 const A csource() {return A();}
22 int main(int, char**)
25 (void)std::forward<A&>(source()); // expected-note {{requested here}}
26 // expected-error-re@*:* 1 {{static assertion failed{{.*}}cannot forward an rvalue as an lvalue}}
29 const A ca = A();
30 std::forward<A&>(ca); // expected-error {{no matching function for call to 'forward'}}
33 std::forward<A&>(csource()); // expected-error {{no matching function for call to 'forward'}}
36 const A ca = A();
37 std::forward<A>(ca); // expected-error {{no matching function for call to 'forward'}}
40 std::forward<A>(csource()); // expected-error {{no matching function for call to 'forward'}}
43 A a;
44 std::forward(a); // expected-error {{no matching function for call to 'forward'}}
47 return 0;