| 141 |
return res; |
return res; |
| 142 |
}; |
}; |
| 143 |
/// |
/// |
| 144 |
|
/** Equality operator between SmartPtr<T> and int |
| 145 |
|
To be consistent, class T has to handle the equality operator with int |
| 146 |
|
*/ |
| 147 |
friend bool operator==(SmartPtr<T> const & lhs, int value) |
friend bool operator==(SmartPtr<T> const & lhs, int value) |
| 148 |
{ |
{ |
| 149 |
bool res; |
bool res; |
| 158 |
} |
} |
| 159 |
return res; |
return res; |
| 160 |
}; |
}; |
|
/** Equality operator between SmartPtr<T> and int |
|
|
To be consistent, class T has to handle the equality operator with int |
|
|
*/ |
|
| 161 |
friend bool operator!=(SmartPtr<T> const & lhs, SmartPtr<T> const & rhs) |
friend bool operator!=(SmartPtr<T> const & lhs, SmartPtr<T> const & rhs) |
| 162 |
{ |
{ |
| 163 |
return !(lhs==rhs); |
return !(lhs==rhs); |