Skip to content

Conversation

lhames
Copy link
Contributor

@lhames lhames commented Aug 27, 2025

Store std::decay_t to ensure that we can initialize via lvalue references:

auto NamedNoop = {};
move_only_function<void()> Noop(NamedNoop); // <- no longer an error!

Store std::decay_t<Callable> to ensure that we can initialize via lvalue
references:

  auto NamedNoop = [](){};
   move_only_function<void()> Noop(NamedNoop); // <- no longer an error!
@lhames lhames merged commit 5bca8f2 into llvm:main Aug 27, 2025
10 checks passed
@lhames lhames deleted the orc-rt-move_only_function-fix-lvalues branch August 27, 2025 23:31
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