* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / auto22.C
blob4ae1d1cf513d8d749bdce4b95a99775779a2dd33
1 // PR c++/47999
2 // { dg-do compile { target c++11 } }
4 int& identity(int& i)
6   return i;
9 // In a function template, auto type deduction works incorrectly.
10 template <typename = void>
11 void f()
13   int i = 0;
14   auto&& x = identity(i); // Type of x should be `int&`, but it is `int&&`.
17 int main (int argc, char* argv[])
19   f();
20   return 0;