Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2020-09-16 15:39:29

On Wed, Sep 16, 2020 at 8:20 AM Peter Dimov <pdimov_at_[hidden]> wrote:
> If json::array supported internally arrays of scalars, without changing its
> interface at all so it still appeared to clients as a json::array of
> json::values, we could represent a binary value as a json::array (which
> internally uses a scalar type of unsigned char.)

That is easy to say but what do you do about this function which
returns a reference:

    inline value& array::operator[]( std::size_t pos ) noexcept;

What do you do if you have an array of int (scalar) and someone
accesses an element in the middle and assigns a string to it?


Boost list run by bdawes at, gregod at, cpdaniel at, john at