Closed xmh0511 closed 1 year ago
The prohibition is intended, see CWG1780. And I think it's better to report this as compiler bugs.
See
I think this issue can be closed as completed.
Thanks. The issue has been confirmed to be a bug in vendor implementations.
Full name of submitter (unless configured in github; will be published with the issue): Jim X
[expr.prim.lambda.closure] p16
IIUC, this rule just prohibit the user-defined specialization for the function call operator template of a lambda-expression. Consider this example:
All major implementations(i.e. Clang, GCC, and MSVC) accept this example, see https://godbolt.org/z/WsGsGWv6c. Is this a bug of these vendor implementations, or the wording is outdated?