struct A{};A f() { return A() };int main(){ A& a = func();}This compiles, when it shouldn't. Non-const l-value references must bind to lvalues. The value category of a function call is a prvalue.
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...