BloombergLP::bdljsn::JsonArray::insert

insert overloads

Synopses

Declared in <bdljsn_json.h>

Move-insert json at the specified position.

JsonArray::Iterator
insert(
    ConstIterator position,
    bslmf::MovableRef<Json> json);
» more...

Insert a copy of json at the specified position.

JsonArray::Iterator
insert(
    ConstIterator position,
    Json const& json);
» more...

Move-insert json at the specified index.

template<class t_INDEX>
JsonArray::Iterator
insert(
    t_INDEX index,
    bslmf::MovableRef<Json> json)
requires bsl::is_integral<t_INDEX>::value
                        && !bsl::is_same<t_INDEX, bool>::value;
» more...

Insert a copy of json at the specified index.

template<class t_INDEX>
JsonArray::Iterator
insert(
    t_INDEX index,
    Json const& json)
requires bsl::is_integral<t_INDEX>::value
                        && !bsl::is_same<t_INDEX, bool>::value;
» more...

Insert the range [first, last)] at the specified position.

template<class t_INPUT_ITERATOR>
JsonArray::Iterator
insert(
    ConstIterator position,
    t_INPUT_ITERATOR first,
    t_INPUT_ITERATOR last);
» more...

Insert the range [first, last)] at the specified index.

template<
    class t_INDEX,
    class t_INPUT_ITERATOR>
JsonArray::Iterator
insert(
    t_INDEX index,
    t_INPUT_ITERATOR first,
    t_INPUT_ITERATOR last)
requires bsl::is_integral<t_INDEX>::value
                        && !bsl::is_same<t_INDEX, bool>::value;
» more...

Return Value

an iterator referring to the newly inserted element

Parameters

NameDescription
positioninsertion iterator
jsonvalue to insert
indexinsertion position
firstbeginning of the source range
lastend of the source range