Skip to content

Conversation

lhames
Copy link
Contributor

@lhames lhames commented Aug 27, 2025

The call operator for the type returned by bind_front should forward its arguments, rather than moving them. This ensures that we handle lvalue references in unbound args correctly:

auto B = bind_front([](int &) {});
int N = 7;
B(N); // <- no longer an error!

The call operator for the type returned by bind_front should forward its
arguments, rather than moving them. This ensures that we handle lvalue
references in unbound args correctly:

  auto B = bind_front([](int &) {});
  int N = 7;
  B(N); // <- no longer an error!
@lhames lhames merged commit e8c2241 into llvm:main Aug 27, 2025
10 checks passed
@lhames lhames deleted the orc-rt-bind-front-arg-forwarding branch August 27, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant