ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Types | Public Methods | List of all members
StdContainerMABase< T > Struct Template Reference

#include <stdcontainerma.hpp>

Inheritance diagram for StdContainerMABase< T >:
[legend]

Class Description

template<typename T>
struct aworx::lib::monomem::detail::StdContainerMABase< T >


Base struct for types StdContMA and StdContMARecycling containing entities to satisfy requirements for being a std::allocator.

Template Parameters
TThe type of objects to be allocated.

Definition at line 30 of file stdcontainerma.hpp.

Public Types

using const_pointer = const T *
 
using const_reference = const T &
 
using difference_type = ptrdiff_t
 Type definition as required by C++ library standards.
 
using is_always_equal = std::false_type
 Type definition as required by C++ library standards.
 
using pointer = T *
 
using reference = T &
 
using size_type = size_t
 Type definition as required by C++ library standards.
 
using value_type = T
 Type definition as required by C++ library standards.
 

Public Methods

const_pointer address (const_reference x) const noexcept
 
pointer address (reference x) const noexcept
 
template<typename U , typename... Args>
void construct (U *p, Args &&... args)
 
template<typename U >
void destroy (U *p)
 
size_t max_size () const noexcept
 

Member Typedef Documentation

◆ const_pointer

using const_pointer = const T*

Type definition as required by C++ library standards. Available if ALIB_CPPVER <= 14.

Definition at line 45 of file stdcontainerma.hpp.

◆ const_reference

using const_reference = const T&

Type definition as required by C++ library standards. Available if ALIB_CPPVER <= 14.

Definition at line 49 of file stdcontainerma.hpp.

◆ pointer

using pointer = T*

Type definition as required by C++ library standards. Available if ALIB_CPPVER <= 14.

Definition at line 43 of file stdcontainerma.hpp.

◆ reference

using reference = T&

Type definition as required by C++ library standards. Available if ALIB_CPPVER <= 14.

Definition at line 47 of file stdcontainerma.hpp.

Member Function Documentation

◆ address() [1/2]

const_pointer address ( const_reference  x) const
inlinenoexcept

Returns the address of x even in presence of overloaded operator&.

Parameters
xThe object to get the address for.
Returns
The address of x even in presence of overloaded operator&.

Definition at line 117 of file stdcontainerma.hpp.

◆ address() [2/2]

pointer address ( reference  x) const
inlinenoexcept

Returns the address of x even in presence of overloaded operator&.

Parameters
xThe object to get the address for.
Returns
The address of x even in presence of overloaded operator&.

Definition at line 107 of file stdcontainerma.hpp.

◆ construct()

void construct ( U *  p,
Args &&...  args 
)
inline

Constructs an object of type T in allocated uninitialized storage pointed to by p, using placement-new.

Note: Available only if ALIB_CPPVER <= 14.

Template Parameters
UThe type to construct. Deduced by the compiler from parameter p.
ArgsVariadic argument types.
Parameters
pPointer to the object to construct.
argsThe arguments forward to the constructor of p.

Definition at line 82 of file stdcontainerma.hpp.

◆ destroy()

void destroy ( U *  p)
inline

Constructs an object of type T in allocated uninitialized storage pointed to by p, using placement-new.

Note: Available only if ALIB_CPPVER <= 14.

Template Parameters
UThe type to destroy. Deduced by the compiler from parameter p.
Parameters
pPointer to the object to destruct.

Definition at line 97 of file stdcontainerma.hpp.

◆ max_size()

size_t max_size ( ) const
inlinenoexcept

The possible allocation size. Note: Available only if ALIB_CPPVER <= 14.

Returns
returns the largest supported allocation size.

Definition at line 62 of file stdcontainerma.hpp.


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