1 // I, Howard Hinnant, hereby place this code in the public domain.
3 // Test: Named rvalue references are treated as lvalues.
5 // { dg-do compile { target c++11 } }
6 // { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } }
8 template <bool> struct sa;
9 template <> struct sa<true> {};
11 struct one {long x[1];};
12 struct two {long x[2];};
16 one foo(const A&) {return one();}
17 two foo(A&&) {return two();}
21 sa<sizeof(foo(a)) == 1 * sizeof(long)> t1;