5 #ifndef FLUTTER_IMPELLER_CORE_RAW_PTR_H_
6 #define FLUTTER_IMPELLER_CORE_RAW_PTR_H_
17 explicit raw_ptr(
const std::shared_ptr<T>& ptr)
30 FML_CHECK(weak_ptr_.lock());
37 FML_CHECK(weak_ptr_.lock());
44 FML_CHECK(weak_ptr_.lock());
51 FML_CHECK(weak_ptr_.lock());
58 FML_CHECK(weak_ptr_.lock());
65 return ptr_ == other.ptr_;
70 return !(*
this == other);
73 explicit operator bool()
const {
return !!ptr_; }
78 std::weak_ptr<T> weak_ptr_;
A wrapper around a raw ptr that adds additional unopt mode only checks.
const T & operator*() const
bool operator==(raw_ptr< U > const &other) const
bool operator!=(raw_ptr< U > const &other) const
const T * operator->() const
raw_ptr(const std::shared_ptr< T > &ptr)