diff --git a/source/mijin/util/property.hpp b/source/mijin/util/property.hpp index c292d64..b48731c 100644 --- a/source/mijin/util/property.hpp +++ b/source/mijin/util/property.hpp @@ -80,9 +80,10 @@ public: Property(Property&&) noexcept = default; Property& operator=(Property&&) noexcept = default; - PropertyProxy operator*() noexcept { return PropertyProxy(this); } + PropertyProxy operator*() const noexcept { return PropertyProxy(this); } + std::remove_reference_t* operator->() const noexcept { return &get(); } - [[nodiscard]] TGet get() noexcept + [[nodiscard]] TGet get() const noexcept { MIJIN_ASSERT_FATAL(storage_ != nullptr, "Cannot get value from an unset property."); return storage_->getValue();