// PR c++/41815 // { dg-do compile { target c++11 } } template struct same_type; template struct same_type {}; int const f() { return 0; } int &&r = f(); // binding "int&&" to "int" should succeed same_type s1; same_type s2; template T const g() { return 0; } int &&r2 = g(); same_type()), int> s3; same_type()), int> s4;