OR-Tools  8.2
STLCountingAllocator< T, Alloc >

Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class gtl::STLCountingAllocator< T, Alloc >

Definition at line 910 of file stl_util.h.

Classes

class  rebind
 

Public Types

using Base = Alloc
 
using pointer = typename Alloc::pointer
 
using size_type = typename Alloc::size_type
 

Public Member Functions

 STLCountingAllocator ()
 
 STLCountingAllocator (int64 *b)
 
template<typename U , typename B >
 STLCountingAllocator (const STLCountingAllocator< U, B > &x)
 
pointer allocate (size_type n, std::allocator< void >::const_pointer hint=nullptr)
 
void deallocate (pointer p, size_type n)
 
int64bytes_used () const
 

Public Attributes

elements
 STL member. More...
 

Member Typedef Documentation

◆ Base

using Base = Alloc

Definition at line 912 of file stl_util.h.

◆ pointer

using pointer = typename Alloc::pointer

Definition at line 913 of file stl_util.h.

◆ size_type

using size_type = typename Alloc::size_type

Definition at line 914 of file stl_util.h.

Constructor & Destructor Documentation

◆ STLCountingAllocator() [1/3]

Definition at line 916 of file stl_util.h.

◆ STLCountingAllocator() [2/3]

STLCountingAllocator ( int64 b)
inlineexplicit

Definition at line 917 of file stl_util.h.

◆ STLCountingAllocator() [3/3]

STLCountingAllocator ( const STLCountingAllocator< U, B > &  x)
inline

Definition at line 921 of file stl_util.h.

Member Function Documentation

◆ allocate()

pointer allocate ( size_type  n,
std::allocator< void >::const_pointer  hint = nullptr 
)
inline

Definition at line 924 of file stl_util.h.

◆ bytes_used()

int64* bytes_used ( ) const
inline

Definition at line 946 of file stl_util.h.

◆ deallocate()

void deallocate ( pointer  p,
size_type  n 
)
inline

Definition at line 931 of file stl_util.h.

Member Data Documentation

◆ elements

T elements
inherited

STL member.


The documentation for this class was generated from the following file: