diff --git a/deps/ox/src/ox/model/descwrite.hpp b/deps/ox/src/ox/model/descwrite.hpp index cfd7b127..ddff59e8 100644 --- a/deps/ox/src/ox/model/descwrite.hpp +++ b/deps/ox/src/ox/model/descwrite.hpp @@ -219,9 +219,11 @@ template constexpr Error TypeDescWriter::field(CRStringView name, const T *val) noexcept { if (m_type) { if constexpr(isVector_v || isArray_v) { - return field(name, val->data(), 0, detail::buildSubscriptStack(val)); + typename T::value_type *data = nullptr; + return field(name, data, 0, detail::buildSubscriptStack(val)); } else if constexpr(isSmartPtr_v) { - return field(name, val->get(), 0, detail::buildSubscriptStack(val)); + typename T::value_type *data = nullptr; + return field(name, data, 0, detail::buildSubscriptStack(val)); } else if constexpr(is_pointer_v) { return field(name, val, 0, detail::buildSubscriptStack(val)); } else { diff --git a/deps/ox/src/ox/std/memory.hpp b/deps/ox/src/ox/std/memory.hpp index 4c0ac3e7..a9374f9c 100644 --- a/deps/ox/src/ox/std/memory.hpp +++ b/deps/ox/src/ox/std/memory.hpp @@ -74,6 +74,7 @@ class SharedPtr { int *m_refCnt = nullptr; public: + using value_type = T; explicit constexpr SharedPtr(T *t = nullptr) noexcept: m_t(t), m_refCnt(new int) { } @@ -183,6 +184,7 @@ class UniquePtr { T *m_t = nullptr; public: + using value_type = T; explicit constexpr UniquePtr(T *t = nullptr) noexcept: m_t(t) { }