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

#include <daw_json_allocator_wrapper.h>

Inheritance diagram for DAW_JSON_NS::json_details::AllocatorWrapper< Alloc >:
DAW_JSON_NS::json_details::AllocatorWrapperBase< Alloc, std::is_empty_v< Alloc > >

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 () 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_NS::json_details::AllocatorWrapper< Alloc >::allocator_type = std::remove_reference_t<Alloc>

◆ allocator_type_as

template<typename Alloc >
template<typename T >
using DAW_JSON_NS::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_NS::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_NS::json_details::AllocatorWrapper< Alloc >::AllocatorWrapper ( allocator_type alloc)
inlinenoexcept

Member Function Documentation

◆ get_allocator_for()

template<typename Alloc >
template<typename T >
auto DAW_JSON_NS::json_details::AllocatorWrapper< Alloc >::get_allocator_for ( ) const
inline

Member Data Documentation

◆ has_allocator

template<typename Alloc >
constexpr bool DAW_JSON_NS::json_details::AllocatorWrapper< Alloc >::has_allocator = true
staticconstexpr

◆ has_rebind_v

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

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