8#ifndef INCLUDED_BSLS_NAMEOF
9#define INCLUDED_BSLS_NAMEOF
192#include <bsls_assert.h>
212#if defined(BSLS_PLATFORM_CMP_SUN)
213 enum { k_BUF_SIZE_SOLARIS_CC = 256 };
221#if defined(BSLS_PLATFORM_CMP_MSVC)
222# if defined(BSLS_PLATFORM_CPU_64_BIT)
239 const char *functionName);
269 operator const char *()
const;
274 const char *
name()
const;
301 if (!s_buffer_p && onceGuard.
enter(&once)) {
302#if defined(BSLS_PLATFORM_CMP_GNU) || defined(BSLS_PLATFORM_CMP_CLANG)
303 static char buffer[
sizeof(__PRETTY_FUNCTION__) -
304 k_USELESS_PREAMBLE_LEN];
305 s_buffer_p = initBuffer(buffer, __PRETTY_FUNCTION__);
306#elif defined(BSLS_PLATFORM_CMP_SUN)
307# if BSLS_PLATFORM_CMP_VERSION >= 0x5120
311 static char buffer[k_BUF_SIZE_SOLARIS_CC];
312 s_buffer_p = initBuffer(buffer, __PRETTY_FUNCTION__);
317 s_buffer_p =
"unknown_type";
319#elif defined(BSLS_PLATFORM_CMP_IBM)
320 static char buffer[
sizeof(__FUNCTION__) - k_USELESS_PREAMBLE_LEN];
321 s_buffer_p = initBuffer(buffer, __FUNCTION__);
322#elif defined(BSLS_PLATFORM_CMP_MSVC)
323 static char buffer[
sizeof(__FUNCSIG__) - k_USELESS_PREAMBLE_LEN];
324 s_buffer_p = initBuffer(buffer, __FUNCSIG__);
326# error No function signature macro defined.
#define BSLS_BSLONCE_INITIALIZER
Definition bsls_bslonce.h:143
Definition bsls_atomic.h:1349
Definition bsls_bslonce.h:219
bool enter(BslOnce *once)
Definition bsls_bslonce.h:314
Definition bsls_nameof.h:208
@ k_USELESS_PREAMBLE_LEN
Definition bsls_nameof.h:228
static const char * initBuffer(char *buffer, const char *functionName)
Definition bsls_nameof.h:255
const char * name() const
Definition bsls_nameof.h:343
NameOf()
Initialize the base class of this object to the name of TYPE.
Definition bsls_nameof.h:293
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlt_iso8601util.h:691
const char * nameOfType(const TYPE &)
Return the name of the type of the object passed to this function.
Definition bsls_nameof.h:352
Definition bsls_bslonce.h:150