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
MIGraphX
Commits
7eb6f941
Commit
7eb6f941
authored
Aug 28, 2023
by
Michal Gallus
Browse files
Windows debug iterators: improve comparison operators declarations
parent
39a95e60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
20 deletions
+27
-20
src/include/migraphx/instruction_ref.hpp
src/include/migraphx/instruction_ref.hpp
+27
-20
No files found.
src/include/migraphx/instruction_ref.hpp
View file @
7eb6f941
...
...
@@ -33,36 +33,43 @@ inline namespace MIGRAPHX_INLINE_NS {
struct
instruction
;
#if defined(_WIN32) && !defined(NDEBUG)
class
instruction_ref
:
public
std
::
list
<
instruction
>::
iterator
struct
instruction_ref
:
public
std
::
list
<
instruction
>::
iterator
{
public:
using
instruction_iter
=
std
::
list
<
instruction
>::
iterator
;
using
instruction_const_iter
=
std
::
list
<
instruction
>::
const_iterator
;
instruction_ref
()
=
default
;
instruction_ref
(
const
std
::
list
<
instruction
>::
iterato
r
&
other
)
instruction_ref
(
const
instruction
_ite
r
&
other
)
{
_Ptr
=
other
.
_Ptr
;
_Adopt
(
other
.
_Getcont
());
}
bool
operator
==
(
const
instruction_ref
&
other
)
const
{
return
this
->
_Unwrapped
().
_Ptr
==
other
.
_Unwrapped
().
_Ptr
;
}
friend
bool
operator
==
(
const
instruction_ref
&
x
,
const
instruction_ref
&
y
);
friend
bool
operator
==
(
const
instruction_ref
&
x
,
const
instruction_iter
&
y
);
friend
bool
operator
==
(
const
instruction_ref
&
x
,
const
instruction_const_iter
&
y
);
friend
bool
operator
!=
(
const
instruction_ref
&
x
,
const
instruction_ref
&
y
);
};
bool
operator
==
(
const
std
::
li
st
<
instruction
>::
iterator
&
other
)
const
{
return
this
->
_Unwrapped
().
_Ptr
==
other
.
_Unwrapped
().
_Ptr
;
}
bool
operator
==
(
const
instruction_ref
&
x
,
con
st
instruction
_ref
&
y
)
{
return
x
.
_Unwrapped
().
_Ptr
==
y
.
_Unwrapped
().
_Ptr
;
}
bool
operator
==
(
const
std
::
list
<
instruction
>::
const_iterator
&
other
)
const
{
return
this
->
_Unwrapped
().
_Ptr
==
other
.
_Unwrapped
().
_Ptr
;
}
bool
operator
==
(
const
instruction
_ref
&
x
,
const
instruction_iter
&
y
)
{
return
x
.
_Unwrapped
().
_Ptr
==
y
.
_Unwrapped
().
_Ptr
;
}
bool
operator
!=
(
const
instruction_ref
&
other
)
const
{
return
!
(
*
this
==
other
);
}
};
bool
operator
==
(
const
instruction_ref
&
x
,
const
instruction_const_iter
&
y
)
{
return
x
.
_Unwrapped
().
_Ptr
==
y
.
_Unwrapped
().
_Ptr
;
}
bool
operator
!=
(
const
instruction_ref
&
x
,
const
instruction_ref
&
y
)
{
return
!
(
x
==
y
);
}
#else
using
instruction_ref
=
std
::
list
<
instruction
>::
iterator
;
#endif
...
...
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