On Friday, December 22nd, 2023 at 10:26 AM, Jason Merrill <ja...@redhat.com> wrote: > > > On 12/22/23 04:01, waffl3x wrote: > > > int n = 0; > > auto f = []<typename Self>(this Self){ > > static_assert(__is_same (decltype(n), int)); > > decltype((n)) a; // { dg-error {is not captured} } > > }; > > f(); > > > > Could you clarify if this error being removed was intentional. I do > > recall that Patrick Palka wanted to remove this error in his patch, but > > it seemed to me like you stated it would be incorrect to allow it. > > Since the error is no longer present I assume I am misunderstanding the > > exchange. > > > > In any case, let me know if I need to modify my test case or if this > > error needs to be added back in. > > > Removing the error was correct under > https://eel.is/c++draft/expr.prim#id.unqual-3 > Naming n in that lambda would not refer a capture by copy, so the > decltype is the same as outside the lambda. > > Jason
Alright, I've fixed my tests to reflect that. I've got defaulting assignment operators working. Defaulting equality and comparison operators seemed to work out of the box somehow, so I just have to make some fleshed out tests for those cases. There can always be more tests, I have a few ideas for what still needs to be covered, mostly with dependent lambdas. Tests for xobj conversion operators definitely need to be more fleshed out. I also need to formulate some tests to make sure constraints are not being taking into account when the object parameters should not correspond, but that's a little more tough to test for than the valid cases. Other than tests though, is there anything you can think of that the patch is missing? Other than the aforementioned tests, I'm pretty confident everything is done. To recap, I have CWG2789 implemented on my end with the change we discussed to require corresponding object parameters instead of the same type, and I have CWG2586 implemented. I can't recall what other outstanding issues we had, and my notes don't mention anything other than tests. So I'm assuming everything is good. Alex