* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / rv-return.C
blob6d57209b5471c927d9876fd82ca5c092ab613a2f
1 // PR c++/41815
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fno-ipa-icf" }
5 template<typename T, typename U> struct same_type;
6 template<typename T> struct same_type<T, T> {};
8 int const f() { return 0; }
10 int &&r = f(); // binding "int&&" to "int" should succeed
11 same_type<decltype(f()), int> s1;
12 same_type<decltype(0,f()), int> s2;
14 template <class T>
15 T const g() { return 0; }
17 int &&r2 = g<int>();
18 same_type<decltype(g<int>()), int> s3;
19 same_type<decltype(0,g<int>()), int> s4;