1*60eb06beSMichael Buch #include <cstdint> 2*60eb06beSMichael Buch #include <cstdio> 3*60eb06beSMichael Buch 4*60eb06beSMichael Buch struct Foo { funcFoo5*60eb06beSMichael Buch uint32_t func() const & { return 0; } funcFoo6*60eb06beSMichael Buch int64_t func() const && { return 1; } funcFoo7*60eb06beSMichael Buch uint32_t func() & { return 2; } funcFoo8*60eb06beSMichael Buch int64_t func() && { return 3; } 9*60eb06beSMichael Buch }; 10*60eb06beSMichael Buch main()11*60eb06beSMichael Buchint main() { 12*60eb06beSMichael Buch Foo foo; 13*60eb06beSMichael Buch const Foo const_foo; 14*60eb06beSMichael Buch auto res = foo.func() + const_foo.func() + Foo{}.func() + 15*60eb06beSMichael Buch static_cast<Foo const &&>(Foo{}).func(); 16*60eb06beSMichael Buch 17*60eb06beSMichael Buch std::puts("Break here"); 18*60eb06beSMichael Buch return res; 19*60eb06beSMichael Buch } 20