17 Jun
2020
17 Jun
'20
1:31 a.m.
On Mon, Jun 15, 2020 at 4:18 AM Andrzej Krzemienski
It should be possible to parametrize Boost.JSON with the string type.
Another problem with doing this, is that it breaks the invariant of Boost.JSON's DOM value type: * All child elements in a DOM will inherit the allocator of the root element. If we allow user-defined strings, first they probably won't work with storage_ptr (Boost.JSON's custom allocator container interface) and second they can break the invariant. My goal is for boost::json::value to be suited as a vocabulary type. Allowing customization works against that. An example of an existing useless customization point would be char traits in basic_string and/or basic_string_view. I don't want to create more. Thanks