On 02/05/18 18:50, Mikhail Ramalho via Boost wrote:
> Hi all,
> I recently send an email to the clang mailing list, to change how clang
> prints __PRETTY_FUNCTION__ , and one person raised a question if it
> would break boost.
> Honestly, I don't know boost's code and I could only find a few places
> where it's used, mainly for diagnostics, but also in CTTI and hanna; that's
> why I'm sending this email to ask for some help.
> Does boost relies on the format of these macros? The main idea is to just
> change how templates are printed, from:
> X<void>::X() [T = void]
> to a gcc-like style:
> X<T>::X() [with T = void]
__PRETTY_FUNCTION__ is used by BOOST_CURRENT_FUNCTION, which in turn may
be used by Boost.Log to generate scope names. There is a parser for
extracting function names from such generated scope names here:
The parser is "best effort" and probably doesn't cover some cover cases
like lambdas, but it used to work rather well with strings generated by
gcc and MSVC. I don't think I tested it with clang, so I'm not sure how
well it works with it now or if it will be broken by the change.