Lines Matching defs:stack
558 // flatten the current json_value to a heap-allocated stack
559 std::vector<basic_json> stack;
561 // move the top-level items to stack
564 stack.reserve(array->size());
565 std::move(array->begin(), array->end(), std::back_inserter(stack));
569 stack.reserve(object->size());
572 stack.push_back(std::move(it.second));
576 while (!stack.empty())
579 basic_json current_item(std::move(stack.back()));
580 stack.pop_back();
583 // its children to the stack to be processed later
586 std::move(current_item.m_value.array->begin(), current_item.m_value.array->end(), std::back_inserter(stack));
594 stack.push_back(std::move(it.second));