9 #pragma warning(disable : 4365 4987)
35 template<
class ParentAllocator,
bool IsPrimitive = IsPrimitive>
36 static typename std::enable_if<IsPrimitive, T>::type
create(
const ParentAllocator& ) {
40 template<
class ParentAllocator,
bool IsPrimitive = IsPrimitive>
41 static typename std::enable_if<!IsPrimitive && NeedsMemoryResource, T>::type
create(
const ParentAllocator& alloc) {
42 return T{alloc.getMemoryResource()};
45 template<
class ParentAllocator,
bool IsPrimitive = IsPrimitive>
46 static typename std::enable_if<!IsPrimitive && !NeedsMemoryResource && NeedsAllocator, T>::type
create(
47 const ParentAllocator& alloc) {
48 using TAllocator =
typename std::allocator_traits<ParentAllocator>::template rebind_alloc<typename T::value_type>;
49 return T{TAllocator{alloc}};
52 template<
class ParentAllocator,
bool IsPrimitive = IsPrimitive>
53 static typename std::enable_if<!IsPrimitive && !NeedsMemoryResource && !NeedsAllocator && IsPair, T>::type
create(
54 const ParentAllocator& alloc) {
55 using K =
typename T::first_type;
56 using V =
typename T::second_type;
60 template<
class ParentAllocator,
bool IsPrimitive = IsPrimitive>
61 static typename std::enable_if<!IsPrimitive && !NeedsMemoryResource && !NeedsAllocator && !IsPair && IsTuple, T>::type
create(
62 const ParentAllocator& alloc) {
63 using K =
typename std::tuple_element<0, T>::type;
64 using V =
typename std::tuple_element<0, T>::type;
Definition: BinaryStreamReader.h:121
static constexpr bool NeedsMemoryResource
Definition: Common.h:30
static std::enable_if<!IsPrimitive &&!NeedsMemoryResource &&!NeedsAllocator &&!IsPair &&IsTuple, T >::type create(const ParentAllocator &alloc)
Definition: Common.h:61
static std::enable_if<!IsPrimitive &&!NeedsMemoryResource &&!NeedsAllocator &&IsPair, T >::type create(const ParentAllocator &alloc)
Definition: Common.h:53
static std::enable_if< IsPrimitive, T >::type create(const ParentAllocator &)
Definition: Common.h:36
static std::enable_if<!IsPrimitive &&!NeedsMemoryResource &&NeedsAllocator, T >::type create(const ParentAllocator &alloc)
Definition: Common.h:46
static constexpr bool IsTuple
Definition: Common.h:32
static constexpr bool IsPrimitive
Definition: Common.h:33
static std::enable_if<!IsPrimitive &&NeedsMemoryResource, T >::type create(const ParentAllocator &alloc)
Definition: Common.h:41
static constexpr bool IsPair
Definition: Common.h:31
static constexpr bool NeedsAllocator
Definition: Common.h:29