mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-20 22:30:27 +08:00
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:
@@ -1,4 +1,5 @@
|
||||
#include "json/json.h"
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
/** \brief Write a Value object to a string.
|
||||
* Example Usage:
|
||||
@@ -15,7 +16,7 @@
|
||||
int main() {
|
||||
Json::Value root;
|
||||
Json::Value data;
|
||||
constexpr bool shouldUseOldWay = false;
|
||||
JSONCPP_CONST bool shouldUseOldWay = false;
|
||||
root["action"] = "run";
|
||||
data["number"] = 1;
|
||||
root["data"] = data;
|
||||
|
Reference in New Issue
Block a user