mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
constexpr operators
This commit is contained in:
parent
0535138459
commit
3c017bfa10
@ -115,6 +115,11 @@ public:
|
|||||||
|
|
||||||
bool operator==(const T& rhs) const { return ptr_ == rhs; }
|
bool operator==(const T& rhs) const { return ptr_ == rhs; }
|
||||||
bool operator!=(const T& rhs) const { return !(*this == rhs); }
|
bool operator!=(const T& rhs) const { return !(*this == rhs); }
|
||||||
|
|
||||||
|
constexpr bool operator==(std::nullptr_t) const { return false; }
|
||||||
|
constexpr bool operator!=(std::nullptr_t) const { return true; }
|
||||||
|
|
||||||
|
constexpr operator bool() const { return true; }
|
||||||
private:
|
private:
|
||||||
T ptr_;
|
T ptr_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user