Skip to content

Commit 1b138e8

Browse files
committed
Gave a more consistent behavior to the Value::isFoo methods. See
NEWS.txt for more details.
1 parent 4f081b5 commit 1b138e8

File tree

4 files changed

+357
-126
lines changed

4 files changed

+357
-126
lines changed

NEWS.txt

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
New in SVN:
2+
-----------
3+
4+
* Value
5+
6+
- Updated the Value::isFoo methods to work as follows:
7+
8+
* isInt, isInt64, isUInt, and isUInt64 return true if and only if the
9+
value can be exactly representable as that type. In particular, a value
10+
constructed with a double like 17.0 will now return true for all of
11+
these methods.
12+
13+
* isDouble and isFloat now return true for all numeric values, since all
14+
numeric values can be converted to a double or float without
15+
truncation. Note that the conversion may not be exact -- for example,
16+
doubles cannot exactly represent integers above 2^53.
17+
18+
* isBool, isNull, isString, isArray, and isObject now return true if and
19+
only if the value is of that type.
20+
121
New in JsonCpp 0.6.0:
222
---------------------
323

include/json/value.h

+2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ namespace Json {
280280
bool isNull() const;
281281
bool isBool() const;
282282
bool isInt() const;
283+
bool isInt64() const;
283284
bool isUInt() const;
285+
bool isUInt64() const;
284286
bool isIntegral() const;
285287
bool isDouble() const;
286288
bool isNumeric() const;

0 commit comments

Comments
 (0)