https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95457
Bug ID: 95457 Summary: Inadequate diagnostics on constrained coroutines Product: gcc Version: 10.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: a...@cloudius-systems.com Target Milestone: --- Created attachment 48651 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48651&action=edit test case If a coroutine_traits specialization fails, and if the constraints is not satisfied, gcc reports that it cannot find the promise type. However, it does not report on the constraint failure, as it usually does with concepts. The diagnostics for the attached test case are: g++ -std=c++20 -fcoroutines constrained-coroutine.cc -o constrained-coroutine constrained-coroutine.cc: In function ‘dummy_coroutine foo(int&&)’: constrained-coroutine.cc:31:5: error: unable to find the promise type for this coroutine 31 | co_return x; | ^~~~~~~~~ cc1plus: warning: control reaches end of non-void function [-Wreturn-type]