Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
畅游知识海洋
json
提交
cc4a8319
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,发现更多精彩内容 >>
提交
cc4a8319
编写于
2月 14, 2015
作者:
N
Niels
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reverse iterators
上级
d87e7707
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1217 addition
and
315 deletion
+1217
-315
.gitignore
.gitignore
+2
-0
src/json.hpp
src/json.hpp
+694
-309
src/json.hpp.re2c
src/json.hpp.re2c
+30
-1
test/unit.cpp
test/unit.cpp
+491
-5
未找到文件。
.gitignore
浏览文件 @
cc4a8319
.deps
utf8_test
json_unit
src/json.hpp
浏览文件 @
cc4a8319
此差异已折叠。
点击以展开。
src/json.hpp.re2c
浏览文件 @
cc4a8319
...
...
@@ -93,7 +93,10 @@ class basic_json
using iterator = basic_json::iterator;
/// a const iterator for a basic_json container
using const_iterator = basic_json::const_iterator;
/// a reverse iterator for a basic_json container
using reverse_iterator = std::reverse_iterator<iterator>;
/// a const reverse iterator for a basic_json container
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
///////////////////////////
// JSON value data types //
...
...
@@ -264,6 +267,8 @@ class basic_json
std::enable_if<
not std::is_same<V, basic_json::iterator>::value and
not std::is_same<V, basic_json::const_iterator>::value and
not std::is_same<V, basic_json::reverse_iterator>::value and
not std::is_same<V, basic_json::const_reverse_iterator>::value and
not std::is_same<V, typename array_t::iterator>::value and
not std::is_same<V, typename array_t::const_iterator>::value and
std::is_constructible<basic_json, typename V::value_type>::value, int>::type
...
...
@@ -822,6 +827,30 @@ class basic_json
return result;
}
/// returns a reverse iterator to the beginning
inline reverse_iterator rbegin() noexcept
{
return reverse_iterator(end());
}
/// returns a reverse iterator to the end
inline reverse_iterator rend() noexcept
{
return reverse_iterator(begin());
}
/// returns a reverse iterator to the beginning
inline const_reverse_iterator crbegin() const noexcept
{
return const_reverse_iterator(cend());
}
/// returns a reverse iterator to the end
inline const_reverse_iterator crend() const noexcept
{
return const_reverse_iterator(cbegin());
}
//////////////
// capacity //
...
...
test/unit.cpp
浏览文件 @
cc4a8319
...
...
@@ -2420,6 +2420,81 @@ TEST_CASE("iterators")
CHECK
(
it
!=
j_const
.
cend
());
CHECK
(
*
it
==
j_const
);
}
SECTION
(
"json + rbegin/rend"
)
{
json
::
reverse_iterator
it
=
j
.
rbegin
();
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
it
--
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
--
it
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j
.
crbegin
();
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
it
--
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
--
it
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"const json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j_const
.
crbegin
();
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
it
++
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
it
--
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
++
it
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
--
it
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
}
}
SECTION
(
"string"
)
...
...
@@ -2526,6 +2601,81 @@ TEST_CASE("iterators")
CHECK
(
it
!=
j_const
.
cend
());
CHECK
(
*
it
==
j_const
);
}
SECTION
(
"json + rbegin/rend"
)
{
json
::
reverse_iterator
it
=
j
.
rbegin
();
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
it
--
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
--
it
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j
.
crbegin
();
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
it
--
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
--
it
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"const json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j_const
.
crbegin
();
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
it
++
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
it
--
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
++
it
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
--
it
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
}
}
SECTION
(
"array"
)
...
...
@@ -2540,14 +2690,17 @@ TEST_CASE("iterators")
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
0
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
1
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
2
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2561,14 +2714,17 @@ TEST_CASE("iterators")
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
0
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
1
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
2
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2582,14 +2738,17 @@ TEST_CASE("iterators")
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
0
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
1
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
2
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2598,19 +2757,94 @@ TEST_CASE("iterators")
SECTION
(
"const json + cbegin/cend"
)
{
json
::
const_iterator
it_begin
=
j
.
cbegin
();
json
::
const_iterator
it_end
=
j
.
cend
();
json
::
const_iterator
it_begin
=
j
_const
.
cbegin
();
json
::
const_iterator
it_end
=
j
_const
.
cend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
0
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
1
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
2
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
==
it_end
);
}
SECTION
(
"json + rbegin/rend"
)
{
json
::
reverse_iterator
it_begin
=
j
.
rbegin
();
json
::
reverse_iterator
it_end
=
j
.
rend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
2
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
1
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
0
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
==
it_end
);
}
SECTION
(
"json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it_begin
=
j
.
crbegin
();
json
::
const_reverse_iterator
it_end
=
j
.
crend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
2
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
1
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
0
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
==
it_end
);
}
SECTION
(
"const json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it_begin
=
j_const
.
crbegin
();
json
::
const_reverse_iterator
it_end
=
j_const
.
crend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
2
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
1
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
0
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2620,7 +2854,7 @@ TEST_CASE("iterators")
SECTION
(
"object"
)
{
json
j
=
{{
"
one"
,
1
},
{
"two"
,
2
},
{
"three
"
,
3
}};
json
j
=
{{
"
A"
,
1
},
{
"B"
,
2
},
{
"C
"
,
3
}};
json
j_const
(
j
);
SECTION
(
"json + begin/end"
)
...
...
@@ -2630,14 +2864,17 @@ TEST_CASE("iterators")
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"A"
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"B"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"C"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2651,14 +2888,17 @@ TEST_CASE("iterators")
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
"A"
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
"B"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
"C"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2672,14 +2912,17 @@ TEST_CASE("iterators")
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"A"
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"B"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"C"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2688,19 +2931,94 @@ TEST_CASE("iterators")
SECTION
(
"const json + cbegin/cend"
)
{
json
::
const_iterator
it_begin
=
j
.
cbegin
();
json
::
const_iterator
it_end
=
j
.
cend
();
json
::
const_iterator
it_begin
=
j
_const
.
cbegin
();
json
::
const_iterator
it_end
=
j
_const
.
cend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
"A"
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
"B"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j_const
[
"C"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
==
it_end
);
}
SECTION
(
"json + rbegin/rend"
)
{
json
::
reverse_iterator
it_begin
=
j
.
rbegin
();
json
::
reverse_iterator
it_end
=
j
.
rend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"C"
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"B"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"A"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
==
it_end
);
}
SECTION
(
"json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it_begin
=
j
.
crbegin
();
json
::
const_reverse_iterator
it_end
=
j
.
crend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"C"
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"B"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"A"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
==
it_end
);
}
SECTION
(
"const json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it_begin
=
j_const
.
crbegin
();
json
::
const_reverse_iterator
it_end
=
j_const
.
crend
();
auto
it
=
it_begin
;
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"C"
]);
it
++
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"B"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
CHECK
(
it
!=
it_end
);
CHECK
(
*
it
==
j
[
"A"
]);
++
it
;
CHECK
(
it
!=
it_begin
);
...
...
@@ -2812,6 +3130,81 @@ TEST_CASE("iterators")
CHECK
(
it
!=
j_const
.
cend
());
CHECK
(
*
it
==
j_const
);
}
SECTION
(
"json + rbegin/rend"
)
{
json
::
reverse_iterator
it
=
j
.
rbegin
();
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
it
--
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
--
it
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j
.
crbegin
();
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
it
--
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
--
it
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"const json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j_const
.
crbegin
();
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
it
++
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
it
--
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
++
it
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
--
it
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
}
}
SECTION
(
"number (float)"
)
...
...
@@ -2918,6 +3311,81 @@ TEST_CASE("iterators")
CHECK
(
it
!=
j_const
.
cend
());
CHECK
(
*
it
==
j_const
);
}
SECTION
(
"json + rbegin/rend"
)
{
json
::
reverse_iterator
it
=
j
.
rbegin
();
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
it
--
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
rbegin
());
CHECK
(
it
==
j
.
rend
());
--
it
;
CHECK
(
it
==
j
.
rbegin
());
CHECK
(
it
!=
j
.
rend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j
.
crbegin
();
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
it
++
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
it
--
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
++
it
;
CHECK
(
it
!=
j
.
crbegin
());
CHECK
(
it
==
j
.
crend
());
--
it
;
CHECK
(
it
==
j
.
crbegin
());
CHECK
(
it
!=
j
.
crend
());
CHECK
(
*
it
==
j
);
}
SECTION
(
"const json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j_const
.
crbegin
();
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
it
++
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
it
--
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
++
it
;
CHECK
(
it
!=
j_const
.
crbegin
());
CHECK
(
it
==
j_const
.
crend
());
--
it
;
CHECK
(
it
==
j_const
.
crbegin
());
CHECK
(
it
!=
j_const
.
crend
());
CHECK
(
*
it
==
j_const
);
}
}
SECTION
(
"null"
)
...
...
@@ -2951,6 +3419,24 @@ TEST_CASE("iterators")
json
::
const_iterator
it_end
=
j_const
.
cend
();
CHECK
(
it_begin
==
it_end
);
}
SECTION
(
"json + rbegin/rend"
)
{
json
::
reverse_iterator
it
=
j
.
rbegin
();
CHECK
(
it
==
j
.
rend
());
}
SECTION
(
"json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j
.
crbegin
();
CHECK
(
it
==
j
.
crend
());
}
SECTION
(
"const json + crbegin/crend"
)
{
json
::
const_reverse_iterator
it
=
j_const
.
crbegin
();
CHECK
(
it
==
j_const
.
crend
());
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录