Commit 0900cf79 authored by Michal Gallus's avatar Michal Gallus
Browse files

Define friend functions as inlines in instruction_ref windows debug ver

parent 7eb6f941
...@@ -33,7 +33,7 @@ inline namespace MIGRAPHX_INLINE_NS { ...@@ -33,7 +33,7 @@ inline namespace MIGRAPHX_INLINE_NS {
struct instruction; struct instruction;
#if defined(_WIN32) && !defined(NDEBUG) #if defined(_WIN32) && !defined(NDEBUG)
struct instruction_ref : public std::list<instruction>::iterator struct instruction_ref : std::list<instruction>::iterator
{ {
using instruction_iter = std::list<instruction>::iterator; using instruction_iter = std::list<instruction>::iterator;
using instruction_const_iter = std::list<instruction>::const_iterator; using instruction_const_iter = std::list<instruction>::const_iterator;
...@@ -45,31 +45,26 @@ struct instruction_ref : public std::list<instruction>::iterator ...@@ -45,31 +45,26 @@ struct instruction_ref : public std::list<instruction>::iterator
_Adopt(other._Getcont()); _Adopt(other._Getcont());
} }
friend bool operator==(const instruction_ref& x, const instruction_ref& y); 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); return x._Unwrapped()._Ptr == y._Unwrapped()._Ptr;
friend bool operator!=(const instruction_ref& x, const instruction_ref& y); }
};
bool operator==(const instruction_ref& x, const instruction_ref& y)
{
return x._Unwrapped()._Ptr == y._Unwrapped()._Ptr;
}
bool operator==(const instruction_ref& x, const instruction_iter& y) friend bool operator==(const instruction_ref& x, const instruction_iter& y)
{ {
return x._Unwrapped()._Ptr == y._Unwrapped()._Ptr; return x._Unwrapped()._Ptr == y._Unwrapped()._Ptr;
} }
bool operator==(const instruction_ref& x, const instruction_const_iter& y) friend bool operator==(const instruction_ref& x, const instruction_const_iter& y)
{ {
return x._Unwrapped()._Ptr == y._Unwrapped()._Ptr; return x._Unwrapped()._Ptr == y._Unwrapped()._Ptr;
} }
bool operator!=(const instruction_ref& x, const instruction_ref& y) friend bool operator!=(const instruction_ref& x, const instruction_ref& y)
{ {
return !(x == y); return !(x == y);
} }
};
#else #else
using instruction_ref = std::list<instruction>::iterator; using instruction_ref = std::list<instruction>::iterator;
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment