Regression test for overlapping inspect#5
Conversation
|
BTW not sure if you appreciate pull requests and bug reports at this stage, but I think I found a bug: |
|
It should be the first, as presented (https://github.com/hsutter/cppfront#2021-is-as-and-pattern-matching). All those pass the |
|
Hi.. i have one query |
|
Thanks! I've got a fix for the Re matching
So we have not only divergently spelled types for this concept but also even more divergently spelled state queries...) I'll think more about this. My current thought is that the right solution is for Cpp2 is to have some single spelling for this, perhaps |
|
OK, I've now added general support for This is in response to the question above about:
That should now work, and work uniformly and generally for all "empty" states in these types. Thanks! |
|
Wondering what what happen for the new C++23 std::expected. |
Hi I saw your talk today and am curious about how
inspectis intended to behave when there are overlapping matches. Should it execute the first match? All the matches? Fail to compile? I've attached a regression test to demonstrate.Current behaviour is:
I tried it in godbolt and it seems like the
std::anymatcher fails to compile, and for the rest it executes the first successful match. (but I may have screwed up while trying to compile the generated C++ code, maybe thestd::anywould compile if I did something different)