mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Implemented conversion for std::string, including a bypass-accessor to the scalar value
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user