|
12 | 12 | #include <string>
|
13 | 13 | #include <vector>
|
14 | 14 | #include <map>
|
| 15 | +#include <limits> |
15 | 16 |
|
16 | 17 | #ifdef JSONCPP_ENABLE_ASSERTS
|
17 | 18 | #define JSONCPP_ASSERT_UNREACHABLE assert(false)
|
@@ -130,25 +131,25 @@ namespace Json {
|
130 | 131 |
|
131 | 132 | static const Value null;
|
132 | 133 | /// Minimum signed integer value that can be stored in a Json::Value.
|
133 |
| - static const LargestInt minLargestInt; |
| 134 | + static constexpr inline auto minLargestInt = std::numeric_limits<LargestInt>::min(); |
134 | 135 | /// Maximum signed integer value that can be stored in a Json::Value.
|
135 |
| - static const LargestInt maxLargestInt; |
| 136 | + static constexpr inline auto maxLargestInt = std::numeric_limits<LargestInt>::max(); |
136 | 137 | /// Maximum unsigned integer value that can be stored in a Json::Value.
|
137 |
| - static const LargestUInt maxLargestUInt; |
| 138 | + static constexpr inline auto maxLargestUInt = std::numeric_limits<LargestUInt>::max(); |
138 | 139 |
|
139 | 140 | /// Minimum signed int value that can be stored in a Json::Value.
|
140 |
| - static const Int minInt; |
| 141 | + static constexpr inline auto minInt = std::numeric_limits<Int>::min(); |
141 | 142 | /// Maximum signed int value that can be stored in a Json::Value.
|
142 |
| - static const Int maxInt; |
| 143 | + static constexpr inline auto maxInt = std::numeric_limits<Int>::max(); |
143 | 144 | /// Maximum unsigned int value that can be stored in a Json::Value.
|
144 |
| - static const UInt maxUInt; |
| 145 | + static constexpr inline auto maxUInt = std::numeric_limits<UInt>::max(); |
145 | 146 |
|
146 | 147 | /// Minimum signed 64 bits int value that can be stored in a Json::Value.
|
147 |
| - static const Int64 minInt64; |
| 148 | + static constexpr inline auto minInt64 = std::numeric_limits<Int64>::min(); |
148 | 149 | /// Maximum signed 64 bits int value that can be stored in a Json::Value.
|
149 |
| - static const Int64 maxInt64; |
| 150 | + static constexpr inline auto maxInt64 = std::numeric_limits<Int64>::max(); |
150 | 151 | /// Maximum unsigned 64 bits int value that can be stored in a Json::Value.
|
151 |
| - static const UInt64 maxUInt64; |
| 152 | + static constexpr inline auto maxUInt64 = std::numeric_limits<UInt64>::max(); |
152 | 153 |
|
153 | 154 | private:
|
154 | 155 | #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
|
|
0 commit comments