Boost logo

Boost Users :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2020-06-13 16:42:19


On Fri, Jun 12, 2020 at 10:36 AM Rainer Deyke via Boost
<boost_at_[hidden]> wrote:
> String layer: overall, a solution looking for a problem.

I created boost::json::string to use instead of std::string for a
couple of reasons:

1. It uses a type-erased, reference counted memory resource instead of
Allocator template parameter
2. The class is laid out a certain way to greatly minimize its size
3. The class layout is optimized to keep the size of the enclosing
variant (the JSON DOM value type) small
4. The API is the same for all C++ versions (unlike std::string)
5. It is not a class template

I would like to know what are the exact _technical_ benefits of
Boost.Text's String layer, beyond "because I don't like std::string"

Thanks


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net