C ++ Compiler Template Error Information - A tool for decoding error information

Everything,

Question 1
when using templates, the information about compiler errors is very mysterious (in a sense that is not readable by a beginner), although the compiler is currently trying to best place as much information as possible during an encoding problem.

Is there any chance that error information is better in some compilers than in others? If yes, can you please direct me which compiler gives more clear information.

Question 2
The problem with resolving the error of the code code compiler is twofold - lack of experience / ability to decode the error, as well as some guilt in the compiler, which is not able to provide as much information as can be understood by the "interpretation of human logic"

Is there any tool / options in the compiler to make it more readable?


PS: I am currently using gcc 4.1.2 and less commonly XlC_r (version 6) and aCC (for HP)

Thanks for your input in advance.

+4
source share
3 answers

If your platform does not support clang for any reason, try STLFilt to get reasonable errors.

+3
source

I read that the Clang compiler for LLVM has good diagnostics. (But I have not tried it myself.)

0
source

AFAIK, the Comeau compiler should be pretty good. You can also try its online version. Of course, this is not free.

As for tools, there is STLFilt , but it is no longer being updated.

0
source

Source: https://habr.com/ru/post/1333553/


All Articles