Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-06-22 14:44:35

Pavel Vozenilek wrote:
> "Gennaro Prota" wrote:
>>> doesn't work, just tried.
>> If what is said here is true:
>> then the macro is quite unreliable (like the compiler, anyway). This
>> other page:
> __FUNCTION__ looks working.
> A bug report for __PRETTY_FUNCTION__ has been sent.

What do you mean by "working"? Does __PRETTY_FUNCTION__ not work? 'Cause I
already committed your suggestion to enable it. :-)

If by "working" you mean that #ifdef works, this is not guaranteed (unless
DMC specifically documents it to work, of course). __func__ and equivalents
aren't required to be macros. They are required to be "predefined
identifiers" that name a character string, not necessarily a literal.

C99 says:

The identifier __func__ shall be implicitly declared by the translator as
immediately following the opening brace of each function definition, the

static const char __func__[] = "function-name";

appeared, where function-name is the name of the lexically-enclosing

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