Closed royjacobson closed 1 year ago
Thanks for reporting this. The issues it raises are related to #419.
The first issue is that key_value
shouldn't have an allocator_type
member. I've removed it on master.
I need to think about the next issue.
We've added support for std::pmr::polymorphic_allocator and std::scoped_allocator_adaptor in branch PolymorphicAllocator.
We've defined aliases and alias templates for basic_json
using polymorphic allocators in the jsoncons::pmr
namespace, see basic_json.
For examples of polymorphic_allocator
, see polymorphic_allocator_tests.cpp.
For examples of scoped_allocator_adaptor
, see scoped_allocator_adaptor_tests.cpp.
Support for regular (non-propagating) stateful allocators has been dropped, non-propagating stateful allocators must now be wrapped with a std::scoped_allocator_adaptor
. We've done that for our example with the boost interprocess allocator, see the example. Attempting to instantiate a basic_json
with a regular stateful allocator not wrapped in std::scoped_allocator_adaptor
will produce a compile time error.
Non-stateful allocators are supported as before.
This is currently on master.
Hi!
the following code -
triggers the following assert in libstdc++:
It seems to complain about
jsoncons::key_value
that has a memberallocator_type
but has no related allocator constructors. Should the relevant constructors be added tojsoncons::key_value
?