[Bug c++/110122] [13/14 Regression] using an aggregate with a member variable with a user defined copy constructor in a class NTTP causes capture and use of the `this` pointer in a generic lambda to produce the following error "-copy ctor- used before its definition"
waffl3x at protonmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 6 00:18:38 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110122
--- Comment #3 from waffl3x <waffl3x at protonmail dot com> ---
Very cool, thanks, since your test case seems to cause problems in GCC 11 and
GCC 12 does that mean the bug goes deeper than I thought?
(In reply to Patrick Palka from comment #2)
> It seems only the first testcase exhibits a 13 regression, we never accepted
> the second testcase.
Is that what you meant here btw, that since your second test case triggers the
bug in 11 and 12 that it belongs as a different regression test?
Sadly, the workaround doesn't work when `Bar` is a class template.
https://godbolt.org/z/41xWrar5e
So it doesn't work in my specific case :(
I'm still very impressed that you found another way to trigger it as well as a
workaround, it's just a shame I can't use it.
More information about the Gcc-bugs
mailing list