// // serial.tpp // danmaku // // Created by Sam Jaffe on 5/27/19. // Copyright © 2019 Sam Jaffe. All rights reserved. // #pragma once #include #include namespace danmaku { template auto to_vector(Json::Value const & json, F && func, Args &&... args) -> std::vector { std::vector out; out.reserve(json.size()); for (int i = 0; i < json.size(); ++i) { out.emplace_back(func(json[i], args...)); } return out; } }