Rewrite and revert some code to build in pre-C++11

Rewerite and revert some code that this library can be built in pre-C++11 and C++11 env.
Main Change List:
1. using -> typedef
2. not using auto & decltype
3. not using raw string literals
4. ..., other c++11 features will be chosen to compile, depending on env.
This commit is contained in:
chenguoping
2020-04-30 11:24:36 +08:00
parent a4fb5db543
commit d2c205206d
22 changed files with 688 additions and 511 deletions

View File

@@ -12,11 +12,11 @@
int main() {
Json::Value root;
Json::StreamWriterBuilder builder;
const std::unique_ptr<Json::StreamWriter> writer(builder.newStreamWriter());
Json::StreamWriter* writer(builder.newStreamWriter());
root["Name"] = "robin";
root["Age"] = 20;
writer->write(root, &std::cout);
delete writer;
return EXIT_SUCCESS;
}