utilities  0.0
Classes | Public Types | Public Member Functions | List of all members
molpro::allocator_< T, A > Class Template Reference

#include <memory.h>

Inheritance diagram for molpro::allocator_< T, A >:
Inheritance graph
[legend]
Collaboration diagram for molpro::allocator_< T, A >:
Collaboration graph
[legend]

Classes

struct  rebind
 

Public Types

typedef T value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 

Public Member Functions

pointer address (reference r)
 
const_pointer address (const_reference r) const
 
pointer allocate (size_type cnt, typename std::allocator< void >::const_pointer=nullptr)
 
void deallocate (pointer p, size_type)
 
size_type max_size () const
 
template<typename U >
void construct (U *ptr) noexcept(std::is_nothrow_default_constructible< U >::value)
 
template<typename U , typename... Args>
void construct (U *ptr, Args &&... args)
 
bool operator== (allocator_ const &)
 
bool operator!= (allocator_ const &a)
 

Detailed Description

template<typename T, typename A = std::allocator<T>>
class molpro::allocator_< T, A >

An allocator suitable for use with STL, that monitors usage If the symbol MOLPRO_MEMORY_FORTRAN is defined, allocation is outsourced to the fortran memory allocator, otherwise it is done with malloc().

Member Typedef Documentation

◆ const_pointer

template<typename T , typename A = std::allocator<T>>
typedef const value_type* molpro::allocator_< T, A >::const_pointer

◆ const_reference

template<typename T , typename A = std::allocator<T>>
typedef const value_type& molpro::allocator_< T, A >::const_reference

◆ difference_type

template<typename T , typename A = std::allocator<T>>
typedef std::ptrdiff_t molpro::allocator_< T, A >::difference_type

◆ pointer

template<typename T , typename A = std::allocator<T>>
typedef value_type* molpro::allocator_< T, A >::pointer

◆ reference

template<typename T , typename A = std::allocator<T>>
typedef value_type& molpro::allocator_< T, A >::reference

◆ size_type

template<typename T , typename A = std::allocator<T>>
typedef std::size_t molpro::allocator_< T, A >::size_type

◆ value_type

template<typename T , typename A = std::allocator<T>>
typedef T molpro::allocator_< T, A >::value_type

Member Function Documentation

◆ address() [1/2]

template<typename T , typename A = std::allocator<T>>
const_pointer molpro::allocator_< T, A >::address ( const_reference  r) const
inline

◆ address() [2/2]

template<typename T , typename A = std::allocator<T>>
pointer molpro::allocator_< T, A >::address ( reference  r)
inline

◆ allocate()

template<typename T , typename A = std::allocator<T>>
pointer molpro::allocator_< T, A >::allocate ( size_type  cnt,
typename std::allocator< void >::const_pointer  = nullptr 
)
inline

◆ construct() [1/2]

template<typename T , typename A = std::allocator<T>>
template<typename U >
void molpro::allocator_< T, A >::construct ( U *  ptr)
inlinenoexcept

◆ construct() [2/2]

template<typename T , typename A = std::allocator<T>>
template<typename U , typename... Args>
void molpro::allocator_< T, A >::construct ( U *  ptr,
Args &&...  args 
)
inline

◆ deallocate()

template<typename T , typename A = std::allocator<T>>
void molpro::allocator_< T, A >::deallocate ( pointer  p,
size_type   
)
inline

◆ max_size()

template<typename T , typename A = std::allocator<T>>
size_type molpro::allocator_< T, A >::max_size ( ) const
inline

◆ operator!=()

template<typename T , typename A = std::allocator<T>>
bool molpro::allocator_< T, A >::operator!= ( allocator_< T, A > const &  a)
inline

◆ operator==()

template<typename T , typename A = std::allocator<T>>
bool molpro::allocator_< T, A >::operator== ( allocator_< T, A > const &  )
inline

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