Search code examples
gccboostg++optional-parametersgcc-warning

Boost pretty print for GCC error messages


I'm using GCC 4.7.2. My code is rather heavy on template, STL and boost usage. When I compile and there is an error in some class or function that is derived from or uses some boost/STL functionality, I get error messages showing spectacularly hideous return types and/or function arguments for my classes/function.

My question:

Is there a prettyprint type of thing for GCC warnings/errors containing boost/STL types, so that the return types shown in error messages correspond to what I've typed in the code, or at least, become more intelligible?

I have briefly skimmed through this question, however, that is about GDB rather than GCC...

I've also come across this pretty printer in Haskell, but that just seems to add structure, not take away (mostly) unneeded detail...

Any other suggestions?


Solution

  • You could try STLfilt as mentioned in 'C++ Template Metaprogramming' by David Abrahms & Alesky Gurtovoy.

    The book contains a chapter on template message diagnostics. It suggests using the STLFilt /showback:N to eliminate compiler backtrace material in order to get simplified output.