constexpr operators

This commit is contained in:
Alexander Ryabykin 2016-07-02 15:24:10 +03:00
parent 0535138459
commit 3c017bfa10

View File

@ -115,6 +115,11 @@ public:
bool operator==(const T& rhs) const { return ptr_ == 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:
T ptr_;