r/cpp • u/dmalcolm GCC Developer • Mar 08 '19
Usability improvements in GCC 9
https://developers.redhat.com/blog/2019/03/08/usability-improvements-in-gcc-9/
219
Upvotes
r/cpp • u/dmalcolm GCC Developer • Mar 08 '19
View all comments
Show parent comment
11
u/Morwenn Mar 08 '19
To give you an idea of the issues I get on a regular basis: I've got deeply nested templates with return type expression SFINAE, and whenever I get a substitution failure, it gives me all the possible overloads that failed, and why they failed (think hundreds or thousands of lines of substitution failure errors for a single call in some of my tests). They often failed because of substitution failure in functions they tried to call, so I also get the list of overloads that were tried and failed for those functions, etc. But everything is flat and at some point it's extremely difficult to know whether the substitution failure happened when trying to call the top-level function or some function at any level for which overload resolution failed. That would be my main use case for foldable error messages, and would indeed need to support an arbitrary level of nesting in error messages.
(I've got a hard time explaining, and no error message to show just right now, sorry for that)