Boost logo

Boost :

From: Dave Abrahams (dave_at_[hidden])
Date: 2003-02-06 22:26:14

At TCS3, I met Leor Zolman, the author of STLFilt, the C++ error message
"decryptor." He asked what it would take for me to start using STLFilt, and
I told him I didn't care about most of what he was doing -- compressing STL
iterator types down to sensible typedefs, and removing information that most
people find useless but I find essential. We started to talk about what I
*do* need: a useful re-ordering for GCC error messages, so I don't have to
wade through an instantiation backtrace just to see what went wrong, and
some nice wrapping for long template types. I'm pleased to say that Leor did
an amazing job. It's GCC-only for the time being; here's a sample of some
of the output, wrapped a bit more-narrowly than you'd probably want, so that
it won't be mangled by mailers:

c:/boost/boost/function/function_template.hpp:98: `a0' has incomplete
c:/boost/boost/function/function_template.hpp: In static member
   `static boost::detail::function::unusable boost::detail::function
        void (*)(int*, int, int&, float&), void, int[], int, int&
      , float
        boost::detail::function::any_pointer, int[], int, int&, float
c:/boost/libs/function/test/sum_avg_portable.cpp:21: instantiated
    from here
c:/boost/boost/function/function_template.hpp:448: instantiated
   `void boost::function4<
        void, int[], int, int&, float
        void (*)(int*, int, int&, float&)
      , boost::detail::function::function_ptr_tag
c:/boost/boost/function/function_template.hpp:432: instantiated
   `void boost::function4<
        void, int[], int, int&, float
>::assign_to(void (*)(int*, int, int&, float&))'
c:/boost/boost/function/function_template.hpp:293: instantiated
    from `boost::function4<
        void, int[], int, int&, float
        void (*)(int*, int, int&, float&)
      , boost::detail::function::enable_if<
                boost::is_same<void (*)(int*, int, int&, float&),
>::value, int
c:/boost/boost/function/function_template.hpp:346: instantiated
            boost::is_same<void (*)(int*, int, int&, float&), int>::
      , boost::function4<void, int[], int, int&, float>&
>::type boost::function4<void, int[], int, int&, float>::
    operator=(void (*)(int*, int, int&, float&))'
c:/boost/libs/function/test/sum_avg_portable.cpp:21: instantiated
    from here

For reference, you can compare this with:

If this looks useful to you, get Leor's Beta from Look for the phrase "template
metaprogramming". BTW, there are lots of options; if you don't like leading
commas, for example, you can turn them off.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at