void operator()(const dynamic_t::array_t& v) { ++m_arrays; for (auto it = v.begin(); it != v.end(); ++it) { it->apply(*this); } }
std::string operator()(const dynamic_t::array_t& v) const { std::string result = "["; size_t index = 0; if(!v.empty()) { result += v[index++].apply(*this); } while(index < v.size()) { result += ", "; result += v[index++].apply(*this); } return result + "]"; }
void operator()(const dynamic_t::array_t& v) const { std::cout << "[" << std::endl; bool print_coma = false; for(size_t i = 0; i < v.size(); ++i) { if (print_coma) { std::cout << "," << std::endl; } std::cout << std::string(2 * (m_indent + 1), ' '); v[i].apply(print_visitor(m_indent + 1)); print_coma = true; } std::cout << std::endl << std::string(2 * m_indent, ' ') << "]"; }