Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
5088364b
Commit
5088364b
authored
Apr 23, 2020
by
David Stone
Committed by
Wenzel Jakob
Apr 26, 2020
Browse files
Declare `operator==` and `operator!=` member functions const.
parent
6ebfc4b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/pybind11/cast.h
include/pybind11/cast.h
+2
-2
No files found.
include/pybind11/cast.h
View file @
5088364b
...
@@ -288,8 +288,8 @@ public:
...
@@ -288,8 +288,8 @@ public:
// Past-the-end iterator:
// Past-the-end iterator:
iterator
(
size_t
end
)
:
curr
(
end
)
{}
iterator
(
size_t
end
)
:
curr
(
end
)
{}
public:
public:
bool
operator
==
(
const
iterator
&
other
)
{
return
curr
.
index
==
other
.
curr
.
index
;
}
bool
operator
==
(
const
iterator
&
other
)
const
{
return
curr
.
index
==
other
.
curr
.
index
;
}
bool
operator
!=
(
const
iterator
&
other
)
{
return
curr
.
index
!=
other
.
curr
.
index
;
}
bool
operator
!=
(
const
iterator
&
other
)
const
{
return
curr
.
index
!=
other
.
curr
.
index
;
}
iterator
&
operator
++
()
{
iterator
&
operator
++
()
{
if
(
!
inst
->
simple_layout
)
if
(
!
inst
->
simple_layout
)
curr
.
vh
+=
1
+
(
*
types
)[
curr
.
index
]
->
holder_size_in_ptrs
;
curr
.
vh
+=
1
+
(
*
types
)[
curr
.
index
]
->
holder_size_in_ptrs
;
...
...
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