Open tomboehmer opened 2 years ago
@mizvekov I think the ask here is to display both the sugared and desugared name. WDYT?
Yeah, sure when displaying a type, we do also display the canonical type when that differs, assuming that would be helpful.
But this is asking for something completely different, we have a boolean expression for the static_assert, and we have never considered printing a desugared expression as far as I know.
That's feasible, but might require building considerable infrastructure.
We could limit the scope of the problem, by for example only handling boolean expressions composed from concept specializations, but that does not seem specially motivating.
Also consider that desugaring might not always be helpful.
In some circumstances, the sugar is not understandable to the user, and the desugared thing is. In other circumstances, the opposite might be true. Consider an ugly named class hidden in some detail namespace, which the user is only supposed to access through a typedef. In yet other circumstances, a more complex thing can be composed of a mix of both things above, so that it doesn't 'look good' when printed either way.
Problem
The following code generates an error message that is not expressive enough.
This is the error message:
In particular the line
does not contain any information about what is supposed to be called and with what. So it is practically useless.
Desired behaviour
Somewhere along the line print something like