-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
prototype-bugSomething isn't workingSomething isn't working
Description
The last line prints 1, but it should print 2 because f(param) is the definite last use of the param... Godbolt repro: https://cppx.godbolt.org/z/17noYP
struct X {};
void f(X const&) { cout << "1\n"; }
void f(X && ) { cout << "2\n"; }
void test(in X param) { f(param); }
int main() {
X x;
test(x); // 1
test(X()); // *** should be 2
}
Metadata
Metadata
Assignees
Labels
prototype-bugSomething isn't workingSomething isn't working