1 // I, Howard Hinnant, hereby place this code in the public domain.
3 // Test that the implicit object parameter is *not* an rvalue reference, but is instead
4 // identical to that specified in C++03. That is, the implicit object parameter is
5 // an lvalue reference that can bind to an rvalue. :-\
6 // See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html under the
7 // section "Revision 1 Summary and Rationale" for more details.
10 // { dg-options "-std=c++0x" }
12 template <bool> struct sa;
13 template <> struct sa<true> {};
15 struct one {long x[1];};
16 struct two {long x[2];};
28 two operator<<(os&, const A&);
33 sa<sizeof(o << 1) == 1 * sizeof(long)> t1; // Calls os::operator<<(int)
34 // Would be ambiguous if the implicit object parameter
35 // was an rvalue reference.