Boost logo

Boost Users :

Subject: Re: [Boost-users] Strange output from boost::exception diagnostic_information
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-01-31 18:09:46


AMDG

Jeff Schwab wrote:
> Thanks for pointing out the Boost version; I didn't know about it.
> Since the OP is using GCC, the following will also work:

The version in Boost.Units effectively does the same thing wrapped in
#ifdefs to make it compile for non-GCC.

> char* demangle(char const* const name, int* const status) {
> typedef char* buffer_pointer_t;
> typedef std::size_t* length_pointer_t;
> return abi::__cxa_demangle(
> name
> , buffer_pointer_t( )
> , length_pointer_t( )
> , status);
> }
>
> For example, wrapping this function in a c++filt work-alike:
> ./main N5boost16exception_detail19error_info_injectorISt11range_errorEE
> boost::exception_detail::error_info_injector<std::range_error>
>
> I've just posted sample code on GitHub; see demangle.hh and main.cc:
> http://github.com/jeffs/jms/tree/master/src/jms/demangle

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net