1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
diff --git a/json11.cpp b/json11.cpp
index 9647846..509dfdd 100644
--- a/json11.cpp
+++ b/json11.cpp
@@ -22,6 +22,7 @@
#include "json11.hpp"
#include <cassert>
#include <cmath>
+#include <cstdint>
#include <cstdlib>
#include <cstdio>
#include <limits>
@@ -151,7 +152,7 @@ protected:
// Constructors
explicit Value(const T &value) : m_value(value) {}
- explicit Value(T &&value) : m_value(move(value)) {}
+ explicit Value(T &&value) : m_value(std::move(value)) {}
// Get type tag
Json::Type type() const override {
@@ -198,7 +199,7 @@ class JsonString final : public Value<Json::STRING, string> {
const string &string_value() const override { return m_value; }
public:
explicit JsonString(const string &value) : Value(value) {}
- explicit JsonString(string &&value) : Value(move(value)) {}
+ explicit JsonString(string &&value) : Value(std::move(value)) {}
};
class JsonArray final : public Value<Json::ARRAY, Json::array> {
@@ -206,7 +207,7 @@ class JsonArray final : public Value<Json::ARRAY, Json::array> {
const Json & operator[](size_t i) const override;
public:
explicit JsonArray(const Json::array &value) : Value(value) {}
- explicit JsonArray(Json::array &&value) : Value(move(value)) {}
+ explicit JsonArray(Json::array &&value) : Value(std::move(value)) {}
};
class JsonObject final : public Value<Json::OBJECT, Json::object> {
@@ -214,7 +215,7 @@ class JsonObject final : public Value<Json::OBJECT, Json::object> {
const Json & operator[](const string &key) const override;
public:
explicit JsonObject(const Json::object &value) : Value(value) {}
- explicit JsonObject(Json::object &&value) : Value(move(value)) {}
+ explicit JsonObject(Json::object &&value) : Value(std::move(value)) {}
};
class JsonNull final : public Value<Json::NUL, NullStruct> {
@@ -256,12 +257,12 @@ Json::Json(double value) : m_ptr(make_shared<JsonDouble>(value)) {
Json::Json(int value) : m_ptr(make_shared<JsonInt>(value)) {}
Json::Json(bool value) : m_ptr(value ? statics().t : statics().f) {}
Json::Json(const string &value) : m_ptr(make_shared<JsonString>(value)) {}
-Json::Json(string &&value) : m_ptr(make_shared<JsonString>(move(value))) {}
+Json::Json(string &&value) : m_ptr(make_shared<JsonString>(std::move(value))) {}
Json::Json(const char * value) : m_ptr(make_shared<JsonString>(value)) {}
Json::Json(const Json::array &values) : m_ptr(make_shared<JsonArray>(values)) {}
-Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(move(values))) {}
+Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(std::move(values))) {}
Json::Json(const Json::object &values) : m_ptr(make_shared<JsonObject>(values)) {}
-Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(move(values))) {}
+Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(std::move(values))) {}
/* * * * * * * * * * * * * * * * * * * *
* Accessors
@@ -359,7 +360,7 @@ struct JsonParser final {
* Mark this parse as failed.
*/
Json fail(string &&msg) {
- return fail(move(msg), Json());
+ return fail(std::move(msg), Json());
}
template <typename T>
|