Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 yaml-cpp 中,如何更改旧的 API 片段:
YAML::Node doc; while(parser.GetNextDocument(doc)) { // ... }
进入新的API?
您可以使用
std::vector<YAML::Node> docs = YAML::LoadAll("--- foo\n--- bar\n");
(或类似的LoadAllFromFile)来解析一系列文档。
LoadAllFromFile