[PATCH] D147070: Improve requirement clause limitation on non templated function
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 28 13:04:04 PDT 2023
cor3ntin added a comment.
In D147070#4228303 <https://reviews.llvm.org/D147070#4228303>, @erichkeane wrote:
> Took Corentin's advice and tried to test the lambda condition. THIS made me discover that we didn't properly implement this for lambdas at all! So this patch NOW also implements the restriction for lambdas.
>
> @cor3ntin : Please double check on this for me? I had to touch some lambda tests you worked on.
Wow!
I think the patch still makes sense, I'm certainly glad we tested the lambda closure case!
================
Comment at: clang/test/SemaCXX/lambda-capture-type-deduction.cpp:52
+template<typename T>
void test_requires() {
----------------
erichkeane wrote:
> When this isn't a template, all of the requires clauses below are ill-formed. So made this a function template that hopefully @cor3ntin agrees matches his intent when he wrote this test.
It does, thanks!
It's weird that i didn't notice the bug when writing those tests - at the same time i always felt this restriction to be a bit artificial.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147070/new/
https://reviews.llvm.org/D147070
More information about the cfe-commits
mailing list