Closed
Description
Hello,
the following code is accepted by g++ and MSVC, but rejected by Clang:
https://compiler-explorer.com/z/hG58nq7TE (lambda)
https://compiler-explorer.com/z/7WM7eP3h7 (struct and coroutine member function)
Without the This
parameter for operator new
and passing another parameter, the code is accepted by Clang but rejected by g++ and MSVC:
https://compiler-explorer.com/z/dnEhsj6hP
With my reading of http://eel.is/c++draft/dcl.fct.def.coroutine#4 and http://eel.is/c++draft/dcl.fct.def.coroutine#9.1 Clang is wrong in both cases. It should accept the first and second example but reject the third.