| 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 | { |
no test coverage detected