proxygen
folly::allocator_delete< Alloc > Class Template Reference

#include <Memory.h>

Inheritance diagram for folly::allocator_delete< Alloc >:

Public Member Functions

 allocator_delete ()=default
 
 allocator_delete (allocator_delete const &)=default
 
 allocator_delete (allocator_delete &&)=default
 
allocator_deleteoperator= (allocator_delete const &)=default
 
allocator_deleteoperator= (allocator_delete &&)=default
 
 allocator_delete (const allocator_type &alloc)
 
 allocator_delete (allocator_type &&alloc)
 
template<typename U >
 allocator_delete (const allocator_delete< U > &other)
 
allocator_type const & get_allocator () const
 
void operator() (pointer p) const
 

Private Types

using allocator_type = typename std::remove_reference< Alloc >::type
 
using allocator_traits = std::allocator_traits< allocator_type >
 
using value_type = typename allocator_traits::value_type
 
using pointer = typename allocator_traits::pointer
 

Detailed Description

template<typename Alloc>
class folly::allocator_delete< Alloc >

Definition at line 570 of file Memory.h.

Member Typedef Documentation

template<typename Alloc>
using folly::allocator_delete< Alloc >::allocator_traits = std::allocator_traits<allocator_type>
private

Definition at line 573 of file Memory.h.

template<typename Alloc>
using folly::allocator_delete< Alloc >::allocator_type = typename std::remove_reference<Alloc>::type
private

Definition at line 572 of file Memory.h.

template<typename Alloc>
using folly::allocator_delete< Alloc >::pointer = typename allocator_traits::pointer
private

Definition at line 575 of file Memory.h.

template<typename Alloc>
using folly::allocator_delete< Alloc >::value_type = typename allocator_traits::value_type
private

Definition at line 574 of file Memory.h.

Constructor & Destructor Documentation

template<typename Alloc>
folly::allocator_delete< Alloc >::allocator_delete ( )
default
template<typename Alloc>
folly::allocator_delete< Alloc >::allocator_delete ( allocator_delete< Alloc > const &  )
default
template<typename Alloc>
folly::allocator_delete< Alloc >::allocator_delete ( allocator_delete< Alloc > &&  )
default
template<typename Alloc>
folly::allocator_delete< Alloc >::allocator_delete ( const allocator_type alloc)
inlineexplicit

Definition at line 584 of file Memory.h.

585  : allocator_type(alloc) {}
typename std::remove_reference< Alloc >::type allocator_type
Definition: Memory.h:572
template<typename Alloc>
folly::allocator_delete< Alloc >::allocator_delete ( allocator_type &&  alloc)
inlineexplicit

Definition at line 587 of file Memory.h.

588  : allocator_type(std::move(alloc)) {}
typename std::remove_reference< Alloc >::type allocator_type
Definition: Memory.h:572
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<typename Alloc>
template<typename U >
folly::allocator_delete< Alloc >::allocator_delete ( const allocator_delete< U > &  other)
inline

Definition at line 591 of file Memory.h.

592  : allocator_type(other.get_allocator()) {}
typename std::remove_reference< Alloc >::type allocator_type
Definition: Memory.h:572

Member Function Documentation

template<typename Alloc>
allocator_type const& folly::allocator_delete< Alloc >::get_allocator ( ) const
inline

Definition at line 594 of file Memory.h.

594  {
595  return *this;
596  }
template<typename Alloc>
void folly::allocator_delete< Alloc >::operator() ( pointer  p) const
inline

Definition at line 598 of file Memory.h.

References testing::Args(), destroy(), and folly::T.

598  {
599  auto alloc = get_allocator();
600  allocator_traits::destroy(alloc, p);
601  allocator_traits::deallocate(alloc, p, 1);
602  }
allocator_type const & get_allocator() const
Definition: Memory.h:594
static void destroy()
template<typename Alloc>
allocator_delete& folly::allocator_delete< Alloc >::operator= ( allocator_delete< Alloc > const &  )
default
template<typename Alloc>
allocator_delete& folly::allocator_delete< Alloc >::operator= ( allocator_delete< Alloc > &&  )
default

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