1 // I, Howard Hinnant, hereby place this code in the public domain.
3 // Test: Unamed rvalue references are treated as lvalues.
6 // { dg-options "-std=c++0x" }
8 template <bool> struct sa;
9 template <> struct sa<true> {};
11 struct one {char x[1];};
12 struct two {char x[2];};
16 one foo(const A&) {return one();}
17 two foo(A&&) {return two();}
19 A&& source() {static A a; return a;}
23 sa<sizeof(foo(source())) == 2> t1;