1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// Binding an rvalue to && beats binding it to const& (13.3.3.2). // { dg-require-effective-target c++11 } struct A { int operator+(int) &&; }; void operator+ (const A&, int); int main() { return A() + 42; }