Yes, the clang team made a real effort to produce helpful messages about a decade ago. I think there’s still scope for improvement, though, I frequently get errors where the line with the actual error is pointed at by the seventh of twelve messages.
MSVC (at least 2015 and older) has some really awful error messages, worse than gcc.
Something along the lines of
SomeThingClass(const SomeThignClass& other) {
returned something about the “return type is int by default” behavior from old C not being allowed anymore in VS2015. clang helpfully suggested: no template named 'SomeThignClass'; did you mean 'SomeThingClass'?
Since the beginning clang was generating better error messages
GCC got better since though
Yes, the clang team made a real effort to produce helpful messages about a decade ago. I think there’s still scope for improvement, though, I frequently get errors where the line with the actual error is pointed at by the seventh of twelve messages.
While it may be true that Clang generally produces better error messages,
… is not a good conclusion to draw from a single example.
Garbage in, garbage out. If you run the same test with
in place of
std::pair, you getThis is a problem with the STL, not gcc.
MSVC (at least 2015 and older) has some really awful error messages, worse than gcc.
Something along the lines of
returned something about the “return type is int by default” behavior from old C not being allowed anymore in VS2015. clang helpfully suggested:
no template named 'SomeThignClass'; did you mean 'SomeThingClass'?