class

TSharedRef

Shared reference that is never null

Module
Arc
Header
#include "Arc/Core/ArcMemory.h"
Namespace
Arcf
Template
template<typename T>

Constructors

SignatureNameDescription
TSharedRef(const TSharedPtr<T>& ptr) : m_ptr(ptr.m_ptr)TSharedRef
TSharedRef(TSharedPtr<T>&& ptr) : m_ptr(std::move(ptr.m_ptr))TSharedRef
TSharedRef(const TSharedRef&) = defaultTSharedRef
TSharedRef(TSharedRef&&) noexcept = defaultTSharedRef
template<typename U, typename = std::enable_if_t<std::is_convertible_v<U*, T*>>>…TSharedRef

Public functions

ReturnsNameDescription
TSharedRef&operator=
TSharedRef&operator=
T*operator->
T&operator*
T*Get
operatorTSharedPtr<T>
booloperator==
booloperator!=

Function details

TSharedRef

C++
TSharedRef(const TSharedPtr<T>& ptr) : m_ptr(ptr.m_ptr)

TSharedRef

C++
TSharedRef(TSharedPtr<T>&& ptr) : m_ptr(std::move(ptr.m_ptr))

TSharedRef

C++
TSharedRef(const TSharedRef&) = default

TSharedRef

C++
TSharedRef(TSharedRef&&) noexcept = default

TSharedRef

C++
template<typename U, typename = std::enable_if_t<std::is_convertible_v<U*, T*>>> TSharedRef(const TSharedRef<U>& other) : m_ptr(other.m_ptr)

operator=

C++
TSharedRef& operator=(const TSharedRef&) = default

operator=

C++
TSharedRef& operator=(TSharedRef&&) noexcept = default

operator->

C++
T* operator->() const

operator*

C++
T& operator*() const

Get

C++
T* Get() const

operatorTSharedPtr<T>

C++
operator TSharedPtr<T>() const

operator==

C++
bool operator==(const TSharedRef& other) const

operator!=

C++
bool operator!=(const TSharedRef& other) const
Generated from Arc/Core/ArcMemory.h via arc.json · Nov 5, 2026Version 1.0.0