Switched convert to a templated struct that can be specialized (so we can partially specialize it)

This commit is contained in:
beder
2011-09-08 02:02:15 -05:00
parent 21fbb461c0
commit bb2eafc387
7 changed files with 80 additions and 58 deletions

View File

@@ -7,10 +7,10 @@ int main()
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";
value["monkey"] = 5;
std::cout << value["monkey"].as<int>() << "\n";
// value[5] = "monkey";
// std::cout << value[5].as<std::string>() << "\n";
// value["monkey"] = 5;
// std::cout << value["monkey"].as<int>() << "\n";
return 0;
}