MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / get_allocator

Function get_allocator

include/jsoncons/basic_json.hpp:3130–3147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3128
3129 template <typename U=Allocator>
3130 allocator_type get_allocator() const
3131 {
3132 switch (storage_kind())
3133 {
3134 case json_storage_kind::long_str:
3135 return cast<long_string_storage>().get_allocator();
3136 case json_storage_kind::byte_str:
3137 return cast<byte_string_storage>().get_allocator();
3138 case json_storage_kind::array:
3139 return cast<array_storage>().get_allocator();
3140 case json_storage_kind::object:
3141 return cast<object_storage>().get_allocator();
3142 case json_storage_kind::json_ref:
3143 return cast<json_ref_storage>().value().get_allocator();
3144 default:
3145 return get_default_allocator(typename std::allocator_traits<U>::is_always_equal());
3146 }
3147 }
3148
3149 uint64_t ext_tag() const
3150 {

Callers 15

copy_assignmentFunction · 0.85
uninitialized_initMethod · 0.85
insertMethod · 0.85
insert_or_assignMethod · 0.85
try_emplaceMethod · 0.85
flatten_and_destroyMethod · 0.85
insertMethod · 0.85
insert_or_assignMethod · 0.85
try_emplaceMethod · 0.85
flatten_and_destroyMethod · 0.85
bigint_storageFunction · 0.85
reserveFunction · 0.85

Calls 4

storage_kindFunction · 0.85
get_default_allocatorFunction · 0.85
get_allocatorMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected