Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/rv-func.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/48457, Core 1238 |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 template<class T> | |
5 T&& create(); | |
6 | |
7 template<class T, class Arg> | |
8 void test() { | |
9 T t(create<Arg>()); | |
10 (void) t; | |
11 } | |
12 | |
13 void f (void (&)()); | |
14 void f (void (&&)()); | |
15 | |
16 int main() { | |
17 test<void(&)(), void()>(); | |
18 test<void(&&)(), void()>(); | |
19 // This call should choose the lvalue reference overload. | |
20 // { dg-final { scan-assembler-not "_Z1fOFvvE" } } | |
21 f(create<void()>()); | |
22 } |