DAW JSON Link
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc > Struct Template Reference

#include <daw_json_allocator_wrapper.h>

Inheritance diagram for daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >:
daw::json::DAW_JSON_VER::json_details::AllocatorWrapperBase< Alloc, std::is_empty< Alloc >::value >

Classes

struct  allocator_type_as_rebind
 

Public Types

using allocator_type = std::remove_reference_t< Alloc >
 
template<typename T >
using allocator_type_as = std::conditional_t< has_rebind_v< allocator_type, T >, allocator_type_as_rebind< allocator_type, T >, allocator_type >
 
template<typename A , typename T >
using has_allocator_type_as_rebind = typename std::allocator_traits< A >::template rebind_traits< T >::type
 

Public Member Functions

 AllocatorWrapper (allocator_type &alloc) noexcept
 
template<typename T >
auto get_allocator_for (template_param< T >) const
 

Static Public Attributes

static constexpr bool has_allocator = true
 
template<typename A , typename T >
static constexpr bool has_rebind_v
 

Member Typedef Documentation

◆ allocator_type

template<typename Alloc >
using daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >::allocator_type = std::remove_reference_t<Alloc>

◆ allocator_type_as

template<typename Alloc >
template<typename T >
using daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >::allocator_type_as = std::conditional_t<has_rebind_v<allocator_type, T>, allocator_type_as_rebind<allocator_type, T>, allocator_type>

◆ has_allocator_type_as_rebind

template<typename Alloc >
template<typename A , typename T >
using daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >::has_allocator_type_as_rebind = typename std::allocator_traits<A>::template rebind_traits<T>::type

Constructor & Destructor Documentation

◆ AllocatorWrapper()

template<typename Alloc >
daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >::AllocatorWrapper ( allocator_type alloc)
inlineexplicitnoexcept

Member Function Documentation

◆ get_allocator_for()

template<typename Alloc >
template<typename T >
auto daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >::get_allocator_for ( template_param< T >  ) const
inline

Member Data Documentation

◆ has_allocator

template<typename Alloc >
constexpr bool daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >::has_allocator = true
staticconstexpr

◆ has_rebind_v

template<typename Alloc >
template<typename A , typename T >
constexpr bool daw::json::DAW_JSON_VER::json_details::AllocatorWrapper< Alloc >::has_rebind_v
inlinestaticconstexpr
Initial value:
=
daw::is_detected<has_allocator_type_as_rebind, A, T>::value

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