template paradigm and explicit warning

I was trying to compile a short example program ( 134 lines ) making extensive use of templates, and got nothing less than 500 lines of mysterious code really deep inside the template library, which is quite annoying and useless.

My point isn't how to solve this issue (most probably add the appropriate path to the project..), but I had this problem several times already, and so I have rather an open question in mind : is there any way to improve the understandability of template-related warnings ? Do you experience similar issues ? How do you usually solve them ?

1
задан Nielk 27 August 2010 в 09:48
поделиться

1 ответ

Из википедии:

Сообщения об ошибках, связанные с шаблонами, обычно очень длинные и их трудно расшифровать. Эта проблема считалась настолько серьезной, что был написан ряд инструментов, упрощающих и красиво печатающих сообщения об ошибках, связанных с STL, чтобы сделать их более понятными.

Существуют инструменты для улучшения понимания таких сообщений об ошибках, в первую очередь stlfilt.

2
ответ дан 2 September 2019 в 21:48
поделиться
Другие вопросы по тегам:

Похожие вопросы: