forked from microsoft/GSL
Fix issue #45: comparing two maybe_null_dbg's can cause fail_fast
This commit is contained in:
@@ -202,6 +202,8 @@ public:
|
||||
|
||||
bool operator==(const T& rhs) const { tested_ = true; return ptr_ == rhs; }
|
||||
bool operator!=(const T& rhs) const { return !(*this == rhs); }
|
||||
bool operator==(const maybe_null_dbg& rhs) const { tested_ = true; rhs.tested_ = true; return ptr_ == rhs.ptr_; }
|
||||
bool operator!=(const maybe_null_dbg& rhs) const { return !(*this == rhs); }
|
||||
|
||||
T get() const {
|
||||
fail_fast_assert(tested_);
|
||||
|
||||
Reference in New Issue
Block a user