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);
270 operator const char *()
const;
275 const char *
name()
const;
302 if (!s_buffer_p && onceGuard.
enter(&once)) {
303#if defined(BSLS_PLATFORM_CMP_GNU) || defined(BSLS_PLATFORM_CMP_CLANG)
304 static char buffer[
sizeof(__PRETTY_FUNCTION__) -
305 k_USELESS_PREAMBLE_LEN];
306 s_buffer_p = initBuffer(buffer, __PRETTY_FUNCTION__);
307#elif defined(BSLS_PLATFORM_CMP_SUN)
308# if BSLS_PLATFORM_CMP_VERSION >= 0x5120
312 static char buffer[k_BUF_SIZE_SOLARIS_CC];
313 s_buffer_p = initBuffer(buffer, __PRETTY_FUNCTION__);
318 s_buffer_p =
"unknown_type";
320#elif defined(BSLS_PLATFORM_CMP_IBM)
321 static char buffer[
sizeof(__FUNCTION__) - k_USELESS_PREAMBLE_LEN];
322 s_buffer_p = initBuffer(buffer, __FUNCTION__);
323#elif defined(BSLS_PLATFORM_CMP_MSVC)
324 static char buffer[
sizeof(__FUNCSIG__) - k_USELESS_PREAMBLE_LEN];
325 s_buffer_p = initBuffer(buffer, __FUNCSIG__);
327# error No function signature macro defined.
#define BSLS_BSLONCE_INITIALIZER
Definition bsls_bslonce.h:144
Definition bsls_atomic.h:1362
Definition bsls_bslonce.h:225
bool enter(BslOnce *once)
Definition bsls_bslonce.h:324
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:256
const char * name() const
Definition bsls_nameof.h:344
NameOf()
Initialize the base class of this object to the name of TYPE.
Definition bsls_nameof.h:294
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlt_iso8601util.h:707
const char * nameOfType(const TYPE &)
Return the name of the type of the object passed to this function.
Definition bsls_nameof.h:353
Definition bsls_bslonce.h:151