All, 开发者_JAVA百科
Question 1
while using templates, Compiler error information is known to be very cryptic (In the sense not readily readable by a newbee eyes) - though compiler nowadays tries best to put as much information as possible during coding problem.Is there a chance - that the error information is more better in some compilers than others? If So can you please guide me which compiler gives more clearer information.
Question 2
The problem with template code compiler error resolving is two fold - lack of experience/ability to decode the error and also some blame to the compiler not able to give only as much information as possible which can be understood by the "human logic interpretation"Is there any tool/options in compiler to make it more readable?
PS : Currently I use gcc 4.1.2, and less often XlC_r (Version 6) and aCC (for HP)
Thanks for your input in advance.
If your platform can't support clang
for some reason try STLFilt
to get sensible errors.
I have read that the Clang compiler for LLVM has good diagnostics. (But I haven't tried it myself.)
AFAIK, Comeau's compiler should be pretty good. You can also try an online version of it. Of course, it doesn't come for free.
As for tools, there's STLFilt but it doesn't seems updated anymore.
精彩评论