bsl::vector<Json>::assign

assign overloads

Synopses

Declared in <bslstl_vector.h>

Assign to this object the value resulting from first clearing this vector and then inserting (in order) each VALUE_TYPE object in the specified values initializer list. If an exception is thrown, *this is left in a valid but unspecified state. This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}).

void
assign(std::initializer_list<Json> values);
» more...

Assign to this object the value resulting from first clearing this vector and then inserting the specified numElements copies of the specified value. If an exception is thrown, *this is left in a valid but unspecified state. Throw std::length_error if numElements > max_size(). This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}).

void
assign(
    size_type numElements,
    Json const& value);
» more...

Assign to this object the value resulting from first clearing this vector and then inserting (in order) each value_type object in the range starting at the specified first element, and ending immediately before the specified last element. If an exception is thrown, *this is left in a valid but unspecified state. Throw std::length_error if distance(first,last) > max_size(). The (template parameter) type INPUT_ITER shall meet the requirements of an input iterator defined in the C++11 standard [24.2.3] providing access to values of a type convertible to value_type, and value_type must be emplace-constructible from *i into this vector, where i is a dereferenceable iterator in the range [first .. last)] (see {Requirements on VALUE_TYPE}). The behavior is undefined unless first and last refer to a range of valid values where first is at a position at or before last.

template<class INPUT_ITER>
void
assign(
    INPUT_ITER first,
    INPUT_ITER last);
» more...