Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
248f3102
Commit
248f3102
authored
May 28, 2020
by
Francois Chabot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up custom iterator example
parent
897061c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
README.md
README.md
+3
-4
No files found.
README.md
View file @
248f3102
...
@@ -454,7 +454,7 @@ struct MyIterator {
...
@@ -454,7 +454,7 @@ struct MyIterator {
}
}
bool
operator
!=
(
const
MyIterator
&
rhs
)
const
{
bool
operator
!=
(
const
MyIterator
&
rhs
)
const
{
return
rhs
.
pos
!=
pos
||
rhs
.
target
!=
target
;
return
rhs
.
target
!=
target
;
}
}
reference
operator
*
()
const
{
reference
operator
*
()
const
{
...
@@ -462,15 +462,14 @@ struct MyIterator {
...
@@ -462,15 +462,14 @@ struct MyIterator {
}
}
MyContainer
*
target
=
nullptr
;
MyContainer
*
target
=
nullptr
;
std
::
size_t
pos
=
0
;
};
};
MyIterator
begin
(
MyContainer
&
tgt
)
{
MyIterator
begin
(
MyContainer
&
tgt
)
{
return
MyIterator
{
&
tgt
,
0
}
return
MyIterator
{
&
tgt
};
}
}
MyIterator
end
(
const
MyContainer
&
)
{
MyIterator
end
(
const
MyContainer
&
)
{
return
MyIterator
{
nullptr
,
0
}
return
{};
}
}
void
foo
()
{
void
foo
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment