11 std::unique_ptr<Bedrock::EnableNonOwnerReferences> mEnableNonOwnerReferences;
12 std::unique_ptr<T> mValue;
26 : mEnableNonOwnerReferences(std::make_unique<Bedrock::EnableNonOwnerReferences>(*ptr)),
27 mValue(std::move(ptr)) {}
31 T* get()
const {
return mValue.get(); }
32 T* operator->()
const {
return get(); }
33 T& operator*()
const {
return *get(); }
35 bool isValid()
const {
return mValue !=
nullptr; }
36 explicit operator bool()
const {
return isValid(); }
39 mEnableNonOwnerReferences.reset();
43 bool operator==(
UniqueOwnerPointer const& other)
const {
return mValue == other.mValue; }
44 bool operator==(nullptr_t)
const {
return mValue ==
nullptr; }