Lines Matching refs:first
896 // check if each element is an array with two elements whose first
1020 basic_json(InputIT first, InputIT last)
1022 JSON_ASSERT(first.m_object != nullptr);
1026 if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))
1031 // copy type from first iterator
1032 m_type = first.m_object->m_type;
1043 if (JSON_HEDLEY_UNLIKELY(!first.m_it.primitive_iterator.is_begin()
1046 JSON_THROW(invalid_iterator::create(204, "iterators out of range", first.m_object));
1064 m_value.number_integer = first.m_object->m_value.number_integer;
1070 m_value.number_unsigned = first.m_object->m_value.number_unsigned;
1076 m_value.number_float = first.m_object->m_value.number_float;
1082 m_value.boolean = first.m_object->m_value.boolean;
1088 m_value = *first.m_object->m_value.string;
1094 m_value.object = create<object_t>(first.m_it.object_iterator,
1101 m_value.array = create<array_t>(first.m_it.array_iterator,
1108 m_value = *first.m_object->m_value.binary;
1115 JSON_THROW(invalid_iterator::create(206, detail::concat("cannot construct with iterators from ", first.m_object->type_name()), first.m_object));
2121 return set_parent(result.first->second);
2174 return set_parent(result.first->second);
2380 /// @brief access the first element
2387 /// @brief access the first element
2487 IteratorType erase(IteratorType first, IteratorType last)
2490 if (JSON_HEDLEY_UNLIKELY(this != first.m_object || this != last.m_object))
2506 if (JSON_HEDLEY_LIKELY(!first.m_it.primitive_iterator.is_begin()
2534 result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator,
2541 result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,
2756 /// @brief returns an iterator to the first element
2765 /// @brief returns an iterator to the first element
2772 /// @brief returns a const iterator to the first element
2841 /// @brief returns a const reverse iterator to one before the first
3163 set_parent(res.first->second);
3244 set_parent(res.first->second);
3248 it.m_it.object_iterator = res.first;
3324 iterator insert(const_iterator pos, const_iterator first, const_iterator last)
3339 if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))
3344 if (JSON_HEDLEY_UNLIKELY(first.m_object == this))
3350 return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator);
3375 void insert(const_iterator first, const_iterator last)
3384 if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))
3390 if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object()))
3392 JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects", this));
3395 m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator);
3407 void update(const_iterator first, const_iterator last, bool merge_objects = false)
3423 if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))
3429 if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object()))
3431 JSON_THROW(type_error::create(312, detail::concat("cannot use update() with ", first.m_object->type_name()), first.m_object));
3434 for (auto it = first; it != last; ++it)
4022 static basic_json parse(IteratorType first,
4029 parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result);
4057 static bool accept(IteratorType first, IteratorType last,
4060 return parser(detail::input_adapter(std::move(first), std::move(last)), nullptr, false, ignore_comments).accept(true);
4090 static bool sax_parse(IteratorType first, IteratorType last, SAX* sax,
4095 auto ia = detail::input_adapter(std::move(first), std::move(last));
4345 static basic_json from_cbor(IteratorType first, IteratorType last,
4352 auto ia = detail::input_adapter(std::move(first), std::move(last));
4403 static basic_json from_msgpack(IteratorType first, IteratorType last,
4409 auto ia = detail::input_adapter(std::move(first), std::move(last));
4457 static basic_json from_ubjson(IteratorType first, IteratorType last,
4463 auto ia = detail::input_adapter(std::move(first), std::move(last));
4512 static basic_json from_bjdata(IteratorType first, IteratorType last,
4518 auto ia = detail::input_adapter(std::move(first), std::move(last));
4542 static basic_json from_bson(IteratorType first, IteratorType last,
4548 auto ia = detail::input_adapter(std::move(first), std::move(last));
4975 // first pass: traverse common elements
5019 // first pass: traverse this object's elements