Implemented conversion for std::string, including a bypass-accessor to the scalar value

This commit is contained in:
beder
2011-09-07 15:49:01 -05:00
parent a9c7f8cc5a
commit 3b0cc619b2
7 changed files with 41 additions and 3 deletions

View File

@@ -4,6 +4,11 @@ int main()
{
YAML::Value value;
value["key"] = "value";
std::cout << value["key"].as<std::string>() << "\n";
value["key"]["key"] = "value";
std::cout << value["key"]["key"].as<std::string>() << "\n";
// value[5] = "monkey";
// std::cout << value[5].as<std::string>() << "\n";
return 0;
}