compilation test fix

This commit is contained in:
Alexander Ryabykin 2016-07-02 17:21:34 +03:00
parent 3c017bfa10
commit f2a32741c0

View File

@ -113,6 +113,18 @@ public:
operator T() const { return get(); }
T operator->() const { return get(); }
template <typename U, typename Dummy = std::enable_if_t<std::is_convertible<U, T>::value>>
bool operator==(const not_null<U>& rhs) const
{
return ptr_ == rhs.get();
}
template <typename U, typename Dummy = std::enable_if_t<std::is_convertible<U, T>::value>>
bool operator != (const not_null<U>& rhs) const
{
return !(*this == rhs.get());
}
bool operator==(const T& rhs) const { return ptr_ == rhs; }
bool operator!=(const T& rhs) const { return !(*this == rhs); }