8#ifndef INCLUDED_BSLMA_DELETERHELPER
9#define INCLUDED_BSLMA_DELETERHELPER
120#include <bslscm_version.h>
149 template <
class TYPE,
class ALLOCATOR>
150 static void deleteObject(
const TYPE *
object, ALLOCATOR *allocator);
159 template <
class TYPE,
class ALLOCATOR>
171template <
bool IS_POLYMORPHIC>
173 template <
class TYPE>
176 return static_cast<void *
>(
const_cast<TYPE *
>(object));
182 template <
class TYPE>
185 return dynamic_cast<void *
>(
const_cast<TYPE *
>(object));
194template <
class TYPE,
class ALLOCATOR>
205#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
206 const_cast<TYPE *
>(object)->~TYPE();
211 allocator->deallocate(address);
215template <
class TYPE,
class ALLOCATOR>
222 void *address =
const_cast<TYPE *
>(object);
224#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
225 const_cast<TYPE *
>(object)->~TYPE();
230 allocator->deallocate(address);
236#ifndef BDE_OPENSOURCE_PUBLICATION
bslma::DeleterHelper bslma_DeleterHelper
This alias is defined for backward compatibility.
Definition bslma_deleterhelper.h:242
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_ASSERT_OPT(X)
Definition bsls_assert.h:1856
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balxml_encoderoptions.h:68
Definition bslmf_ispolymorphic.h:254
static void * caster(const TYPE *object)
Definition bslma_deleterhelper.h:183
Definition bslma_deleterhelper.h:172
static void * caster(const TYPE *object)
Definition bslma_deleterhelper.h:174
Definition bslma_deleterhelper.h:137
static void deleteObject(const TYPE *object, ALLOCATOR *allocator)
Definition bslma_deleterhelper.h:196
static void deleteObjectRaw(const TYPE *object, ALLOCATOR *allocator)
Definition bslma_deleterhelper.h:217