[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost
Subject:    Re: [boost] [json] [text] Multiple, custom string tyypes
From:       Vinnie Falco via Boost <boost () lists ! boost ! org>
Date:       2020-06-17 1:31:18
Message-ID: CA+EzHGcxsjWKTAAeqyPFM4XU+oJsGBEm5ngUhxKPD7amU0mfYg () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jun 15, 2020 at 4:18 AM Andrzej Krzemienski <akrzemi1@gmail.com> wrote:
> 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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic