boostorg / boostorg/json

Using serializer with custom stateful allocation

Open
#660 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
479
Forks
110
Avg merge
10d 3h
Merged PRs (30d)
5

Description

I have a json `value` which I want to serialize to a string type which uses a custom allocator, and cannot allow the default global allocator to be used during the process either.
It appears that the `serializer` class uses a stack internally which can allocate. It has a `storage_ptr` member, but I don't see any way to provide my own value for this, and so it is always using the default allocator when the stack needs to reserve more space.

Not sure if this is an oversight, or I'm missing something?

Boost 1.76.0 (appears to be same situation on master)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.