// PR c++/41815 // { dg-options -std=c++0x } 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 const> s3; same_type()), int> s4;