Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
畅游知识海洋
json
提交
9578c0f7
J
json
项目概览
畅游知识海洋
/
json
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
json
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
9578c0f7
编写于
3月 28, 2017
作者:
N
Niels Lohmann
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/manual_lexer
上级
5d586b01
b4dbebff
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
3 deletion
+15
-3
src/json.hpp
src/json.hpp
+7
-3
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+8
-0
未找到文件。
src/json.hpp
浏览文件 @
9578c0f7
...
...
@@ -5650,7 +5650,7 @@ class basic_json
@ref push_back(const typename object_t::value_type&). Otherwise, @a init
is converted to a JSON value and added using @ref push_back(basic_json&&).
@param init an initializer list
@param
[in]
init an initializer list
@complexity Linear in the size of the initializer list @a init.
...
...
@@ -6127,13 +6127,17 @@ class basic_json
Compares two JSON values for equality according to the following rules:
- Two JSON values are equal if (1) they are from the same type and (2)
their stored values are the same.
their stored values are the same according to their respective
`operator==`.
- Integer and floating-point numbers are automatically converted before
comparison. Floating-point numbers are compared indirectly: two
floating-point numbers `f1` and `f2` are considered equal if neither
`f1 > f2` nor `f2 > f1` holds.
`f1 > f2` nor `f2 > f1` holds. Note than two NaN values are always
treated as unequal.
- Two JSON null values are equal.
@note NaN values never compare equal to themselves or to other NaN values.
@param[in] lhs first JSON value to consider
@param[in] rhs second JSON value to consider
@return whether the values @a lhs and @a rhs are equal
...
...
test/src/unit-regression.cpp
浏览文件 @
9578c0f7
...
...
@@ -838,6 +838,14 @@ TEST_CASE("regression tests")
CHECK
(
j
[
"double_value"
].
is_number_float
());
}
SECTION
(
"issue #464 - VS2017 implicit to std::string conversion fix"
)
{
json
v
=
"test"
;
std
::
string
test
;
test
=
v
;
CHECK
(
v
==
"test"
);
}
SECTION
(
"issue #465 - roundtrip error while parsing 1000000000000000010E5"
)
{
json
j1
=
json
::
parse
(
"1000000000000000010E5"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录