15 template <
typename TPtr>
20 using TRef = decltype(*std::declval<TPtr>());
21 static_assert(std::is_reference<TRef>::value,
"Must be a reference");
23 using TValue = std::decay_t<TRef>;
24 using TConstRef = std::add_const_t<TValue>&;
30 : ptr(
std::move(ptr)) {}
33 : ptr(
std::move(other.ptr)) {}
36 ptr = std::move(newPtr);
#define NAMESPACE_SPH_END
Simple non-owning wrapper of pointer.
Const-propagating wrapper for object with point semantics.
TConstRef operator*() const
RawPtr< TValue > operator->()
PropagateConst(PropagateConst &&other)
PropagateConst(TPtr &&ptr)
RawPtr< const TValue > operator->() const
PropagateConst & operator=(TPtr &&newPtr)
Non-owning wrapper of pointer.
Overload of std::swap for Sph::Array.