2 // { dg-options -std=c++0x }
4 template<typename T, typename U> struct same_type;
5 template<typename T> struct same_type<T, T> {};
7 int const f() { return 0; }
9 int &&r = f(); // binding "int&&" to "int" should succeed
10 same_type<decltype(f()), int const> s1;
11 same_type<decltype(0,f()), int> s2;
14 T const g() { return 0; }
17 same_type<decltype(g<int>()), int const> s3;
18 same_type<decltype(0,g<int>()), int> s4;