Error messages with UFCS #810
Closed
MaxSagebaum
started this conversation in
Suggestions
Replies: 3 comments 1 reply
-
This seems new. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok, thanks for the hints. I tested the ufcs branch and got: gcc
clang:
It is definitely better but still quite far away from the original error message. Especially clang is hard to read since the 5th note is the one you want to have. Nevertheless, the actual message is much better for clang.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While programming a little bit with cppfront, I kind of ran into problems with UFCS. If you do not type correct code. The error message are quite different from the usual ones.
I minimal example: https://cpp2.godbolt.org/z/WexbnxT4K
The UFCS generated by cppfront makes the error message not very readable. I know this is an alpha and it is not that simple to achieve, but maybe a static assert could be added that provides a better error message. Something like:
People that want to try cppfront and get quite obscure errors, will maybe drop it quite fast. So in terms of self advertisement it is probably a good idea.
The same is kind of true for other helpers like the null check. If the expression is not valid, then the errors become quite ugly.
Beta Was this translation helpful? Give feedback.
All reactions