8#ifndef INCLUDED_BSLMA_STDTESTALLOCATOR
9#define INCLUDED_BSLMA_STDTESTALLOCATOR
57#include <bslscm_version.h>
125 template <
class ANY_TYPE>
160 template <
class ANY_TYPE>
194 template <
class ELEMENT_TYPE>
199 template <
class ELEMENT_TYPE>
233template <
class T1,
class T2>
244template <
class T1,
class T2>
314: d_mechanism(original.mechanism())
320template <
class ANY_TYPE>
323: d_mechanism(rhs.mechanism())
338 return static_cast<pointer>(d_mechanism->allocate(n *
sizeof(TYPE)));
347 d_mechanism->deallocate(p);
351template <
class ELEMENT_TYPE>
355 new (
static_cast<void*
>(address)) ELEMENT_TYPE(val);
359template <
class ELEMENT_TYPE>
363 DestructionUtil::destroy(address);
397 static const std::size_t MAX_NUM_BYTES =
~std::size_t(0);
398 static const std::size_t MAX_NUM_ELEMENTS = MAX_NUM_BYTES /
sizeof(TYPE);
400 return MAX_NUM_ELEMENTS;
404template <
class T1,
class T2>
412template <
class T1,
class T2>
417 return ! (lhs == rhs);
433 return ! (lhs == rhs);
449 return ! (lhs == rhs);
Definition bslma_allocator.h:457
Definition bslma_stdtestallocator.h:89
std::size_t size_type
Definition bslma_stdtestallocator.h:106
StdTestAllocator()
Definition bslma_stdtestallocator.h:297
BSLMF_NESTED_TRAIT_DECLARATION(StdTestAllocator, bslmf::IsBitwiseEqualityComparable)
void construct(ELEMENT_TYPE *address, const TYPE &val)
Definition bslma_stdtestallocator.h:353
pointer address(reference x) const
Definition bslma_stdtestallocator.h:370
bsl::conditional< bsl::is_void< TYPE >::value, void, TYPE & >::type reference
Definition bslma_stdtestallocator.h:112
BSLMF_NESTED_TRAIT_DECLARATION(StdTestAllocator, bslmf::IsBitwiseMoveable)
TestAllocator * mechanism() const
Definition bslma_stdtestallocator.h:289
bsl::conditional< bsl::is_void< TYPE >::value, void, constTYPE & >::type const_reference
Definition bslma_stdtestallocator.h:115
BSLMF_NESTED_TRAIT_DECLARATION(StdTestAllocator, bslmf::IsBitwiseCopyable)
pointer allocate(size_type n, const void *hint=0)
Definition bslma_stdtestallocator.h:332
void deallocate(pointer p, size_type n=1)
Definition bslma_stdtestallocator.h:343
const TYPE * const_pointer
Definition bslma_stdtestallocator.h:109
const_pointer address(const_reference x) const
void destroy(ELEMENT_TYPE *address)
Definition bslma_stdtestallocator.h:361
TYPE value_type
Definition bslma_stdtestallocator.h:118
StdTestAllocator & operator=(const StdTestAllocator &rhs)
std::ptrdiff_t difference_type
Definition bslma_stdtestallocator.h:107
size_type max_size() const
Definition bslma_stdtestallocator.h:386
TYPE * pointer
Definition bslma_stdtestallocator.h:108
BSLMF_NESTED_TRAIT_DECLARATION(StdTestAllocator, bslma::IsStdAllocator)
Definition bslma_testallocator.h:384
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_UTIL_ADDRESSOF(OBJ)
Definition bsls_util.h:289
Definition balxml_encoderoptions.h:68
Definition bdldfp_decimal.h:5188
Definition bslmf_conditional.h:120
Definition bslmf_integralconstant.h:244
Definition bslmf_issame.h:146
Definition bslma_default.h:740
Definition bslma_isstdallocator.h:201
Definition bslma_stdtestallocator.h:126
StdTestAllocator< ANY_TYPE > other
Definition bslma_stdtestallocator.h:128
Definition bslmf_isbitwisecopyable.h:298
Definition bslmf_isbitwiseequalitycomparable.h:499
Definition bslmf_isbitwisemoveable.h:718