
On Friday 05 September 2008 4:48:07 pm Peter Dimov wrote:
Simon Atanasyan:
On Thu, Sep 4, 2008 at 10:03 PM, Peter Dimov <pdimov@pdimov.com> wrote:
Emil Dotchevski:
It appears that BOOST_CURRENT_FUNCTION returns '(unknown)' on sun-5.7, sun-5.8 and sun-5.9, ...
Is this a bug, or is BOOST_CURRENT_FUNCTION not possible on that compiler?
Google tells me that __func__ might work on some Sun C++ versions, but I don't have access to the compiler and can't check. :-)
Sun C++ supports __func__ under -features=extensions command line option.
Is there a way to detect that -features=extensions is in effect and __func__ is supported? Does -features=extensions define a corresponding macro, or if it doesn't, is __func__ itself detectable via #ifdef __func__?
I can't find any way documented or otherwise. It appears to enable the acceptance of __func__ somewhere in the lex/parse stage and does not enable any corresponding macro. The only way I can think of involves the standard compiles/fails approach. Chris