https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95111

--- Comment #5 from Avi Kivity <a...@cloudius-systems.com> ---
This snippet from cppreference:

  If the coroutine is a non-static member function, such as task<void> 
  my_class::method1(int x) const;, its Promise type is 
  std::coroutine_traits<task<void>, const my_class&, int>::promise_type

implies that both gcc and my interpretation are wrong. gcc passes a pointer for
the lambda, and I'd like the lambda to be passed by value. The difference
between gcc and cppreference is trivial, and both of them make coroutine
lambdas unusable if they contain state and if the lambda is asynchronous.

Reply via email to