8#ifndef INCLUDED_BSLMA_DEALLOCATEOBJECTPROCTOR
9#define INCLUDED_BSLMA_DEALLOCATEOBJECTPROCTOR
234#include <bslscm_version.h>
252template <
class ALLOCATOR,
class TYPE>
253struct DeallocateObjectProctor_PtrType;
272template <
class ALLOCATOR,
class TYPE =
typename ALLOCATOR::value_type>
282 ALLOCATOR d_allocator;
284 std::size_t d_numObjects;
334 void reset(PtrType p, std::size_t n = 1);
356template <
class ALLOCATOR,
class TYPE>
361 template rebind_traits<TYPE>::pointer
type;
367template <
class ALLOCATOR,
class TYPE>
379template <
class ALLOCATOR,
class TYPE>
386template <
class ALLOCATOR,
class TYPE>
388void DeallocateObjectProctor<ALLOCATOR, TYPE>::doDeallocate(
bsl::true_type)
395 d_allocator->deallocate(d_object_p);
399template <
class ALLOCATOR,
class TYPE>
402 const ALLOCATOR& allocator,
405 : d_allocator(allocator), d_object_p(p), d_numObjects(n)
409template <
class ALLOCATOR,
class TYPE>
413 : d_allocator(
MoveUtil::access(original).d_allocator)
414 , d_object_p(
MoveUtil::access(original).d_object_p)
415 , d_numObjects(
MoveUtil::access(original).d_numObjects)
420template <
class ALLOCATOR,
class TYPE>
435template <
class ALLOCATOR,
class TYPE>
437typename DeallocateObjectProctor<ALLOCATOR, TYPE>::PtrType
440 PtrType ret = d_object_p;
441 d_object_p = PtrType();
445template <
class ALLOCATOR,
class TYPE>
454template <
class ALLOCATOR,
class TYPE>
456typename DeallocateObjectProctor<ALLOCATOR, TYPE>::PtrType
Definition bslma_deallocateobjectproctor.h:273
PtrType ptr() const
Definition bslma_deallocateobjectproctor.h:457
void reset(PtrType p, std::size_t n=1)
Definition bslma_deallocateobjectproctor.h:447
~DeallocateObjectProctor()
Definition bslma_deallocateobjectproctor.h:422
PtrType release()
Definition bslma_deallocateobjectproctor.h:438
Definition bslmf_movableref.h:751
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:609
Definition balxml_encoderoptions.h:68
Definition bslma_allocatortraits.h:1061
Definition bslmf_integralconstant.h:244
Definition bslmf_ispointer.h:138
static void deallocateObject(const t_ALLOCATOR &allocator, t_POINTER p, std::size_t n=1)
Definition bslma_allocatorutil.h:926
TYPE * type
Definition bslma_deallocateobjectproctor.h:371
Definition bslma_deallocateobjectproctor.h:358
bsl::allocator_traits< ALLOCATOR >::template rebind_traits< TYPE >::pointer type
Definition bslma_deallocateobjectproctor.h:361
Definition bslmf_movableref.h:791
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1032